public static SectionModel ToSectionModel(this BllSection bllSection) { return(new SectionModel() { Id = bllSection.Id, Name = bllSection.Name }); }
public ActionResult _Topics(int id, int?page) { ViewBag.IsShowStatus = false; BllSection section = sectionService.GetSection(id); return(PartialView(this.GetItemsOnPage(section.Topics, page, TOPICS_PER_PAGE) .Select(bllTopic => bllTopic.ToTopicListModel()))); }
public static DalSection ToDalSection(this BllSection bllSection) { return(new DalSection() { Id = bllSection.Id, Name = bllSection.Name }); }
public void UpdateSection(BllSection section) { try { sectionRepository.Update(section.ToDalSection()); } catch (InvalidOperationException e) { logger.Warn(e.Message); throw; } }
public ActionResult TopicsInSection(int id, int?page) { ViewBag.AjaxId = id; ViewBag.IsShowStatus = false; ViewBag.SectionId = id; BllSection section = sectionService.GetSection(id); section.Topics = section.Topics.Where(t => t.Status.Id == (int)StatusEnum.Accepted); return(View("Topics", this.GetItemsOnPage(section.Topics, page, TOPICS_PER_PAGE) .Select(bllTopic => bllTopic.ToTopicListModel()))); }