public ActionResult CTS360() { CTS360_ScreenParameter param = GetScreenObject <CTS360_ScreenParameter>(); ViewBag.AROfficeCode = param.AROfficeCode; if (C_REQUESTER.Equals(param.SubObjectID)) { ViewBag.ScreenMode = "Requester"; ViewBag.DefaultRole = ARRole.C_AR_ROLE_REQUESTER; ViewBag.DefaultStatus = ARSearchStatus.C_AR_SEARCH_STATUS_HANDLING; ViewBag.DefaultPeriod = ARSearchPeriod.C_AR_SEARCH_PERIOD_REQUEST_DATE; } else if (C_APPROVER.Equals(param.SubObjectID)) { ViewBag.ScreenMode = "Approver"; ViewBag.DefaultRole = ARRole.C_AR_ROLE_APPROVER; ViewBag.DefaultStatus = ARSearchStatus.C_AR_SEARCH_STATUS_HANDLING; ViewBag.DefaultPeriod = ARSearchPeriod.C_AR_SEARCH_PERIOD_REQUEST_DATE; } else if (C_AUDITOR.Equals(param.SubObjectID)) { ViewBag.ScreenMode = "Auditor"; ViewBag.DefaultRole = ARRole.C_AR_ROLE_AUDITOR; ViewBag.DefaultStatus = ARSearchStatus.C_AR_SEARCH_STATUS_HANDLING; ViewBag.DefaultPeriod = ARSearchPeriod.C_AR_SEARCH_PERIOD_REQUEST_DATE; } else if (ScreenID.C_SCREEN_ID_SUMMARY_AR.Equals(param.screenMode) && ViewBag.AROfficeCode != null) { ViewBag.ScreenMode = "Office"; } else { ViewBag.ScreenMode = "Search"; } //ViewBag.DueDate1Week = IncidentSearchDuedate.C_INCIDENT_SEARCH_DUEDATE_1WEEK; //ViewBag.DueDate2Week = IncidentSearchDuedate.C_INCIDENT_SEARCH_DUEDATE_2WEEKS; //ViewBag.DueDate1Month = IncidentSearchDuedate.C_INCIDENT_SEARCH_DUEDATE_1MONTH; ViewBag.DefaultFrom = ""; //DateTime.Now.ToString("dd-MMM-yyyy"); Modify by Thanawit S. ViewBag.DefaultTo = ""; //DateTime.Now.ToString("dd-MMM-yyyy"); //DateTime.Now.AddDays(14.0).ToString("dd-MMM-yyyy"); Modify by Thanawit S. ViewBag.UnImplemented = ContractStatus.C_CONTRACT_STATUS_BEF_START; ViewBag.Implemented = ContractStatus.C_CONTRACT_STATUS_AFTER_START; ViewBag.StopService = ContractStatus.C_CONTRACT_STATUS_STOPPING; ViewBag.Cancel = ContractStatus.C_CONTRACT_STATUS_END + "," + "," + ContractStatus.C_CONTRACT_STATUS_CANCEL + "," + "," + ContractStatus.C_CONTRACT_STATUS_FIXED_CANCEL; ViewBag.AL = ProductType.C_PROD_TYPE_AL + "," + ProductType.C_PROD_TYPE_RENTAL_SALE + "," + ProductType.C_PROD_TYPE_ONLINE; ViewBag.Sales = ServiceType.C_SERVICE_TYPE_SALE; ViewBag.Maintenance = ProductType.C_PROD_TYPE_MA; ViewBag.SentryGuard = ProductType.C_PROD_TYPE_BE + "," + ProductType.C_PROD_TYPE_SG; ViewBag.Handling = "," + ARStatus.C_AR_STATUS_AUDITING + "," + ARStatus.C_AR_STATUS_RETURNED_REQUEST + "," + ARStatus.C_AR_STATUS_WAIT_FOR_APPROVAL + ","; ViewBag.Complete = "," + ARStatus.C_AR_STATUS_INSTRUCTED + "," + ARStatus.C_AR_STATUS_REJECTED + "," + ARStatus.C_AR_STATUS_APPROVED + ","; return(View()); }
/// <summary> /// Check user’s permission and view AR office data from summary screen /// </summary> /// <param name="param"></param> /// <returns></returns> public ActionResult CTS360_Authority(CTS360_ScreenParameter param) { ObjectResultData res = new ObjectResultData(); try { if (!CheckUserPermission(ScreenID.C_SCREEN_ID_SEARCH_AR)) { res.AddErrorMessage(MessageUtil.MODULE_COMMON, MessageUtil.MessageList.MSG0053); return(Json(res)); } if (!CheckUserPermission(ScreenID.C_SCREEN_ID_SEARCH_AR, FunctionID.C_FUNC_ID_VIEW_AR_OFFICE) && ScreenID.C_SCREEN_ID_SUMMARY_AR.Equals(param.screenMode)) { res.AddErrorMessage(MessageUtil.MODULE_COMMON, MessageUtil.MessageList.MSG0053); return(Json(res)); } if (res.IsError) { return(Json(res)); } return(InitialScreenEnvironment <CTS360_ScreenParameter>(CTS360_Screen, param, res)); } catch (Exception ex) { res.AddErrorMessage(ex); return(Json(res)); } }