コード例 #1
0
        public override void InitializeLanguage()
        {
            base.Language = new MaintainLanguage(ModuleInfo)
            {
                AddTitle  = LangUtils.TranslateModuleItem(LangType.MODULE_TEXT, ModuleInfo, "Add"),
                EditTitle = LangUtils.TranslateModuleItem(LangType.MODULE_TEXT, ModuleInfo, "Edit"),
                ViewTitle = LangUtils.TranslateModuleItem(LangType.MODULE_TEXT, ModuleInfo, "View"),
            };

            Language.SuccessStatus = Language.GetSpecialStatus("Success");
            Language.FormatButton(btnCommit, "BTN_COMMIT");
            Language.FormatButton(btnClose, "BTN_CLOSE");
            Language.AddLayout  = Language.GetLayout("Add");
            Language.EditLayout = Language.GetLayout("Edit");
            Language.ViewLayout = Language.GetLayout("View");
            //TUDQ them
            try
            {
                MaintainModuleInfo moduleinfo = (MaintainModuleInfo)ModuleInfo;
                if (moduleinfo.TRANSACTION_MODE == "Y")
                {
                    btnCommit.Visible = true;
                    btnClose.Visible  = true;
                    btnCommit.Text    = "Duyệt";
                    btnClose.Text     = "Từ chối";
                }
            }
            catch
            {
            }
            //END

            base.InitializeLanguage();
        }
コード例 #2
0
        public async Task <ActionResult> LoadMainTainModule(string modId, string subModId, string parram, [FromBody] List <ModuleFieldInfo> fieldsInfos)
        {
            var outPut = new RestOutput <object>();

            try
            {
                var m_Client = new CoreController(_configuration);
                var data     = m_Client.LoadMainTainModule(modId);
                MaintainModuleInfo modMaintain = null;
                var store = "";
                if (data.Any())
                {
                    modMaintain = data.First();
                    store       = CommonFunction.GetStoreRunModMaintain(modMaintain, subModId ?? ESubMod.MVW.ToString());
                }
                var fields = CommonFunction.GetModuleFields(fieldsInfos, modId, FLDGROUP.PARAMETER);
                var cm     = new WebApiCore.CommonFunction();
                var lst    = new List <string>();
                if (!string.IsNullOrEmpty(store))
                {
                    var param = m_Client.DiscoveryParameters(store.IndexOf(".") > 0 ? store : store);
                    cm.GetNpgsqlParameterValues(param, fields);
                    var dataStore = m_Client.RunStoreToDataTable(store, param);
                    outPut.Data = JsonConvert.SerializeObject(dataStore);
                    return(Ok(outPut));
                }
                return(Ok(outPut));
            }
            catch (Exception ex)
            {
                outPut.ResultCode = -1;
                outPut.Message    = ex.ToString();
                return(Ok(outPut));
            }
        }
コード例 #3
0
ファイル: CommonFunction.cs プロジェクト: TuanCruise/Code
        /// <summary>
        /// Lấy tên store gọi lấy dữ liệu dùng cho view và edit
        /// </summary>
        /// <param name="maintainModuleInfo"></param>
        /// <param name="subMod"></param>
        /// <returns></returns>
        public static string GetStoreRunModMaintain(MaintainModuleInfo maintainModuleInfo, string subMod)
        {
            var store = "";

            if (string.IsNullOrEmpty(subMod))
            {
                store = maintainModuleInfo.AddSelectStore;
            }
            else if (subMod.ToUpper() == ESubMod.MED.ToString())
            {
                store = maintainModuleInfo.EditSelectStore;
            }
            else if (subMod.ToUpper() == ESubMod.MVW.ToString())
            {
                store = maintainModuleInfo.ViewSelectStore;
            }
            return(store);
        }