// GET: ADMHeader public ActionResult Index() { if (GeneralClass.Role == null || GeneralClass.Role == string.Empty) { return(Redirect(GeneralClass.LoginURL)); } object dataReason = new ReasonMasterLogic().ReasonMaster_Get_GetAll(0, true); object dataStatus = new StatusMasterLogic().StatusMaster_Get_GetAll(0, true); if (dataReason != null) { ViewBag.ReasonList = Newtonsoft.Json.JsonConvert.DeserializeObject <List <ReasonMasterClass> >(dataReason.ToString()); } if (dataStatus != null) { ViewBag.StatusList = Newtonsoft.Json.JsonConvert.DeserializeObject <List <StatusMasterClass> >(dataStatus.ToString()); } return(View()); }
public ActionResult Index() { if (Request.QueryString.Count == 0) { return(Redirect(GeneralClass.LoginURL)); } else if (Request.QueryString.Count == 4) // Branch { if (Request.QueryString.AllKeys.Contains("eid") == false && Request.QueryString.AllKeys.Contains("enm") == false && Request.QueryString.AllKeys.Contains("bnm") == false && Request.QueryString.AllKeys.Contains("role") == false) { return(Redirect(GeneralClass.LoginURL)); } else { GeneralClass.EmployeeID = Request.QueryString["eid"].ToString(); GeneralClass.EmployeeName = Request.QueryString["enm"].ToString(); GeneralClass.BranchID = Request.QueryString["bnm"].ToString(); GeneralClass.Role = Request.QueryString["role"].ToString(); } } else if (Request.QueryString.Count == 3) // Audit { if (Request.QueryString.AllKeys.Contains("eid") == false && Request.QueryString.AllKeys.Contains("enm") == false && Request.QueryString.AllKeys.Contains("role") == false) { return(Redirect(GeneralClass.LoginURL)); } else { GeneralClass.EmployeeID = Request.QueryString["eid"].ToString(); GeneralClass.EmployeeName = Request.QueryString["enm"].ToString(); GeneralClass.Role = Request.QueryString["role"].ToString(); } } else { return(Redirect(GeneralClass.LoginURL)); } object dataStatus = new StatusMasterLogic().StatusMaster_Get_GetAll(0, true); if (dataStatus != null) { ViewBag.StatusList = JsonConvert.DeserializeObject <List <StatusMasterClass> >(dataStatus.ToString()); } object dataBranch = new UtilityLogic().GetAllBranch(); if (dataBranch != null) { ViewBag.BranchList = JsonConvert.DeserializeObject <List <UtilityClass> >(dataBranch.ToString()); } object dataReason = new ReasonMasterLogic().ReasonMaster_Get_GetAll(0, true); if (dataReason != null) { ViewBag.ReasonList = JsonConvert.DeserializeObject <List <ReasonMasterClass> >(dataReason.ToString()); } return(View()); }