Beispiel #1
0
 public ActionResult SaveDefaultSetting(Setting setting)
 {
     if (setting.Id == null || setting.Id == Guid.Empty)
     {
         var newItem = settingService.Add(setting);
         return Json(new JsonData() { Data = newItem, Success = true }, JsonRequestBehavior.AllowGet);
     }
     else
     {
         var update = settingService.Update(setting);
         return Json(new JsonData() { Data = update, Success = true }, JsonRequestBehavior.AllowGet);
     }
 }
Beispiel #2
0
 public Setting Update(Setting packageItem)
 {
     var updateItem = settingRepository.Update(packageItem);
     return updateItem;
 }
Beispiel #3
0
 public Setting Add(Setting packageItem)
 {
     packageItem.Id = Guid.NewGuid();
     var newItem = settingRepository.Add(packageItem);
     return newItem;
 }