public CMSGroupBoardsController() { _factory = new CMSGroupBoardFactory(); _keyBoa = new CMSBoardFactory(); ListItem = new List <string>(); ListItem = _factory.GetList().Select(o => o.Name).ToList(); }
public CMS_GroupBoardsModels GetDetail(string id) { try { using (var _db = new CMS_Context()) { /* get all key word */ var data = _db.CMS_GroupBoard.Where(o => o.Status == (byte)Commons.EStatus.Active && o.ID == id).Select(o => new CMS_GroupBoardsModels() { Id = o.ID, Sequence = o.Sequence, Name = o.Name, UpdatedDate = o.UpdatedDate, CreatedDate = o.CreatedDate }).FirstOrDefault(); /* update quantity */ CMSBoardFactory groupFac = new CMSBoardFactory(); data.ListBoardOnGroup = groupFac.GetList(id); return(data); } } catch (Exception ex) { } return(null); }
public CMSBoardsController() { _factory = new CMSBoardFactory(); _facAcc = new CMSAccountFactory(); ListItem = new List <string>(); ListItem = _factory.GetList().Select(o => o.url).ToList(); ViewBag.ListGroupBoard = getListGroupBoards(); }
public List <string> getListBoardByGroud(string GroupId) { var _fac = new CMSBoardFactory(); var data = _fac.GetList(GroupId); var lstString = new List <string>(); if (data != null && data.Any()) { foreach (var item in data) { lstString.Add(item.id); } } return(lstString); }
public List <SelectListItem> getListBoard() { var _fac = new CMSBoardFactory(); var data = _fac.GetList(); var lstKeyword = new List <SelectListItem>(); if (data != null && data.Any()) { foreach (var item in data) { lstKeyword.Add(new SelectListItem { Value = item.id, Text = item.name }); } } return(lstKeyword); }
public CMSProductsController() { _fac = new CMSPinFactory(); _facBoard = new CMSBoardFactory(); }