public static void GetAllCultureObject() { UnitOfWork unitOfWork = new UnitOfWork(); CultureInformationBusiness CultureInfoBusiness = new CultureInformationBusiness(unitOfWork); List <ErucaCRM.Domain.CultureInformationModel> listCultureInformationModel = CultureInfoBusiness.LoadAllUserCultures(); for (int i = 0; i < listCultureInformationModel.Count; i++) { XmlDocument xmlDocCulture = new XmlDocument(); if (!string.IsNullOrEmpty(listCultureInformationModel[i].LabelsXML)) { xmlDocCulture.LoadXml(listCultureInformationModel[i].LabelsXML); } objCultureInformation.Add(listCultureInformationModel[i].CultureName, xmlDocCulture); } }
/// <summary> /// Application will load all cultures on start of application /// </summary> private void LoadAllUserCultures() { IUnitOfWork unitOfWork = new UnitOfWork(); ICultureInformationBusiness CultureInfoBusiness = new CultureInformationBusiness(unitOfWork); List <ErucaCRM.Domain.CultureInformationModel> listCultureInformationModel = CultureInfoBusiness.LoadAllUserCultures(); for (int i = 0; i < listCultureInformationModel.Count; i++) { if (listCultureInformationModel[i].IsDefault == true) { ErucaCRM.Utility.CultureInformationManagement.ApplicationDefaultCulture = listCultureInformationModel[i].CultureName; } ErucaCRM.Utility.CultureInformationManagement.SetCultureObject(listCultureInformationModel[i].CultureName, listCultureInformationModel[i].LabelsXML); } }