/// <summary> /// Index /// </summary> /// <returns>List View</returns> public ActionResult Index() { if (!this.IsInFunctionList(Constant.FunctionID.SalesNormalPersonal)) { return(this.RedirectToAction("Index", "ErrorAuthent")); } var currentUser = GetLoginUser(); var model = new PMS09002ListViewModel { CONTRACT_TYPE_LIST = this.commonService.GetContractTypeSelectList(currentUser.CompanyCode) }; var tmpCondition = GetRestoreData() as Condition; if (tmpCondition != null) { model.Condition = tmpCondition; } if (Session[Constant.SESSION_IS_BACK] != null) { Session[Constant.SESSION_IS_BACK] = null; } return(this.View("List", model)); }
/// <summary> /// Index /// </summary> /// <returns>List View</returns> public ActionResult Index() { if (!this.IsInFunctionList(Constant.FunctionID.SalesPersonal) && !this.IsInFunctionList(Constant.FunctionID.SalesPersonal_Admin)) { return(this.RedirectToAction("Index", "ErrorAuthent")); } var currentUser = GetLoginUser(); var model = new PMS09002ListViewModel { GROUP_LIST = this.commonService.GetUserGroupSelectList(currentUser.CompanyCode), CONTRACT_TYPE_LIST = this.commonService.GetContractTypeSelectList(currentUser.CompanyCode), BRANCH_LIST = this.commonService.GetBranchSelectList(currentUser.CompanyCode) }; model.Condition.GROUP_ID = currentUser.GroupId; ViewBag.iDisplayLength = ConfigurationManager.AppSettings[ConfigurationKeys.LIST_ITEMS_PER_PAGE]; if (Session[Constant.SESSION_TRANSITION_DESTINATION].ToString().Contains("/PMS09002/Detail") && Session[Constant.SESSION_IS_BACK] != null) { var tmpCondition = GetRestoreData() as Condition; if (tmpCondition != null) { model.Condition = tmpCondition; } var iDisplayLength = Session["PMS09002_DisplayLength"] as int?; if (iDisplayLength != null) { ViewBag.iDisplayLength = iDisplayLength; } } if (Session[Constant.SESSION_IS_BACK] != null) { Session[Constant.SESSION_IS_BACK] = null; } return(this.View("List", model)); }