public override List <SysvarInfo> BuildSysvarInfoCache()
        {
            var colSysvarInfo = CachedUtils.GetCacheOf <SysvarInfo>(ServerCachedHashInfo.SysvarInfoHash);

            if (colSysvarInfo == null)
            {
                using (var ctrlSA = new SAController())
                {
                    ctrlSA.ListSysvarInfo(out colSysvarInfo);
                }

                CachedUtils.SetCacheOf(colSysvarInfo, ServerCachedHashInfo.SysvarInfoHash);
            }
            return(colSysvarInfo);
        }
        public override List <GroupSummaryInfo> BuildGroupSummaryCache()
        {
            var colGroupSummaryInfo = CachedUtils.GetCacheOf <GroupSummaryInfo>(ServerCachedHashInfo.GroupSummaryInfoHash);

            if (colGroupSummaryInfo == null)
            {
                using (var ctrlSA = new SAController())
                {
                    ctrlSA.ListGroupSummaryInfo(out colGroupSummaryInfo);
                }

                CachedUtils.SetCacheOf(colGroupSummaryInfo, ServerCachedHashInfo.GroupSummaryInfoHash);
            }
            return(colGroupSummaryInfo);
        }
        public override List <ExportHeader> BuildExportHeaderCache()
        {
            var colExportHeaderInfo = CachedUtils.GetCacheOf <ExportHeader>(ServerCachedHashInfo.ExportHeaderInfoHash);

            if (colExportHeaderInfo == null)
            {
                using (var ctrlSA = new SAController())
                {
                    ctrlSA.ListExportHeaderInfo(out colExportHeaderInfo);
                }

                CachedUtils.SetCacheOf(colExportHeaderInfo, ServerCachedHashInfo.ExportHeaderInfoHash);
            }
            return(colExportHeaderInfo);
        }
        public override List <ButtonParamInfo> BuildSearchButtonParamsCache()
        {
            var colSearchButtonParamsInfo = CachedUtils.GetCacheOf <ButtonParamInfo>(ServerCachedHashInfo.SearchButtonParamsInfoHash);

            if (colSearchButtonParamsInfo == null)
            {
                using (var ctrlSA = new SAController())
                {
                    ctrlSA.ListSearchButtonParam(out colSearchButtonParamsInfo);
                }

                CachedUtils.SetCacheOf(colSearchButtonParamsInfo, ServerCachedHashInfo.SearchButtonParamsInfoHash);
            }
            return(colSearchButtonParamsInfo);
        }
        public override List <OracleParam> BuildOracleParamsCache()
        {
            var oracleParamsInfo = CachedUtils.GetCacheOf <OracleParam>(ServerCachedHashInfo.OracleParamsInfoHash);

            if (oracleParamsInfo == null)
            {
                using (var ctrlSA = new SAController())
                {
                    ctrlSA.ListOracleParameter(out oracleParamsInfo);
                }

                CachedUtils.SetCacheOf(oracleParamsInfo, ServerCachedHashInfo.OracleParamsInfoHash);
            }

            return(oracleParamsInfo);
        }
        public override List <LanguageInfo> BuildLanguageCache()
        {
            var instanceHash    = ClientInfo.LanguageID + "-" + ServerCachedHashInfo.LanguageHash;
            var colLanguageInfo = CachedUtils.GetCacheOf <LanguageInfo>(instanceHash);

            if (colLanguageInfo == null)
            {
                using (var ctrlSA = new SAController())
                {
                    ctrlSA.ListLanguage(out colLanguageInfo, ClientInfo.LanguageID);
                }

                CachedUtils.SetCacheOf(colLanguageInfo, instanceHash);
            }

            return(colLanguageInfo);
        }
        public override List <ModuleFieldInfo> BuildModuleFieldCache()
        {
            var modulesFieldsInfo = CachedUtils.GetCacheOf <ModuleFieldInfo>(ServerCachedHashInfo.ModuleFieldsInfoHash);

            if (modulesFieldsInfo == null)
            {
                using (var ctrlSA = new SAController())
                {
                    List <ModuleFieldInfo> tempModuleFields;
                    var startRow = 0;
                    modulesFieldsInfo = new List <ModuleFieldInfo>();
                    do
                    {
                        ctrlSA.ListModuleField(out tempModuleFields, out startRow, startRow);
                        modulesFieldsInfo.AddRange(tempModuleFields.ToArray());
                    }while (tempModuleFields.Count != 0);
                }
                CachedUtils.SetCacheOf(modulesFieldsInfo, ServerCachedHashInfo.ModuleFieldsInfoHash);
            }


            return(modulesFieldsInfo);
        }
Example #8
0
        private void _LoginToSystem(Session session)
        {
            App.Environment.ClientInfo.SessionKey = session.SessionKey;
            App.Environment.ClientInfo.UserName   = session.Username;

            App.Environment.GetCurrentUserProfile();
            CachedUtils.SetCacheOf(new List <ClientInfo> {
                App.Environment.ClientInfo
            }, "LastSession");

#if DEBUG
            App.Environment.InitializeEnvironment();
#endif

            using (var ctrlSA = new SAController())
            {
                ctrlSA.ListCurrentRoles(out m_Roles);
            }

            ((IMain)m_mainForm).ApplyMenu();
            ((IMain)m_mainForm).StartupModules();

            Program.blLogin = false;
        }