Esempio n. 1
0
 public JsonResult AddSection(Section section)
 {
     try
     {
         _portfolioService.AddSection(section);
     }
     catch
     {
         return Json(false);
     }
     return Json(true);
 }
Esempio n. 2
0
 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);
 }
Esempio n. 3
0
 public void AddSection(Section section)
 {
     _sectionRepository.Add(section);
 }
Esempio n. 4
0
 public JsonResult DeleteSection(Section section)
 {
     try
     {
         _portfolioService.RemoveSection(section.Id);
     }
     catch
     {
         return Json(false);
     }
     return Json(true);
 }
Esempio n. 5
0
 public void UpdateSection(Section section)
 {
     _sectionRepository.AddOrUpdate(section);
 }