public ActionResult LoadGrid() { var model = _factory.GetList(); model.ForEach(x => { x.sStatus = x.IsActive ? "Kích hoạt" : "Chưa kích hoạt"; }); return(PartialView("_ListData", model)); }
public List <SelectListItem> GetListRoleSelectItem() { var _factory = new CMSRoleFactory(); List <SelectListItem> data = null; var listCate = _factory.GetList(); if (listCate != null) { data = listCate.Select(x => new SelectListItem { Value = x.Id, Text = x.Name, }).ToList(); } return(data); }