コード例 #1
0
ファイル: MemoryData.cs プロジェクト: SangDD/Legaltech
        public static void GetCache_represent()
        {
            try
            {
                //BussinessFacade.ModuleUsersAndRoles.UserBL _UserBL = new BussinessFacade.ModuleUsersAndRoles.UserBL();
                //List<UserInfo> _lstUsersAdmin = _UserBL.GetUserByType(3);
                //_lstUsersAdmin = _lstUsersAdmin.FindAll(x => x.Is_Agent == 1).ToList();
                //lstCache_Represent = new List<CustomerSuggestInfo>();

                //foreach (var item in _lstUsersAdmin)
                //{
                //    CustomerSuggestInfo pInfo = new CustomerSuggestInfo();

                //    pInfo.label = item.FullName + " Phone: " + item.Phone + " Fax: " + item.Fax + " Email: " + item.Email + " Mã đại diện: " + item.Customer_Code;
                //    pInfo.value = item.FullName + "|" + item.Address + "|" + item.Phone + "|" + item.Fax + "|" + item.Email + "|" + item.Customer_Code;
                //    pInfo.name = item.FullName + " Phone: " + item.Phone + " Fax: " + item.Fax + " Email: " + item.Email + item.Country;
                //    pInfo.Language = item.Language;

                //    lstCache_Represent.Add(pInfo);
                //}

                AppDDSHCN_BL         _obj_bl       = new AppDDSHCN_BL();
                decimal              _total_record = 0;
                List <AppDDSHCNInfo> _lst          = _obj_bl.AppDDSHCNGetAll("", "", 0, 0, ref _total_record);
                lstChuDDSHCN       = new List <CustomerSuggestInfo>();
                lstCache_Represent = new List <CustomerSuggestInfo>();
                foreach (var item in _lst)
                {
                    CustomerSuggestInfo pInfo = new CustomerSuggestInfo();
                    pInfo.label = item.Name_Vi + " Phone: " + item.Phone + " Fax: " + item.Fax + " Email: " + item.Email + " Mã đại diện: " + item.MaNguoiDaiDien;
                    pInfo.value = item.Name_Vi + "|" + item.Address_Vi + "|" + item.Phone + "|" + item.Fax + "|" + item.Email + "|" + item.MaNguoiDaiDien
                                  + "|" + item.Country_Nationality.ToString() + "|" + item.Country_Residence.ToString() + "|" + item.Country_Incorporation.ToString();
                    pInfo.name = item.Name_Vi + " Phone: " + item.Phone + " Fax: " + item.Fax + " Email: " + item.Email + item.Country;
                    lstChuDDSHCN.Add(pInfo);

                    lstCache_Represent.Add(pInfo);
                }
            }
            catch (Exception ex)
            {
                Logger.LogException(ex);
            }
        }
コード例 #2
0
ファイル: MemoryData.cs プロジェクト: SangDD/Legaltech
 public static void GetCacheDDSHCN()
 {
     try
     {
         lstChuDDSHCN.Clear();
         AppDDSHCN_BL         _obj_bl       = new AppDDSHCN_BL();
         decimal              _total_record = 0;
         CustomerSuggestInfo  pInfo;
         List <AppDDSHCNInfo> _lst = _obj_bl.AppDDSHCNGetAll("", "", 0, 0, ref _total_record);
         foreach (var item in _lst)
         {
             pInfo       = new CustomerSuggestInfo();
             pInfo.label = item.Name_Vi + ", " + item.Address_Vi;
             pInfo.value = item.Name_Vi + "|" + item.Address_Vi + "|" + item.Phone + "|" + item.Fax + "|" + item.Email + "|" + item.NguoiDDSH + "|" + item.MaNguoiDaiDien;
             pInfo.name  = item.Name_Vi + ", " + item.Address_Vi;
             lstChuDDSHCN.Add(pInfo);
         }
     }
     catch (Exception ex)
     {
         Logger.LogException(ex);
     }
 }
コード例 #3
0
ファイル: MemoryData.cs プロジェクト: SangDD/Legaltech
        public static void LoadAllMemoryData()
        {
            try
            {
                // dangtq thêm thông tin fee tĩnh theo đơn
                LoadSys_App_Fee_Fix();

                // DANGTQ load fee cho seach
                LoadSys_Search_Fee_Fix();

                LoadTemplate();

                AppDocumentBL _AppDocumentBL = new AppDocumentBL();
                c_lstSys_Document = _AppDocumentBL.Sys_Document_GetAll();

                #region Allcode
                c_hs_Allcode.Clear();
                AllCodeBL          _AllCodeBL = new AllCodeBL();
                List <AllCodeInfo> _lst_al    = _AllCodeBL.AllCode_Gets_List();

                if (_lst_al.Count > 0)
                {
                    foreach (AllCodeInfo item in _lst_al)
                    {
                        if (c_hs_Allcode.ContainsKey(item.CdName + "|" + item.CdType) == false)
                        {
                            List <AllCodeInfo> _lst = new List <AllCodeInfo>
                            {
                                item
                            };
                            c_hs_Allcode[item.CdName + "|" + item.CdType] = _lst;
                        }
                        else
                        {
                            List <AllCodeInfo> _lst = (List <AllCodeInfo>)c_hs_Allcode[item.CdName + "|" + item.CdType];
                            _lst.Add(item);
                        }
                    }
                }

                AllCodeBL.LoadAllCodeToMemory();


                #endregion

                List <Injection_Info> _lst_injection = AllCodeBL.Get_All_Injection();
                foreach (var item in _lst_injection)
                {
                    Common.c_dic_Injection[item.Key.ToUpper()] = item.Key;
                }

                ReloadGroup();

                ReloadCountry();
                MenuBL.LoadAllMenuToMemory();
                FunctionBL.LoadFunctionCollectionsToMemory();
                SysApplicationBL.SysApplicationAllOnMem();
                //Load lên mem
                clstAppClass = AppClassInfoBL.AppClassGetOnMem();

                foreach (var item in clstAppClass)
                {
                    CustomerSuggestInfo pinfo = new CustomerSuggestInfo();

                    pinfo.label = item.Name_Vi;
                    pinfo.name  = item.Name_Vi;

                    pinfo.label_en = item.Name_En;
                    pinfo.name_en  = item.Name_En;
                    if (!string.IsNullOrEmpty(item.Code))
                    {
                        if (item.Code.Length > 2)
                        {
                            //pinfo.value = item.Code.Substring(0, 2);
                            pinfo.value = item.Group_Code;
                        }
                        else
                        {
                            pinfo.value = item.Code;
                        }
                    }
                    clstAppClassSuggest.Add(pinfo);
                }
                //lấy toàn bộ thông tin đơn lên mem, đang đọc toàn bộ cả anh cả việt.
                GetCacheCustomerInfo();

                GetCache_represent();

                GetCacheDDSHCN();

                // load thông tin page
                Load_Sys_page();

                Logger.LogInfo("Load memory sucess MemoryData.c_dic_FeeByApp_Fix count " + MemoryData.c_dic_FeeByApp_Fix.Count);
            }
            catch (Exception ex)
            {
                Logger.LogException(ex);
            }
        }
コード例 #4
0
ファイル: MemoryData.cs プロジェクト: SangDD/Legaltech
        public static void GetCacheCustomerInfo()
        {
            try
            {
                lstCacheCustomer.Clear();
                lstCacheCustomer1.Clear();
                lstCacheCustomer2.Clear();
                lstCacheCustomer3.Clear();
                lstCacheCustomer4.Clear();
                CustomerSuggestInfo pInfo; CustomerSuggestInfo pInfo1; CustomerSuggestInfo pInfo2; CustomerSuggestInfo pInfo3;
                CustomerSuggestInfo pInfo4;
                CustomerSuggestInfo pInfo5;
                var objAppHeaderBL = new Application_Header_BL();
                var list           = objAppHeaderBL.LayThongTinKhachHang("", "", "");
                foreach (var item in list)
                {
                    pInfo  = new CustomerSuggestInfo();
                    pInfo1 = new CustomerSuggestInfo();

                    pInfo.label    = item.Master_Name + " Phone: " + item.Master_Phone + " Fax: " + item.Master_Fax + " Email: " + item.Rep_Master_Email;
                    pInfo.value    = item.Master_Name + "|" + item.Master_Address + "|" + item.Master_Phone + "|" + item.Master_Fax + "|" + item.Rep_Master_Email;
                    pInfo.name     = item.Master_Name + " Phone: " + item.Master_Phone + " Fax: " + item.Master_Fax + " Email: " + item.Rep_Master_Email;
                    pInfo.Language = item.Language;

                    pInfo1.label    = item.Cdk_Name_1 + " Phone: " + item.Cdk_Phone_1 + " Fax: " + item.Cdk_Fax_1 + " Email: " + item.Cdk_Email_1;
                    pInfo1.value    = item.Cdk_Name_1 + "|" + item.Cdk_Address_1 + "|" + item.Cdk_Phone_1 + "|" + item.Cdk_Fax_1 + "|" + item.Cdk_Email_1;
                    pInfo1.name     = item.Cdk_Name_1 + " Phone: " + item.Cdk_Phone_1 + " Fax: " + item.Cdk_Fax_1 + " Email: " + item.Cdk_Email_1;
                    pInfo1.Language = item.Language;

                    pInfo2          = new CustomerSuggestInfo();
                    pInfo2.label    = item.Cdk_Name_2 + " Phone: " + item.Cdk_Phone_2 + " Fax: " + item.Cdk_Fax_2 + " Email: " + item.Cdk_Email_2;
                    pInfo2.value    = item.Cdk_Name_2 + "|" + item.Cdk_Address_2 + "|" + item.Cdk_Phone_2 + "|" + item.Cdk_Fax_2 + "|" + item.Cdk_Email_2;
                    pInfo2.name     = item.Cdk_Name_2 + " Phone: " + item.Cdk_Phone_2 + " Fax: " + item.Cdk_Fax_2 + " Email: " + item.Cdk_Email_2;
                    pInfo2.Language = item.Language;
                    pInfo3          = new CustomerSuggestInfo();
                    pInfo3.label    = item.Cdk_Name_3 + " Phone: " + item.Cdk_Phone_3 + " Fax: " + item.Cdk_Fax_3 + " Email: " + item.Cdk_Email_3;
                    pInfo3.value    = item.Cdk_Name_3 + "|" + item.Cdk_Address_3 + "|" + item.Cdk_Phone_3 + "|" + item.Cdk_Fax_3 + "|" + item.Cdk_Email_3;
                    pInfo3.name     = item.Cdk_Name_3 + " Phone: " + item.Cdk_Phone_3 + " Fax: " + item.Cdk_Fax_3 + " Email: " + item.Cdk_Email_3;
                    pInfo3.Language = item.Language;
                    pInfo4          = new CustomerSuggestInfo();
                    pInfo4.label    = item.Cdk_Name_4 + " Phone: " + item.Cdk_Phone_4 + " Fax: " + item.Cdk_Fax_4 + " Email: " + item.Cdk_Email_4;
                    pInfo4.value    = item.Cdk_Name_4 + "|" + item.Cdk_Address_4 + "|" + item.Cdk_Phone_4 + "|" + item.Cdk_Fax_4 + "|" + item.Cdk_Email_4;
                    pInfo4.name     = item.Cdk_Name_4;

                    pInfo4.Language = item.Language;
                    pInfo5          = new CustomerSuggestInfo();
                    pInfo5.label    = item.Rep_Master_Name + " Phone: " + item.Rep_Master_Phone + " Fax: " + item.Rep_Master_Fax + " Email: " + item.Rep_Master_Email;
                    pInfo5.value    = item.Rep_Master_Name + "|" + item.Rep_Master_Address + "|" + item.Rep_Master_Phone + "|" + item.Rep_Master_Fax + "|" + item.Rep_Master_Email;
                    pInfo5.name     = item.Rep_Master_Name + " Phone: " + item.Rep_Master_Phone + " Fax: " + item.Rep_Master_Fax + " Email: " + item.Rep_Master_Email;
                    pInfo5.Language = item.Language;
                    lstCacheCustomer.Add(pInfo);
                    if (!string.IsNullOrEmpty(item.Cdk_Name_1))
                    {
                        lstCacheCustomer1.Add(pInfo1);
                    }
                    if (!string.IsNullOrEmpty(item.Cdk_Name_2))
                    {
                        lstCacheCustomer2.Add(pInfo2);
                    }
                    if (!string.IsNullOrEmpty(item.Cdk_Name_3))
                    {
                        lstCacheCustomer3.Add(pInfo3);
                    }
                    if (!string.IsNullOrEmpty(item.Cdk_Name_4))
                    {
                        lstCacheCustomer4.Add(pInfo4);
                    }
                    if (!string.IsNullOrEmpty(item.Rep_Master_Name))
                    {
                        lstCacheRefCustomer.Add(pInfo5);
                    }
                }
            }
            catch (Exception ex)
            {
                Logger.LogException(ex);
            }
        }