public AddProcessModel(string pAjaxAction, string bifurcateProcess_id) { ajaxAction = pAjaxAction; this.bifurcateProcess_id = bifurcateProcess_id; categoriesList = categorieProvider.getCategories().Result; List <SelectListItem> categoriesSelectList = new List <SelectListItem>(); foreach (CategorieDTO iCategorie in categoriesList) { categoriesSelectList.Add(new SelectListItem { Text = iCategorie.name, Value = iCategorie.id_categorie }); } _CategoriesSelect = new SelectList(categoriesSelectList, "Value", "Text"); if (categoriesList.Count > 0) { templatesList = templatesProvider.getTemplatesByCategorie(categoriesList[0].id_categorie).Result; } List <SelectListItem> templatesSelectList = new List <SelectListItem>(); foreach (TemplateDTO iTemmplate in templatesList) { templatesSelectList.Add(new SelectListItem { Text = iTemmplate.name, Value = iTemmplate.id_processManagment }); } _TemplatesSelect = new SelectList(templatesSelectList, "Value", "Text"); }
public AddTemplateModel() { categoriesList = categorieProvider.getCategories().Result; List <SelectListItem> categoriesSelectList = new List <SelectListItem>(); foreach (CategorieDTO iCategorie in categoriesList) { categoriesSelectList.Add(new SelectListItem { Text = iCategorie.name, Value = iCategorie.id_categorie }); } _CategoriesSelect = new SelectList(categoriesSelectList, "Value", "Text"); }
public CategoriesListModel() { categoriesList = categorieProvider.getCategories().Result; }