Пример #1
0
        /// <summary>
        /// Check screen authority and permission
        /// </summary>
        /// <param name="param"></param>
        /// <returns></returns>
        public ActionResult ICS140_Authority(ICS140_ScreenParameter param)
        {
            ICommonHandler handlerCommon  = ServiceContainer.GetService <ICommonHandler>() as ICommonHandler;
            IIncomeHandler iincomeHandler = ServiceContainer.GetService <IIncomeHandler>() as IIncomeHandler;

            ObjectResultData res = new ObjectResultData();

            if (handlerCommon.IsSystemSuspending())
            {
                res.AddErrorMessage(MessageUtil.MODULE_COMMON, MessageUtil.MessageList.MSG0049);
                return(Json(res));
            }

            // Check User Permission
            if (CheckUserPermission(ScreenID.C_SCREEN_ID_DEBT_TRACING, FunctionID.C_FUNC_ID_OPERATE) == false)
            {
                res.AddErrorMessage(MessageUtil.MODULE_COMMON, MessageUtil.MessageList.MSG0053);
                return(Json(res));
            }

            param.IsHQUser = false;
            if (CommonUtil.dsTransData != null && CommonUtil.dsTransData.dtUserData != null)
            {
                var permission = iincomeHandler.GetTbm_DebtTracingPermission(CommonUtil.dsTransData.dtUserData.EmpNo);
                if (permission != null && permission.Count > 0)
                {
                    param.IsHQUser = true;
                }
            }

            return(InitialScreenEnvironment <ICS140_ScreenParameter>("ICS140", param, res));
        }
Пример #2
0
        public ActionResult ICS140()
        {
            var sparam = this.GetScreenObject <ICS140_ScreenParameter>();

            IIncomeHandler iincomeHandler = ServiceContainer.GetService <IIncomeHandler>() as IIncomeHandler;

            sparam.IsHQUser = false;
            if (CommonUtil.dsTransData != null && CommonUtil.dsTransData.dtUserData != null)
            {
                var permission = iincomeHandler.GetTbm_DebtTracingPermission(CommonUtil.dsTransData.dtUserData.EmpNo);
                if (permission != null && permission.Count > 0)
                {
                    sparam.IsHQUser = true;
                }
            }

            ViewBag.IsHQUser = sparam.IsHQUser;

            ViewBag.PaidButtonLabel  = CommonUtil.GetLabelFromResource(MessageUtil.MODULE_INCOME, ScreenID.C_SCREEN_ID_DEBT_TRACING, "lblPaidButton");
            ViewBag.PaidConfirmParam = CommonUtil.GetLabelFromResource(MessageUtil.MODULE_INCOME, ScreenID.C_SCREEN_ID_DEBT_TRACING, "PaidConfirmParam");

            return(View());
        }