예제 #1
0
        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));
        }
예제 #2
0
        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);
        }