Align .editorconfig files Move Controller logic to DMO classes GlobalVars.AppSettings = Models.AppSettings.GetFromConfigurationManager(); Question EditorConfig Project level editorconfig Format White Spaces AppSetting when EnvironmentVariable not set Corrective Actions Tests Schedule Actions Tests DMO Tests Controller Tests Get ready to use VSCode IDE
36 lines
995 B
C#
36 lines
995 B
C#
using Fab2ApprovalSystem.DMO;
|
|
using Fab2ApprovalSystem.Misc;
|
|
using Fab2ApprovalSystem.Models;
|
|
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Web;
|
|
using System.Web.Mvc;
|
|
|
|
namespace Fab2ApprovalSystem.Controllers;
|
|
|
|
[Authorize]
|
|
[SessionExpireFilter]
|
|
public class ManagerController : Controller {
|
|
|
|
UserAccountDMO userDMO = new UserAccountDMO();
|
|
AdminDMO adminDMO = new AdminDMO();
|
|
TrainingDMO trainingDMO = new TrainingDMO();
|
|
LotDispositionDMO ldDMO;
|
|
private readonly AppSettings _AppSettings;
|
|
|
|
public ManagerController(AppSettings appSettings) {
|
|
_AppSettings = appSettings;
|
|
ldDMO = new LotDispositionDMO(appSettings);
|
|
}
|
|
|
|
public ActionResult Index() {
|
|
if ((bool)Session[GlobalVars.IS_MANAGER]) {
|
|
var model = userDMO.GetAllUsers();
|
|
ViewBag.AllActiveUsers = userDMO.GetAllActiveUsers();
|
|
return View(model);
|
|
} else
|
|
return Content("Not Autthorized");
|
|
}
|
|
} |