Exemple #1
0
        public List <MasterEmailCategorySettingsModel> GetEmailCategoryList(BaseViewModel model)
        {
            List <Master_EmailCategorySettings>     dataList;
            List <MasterEmailCategorySettingsModel> CategoryList  = new List <MasterEmailCategorySettingsModel>();
            MasterEmailCategorySettingsModel        CategoryModel = new MasterEmailCategorySettingsModel();

            dataList = _templateRepository.GetEmailCategoryList();
            if (dataList != null)
            {
                foreach (Master_EmailCategorySettings a in dataList)
                {
                    CategoryModel = Mapper.Map <Master_EmailCategorySettings, MasterEmailCategorySettingsModel>(a);

                    CategoryModel.Name = Utility.GetPropertyValue(CategoryModel, "Name", model.CurrentCulture) == null ? string.Empty :
                                         Utility.GetPropertyValue(CategoryModel, "Name", model.CurrentCulture).ToString();

                    CategoryModel.CurrentUserID  = model.CurrentUserID;
                    CategoryModel.CurrentCulture = model.CurrentCulture;
                    CategoryList.Add(CategoryModel);
                }
            }
            return(CategoryList);
        }