public JsonResult AddSection(Section section) { try { _portfolioService.AddSection(section); } catch { return Json(false); } return Json(true); }
public JsonResult GetSectionById(int id) { var section = _portfolioService.GetSectionById(id); Section sectionReturn = new Section(); if (section != null) { sectionReturn.Id = section.Id; sectionReturn.Description = section.Description; sectionReturn.SectionName = section.SectionName; sectionReturn.SectionType = section.SectionType; } return Json(sectionReturn, JsonRequestBehavior.AllowGet); }
public void AddSection(Section section) { _sectionRepository.Add(section); }
public JsonResult DeleteSection(Section section) { try { _portfolioService.RemoveSection(section.Id); } catch { return Json(false); } return Json(true); }
public void UpdateSection(Section section) { _sectionRepository.AddOrUpdate(section); }