コード例 #1
0
 public JsonResult EditMeterManufacturer(MeterManufacturer meterManufacturer)
 {
     if (meterManufacturer != null)
     {
         _meterManufacturerService.Update(meterManufacturer);
         return Json(true);
     }
     return Json(false);
 }
コード例 #2
0
 public JsonResult AddMeterManufacturer(MeterManufacturer MeterManufacturer)
 {
     if (MeterManufacturer != null)
     {
         MeterManufacturer.Id = Guid.NewGuid();
         _meterManufacturerService.Add(MeterManufacturer);
         return Json(true);
     }
     return Json(false);
 }
コード例 #3
0
 public JsonResult DeleteMeterManufacturer(MeterManufacturer meterManufacturer)
 {
     try
     {
         if (meterManufacturer != null)
         {
             _meterManufacturerService.Remove(meterManufacturer.Id);
             return Json(true);
         }
         return Json(false);
     }
     catch (Exception ex)
     {
         return Json(false);
     }
 }
コード例 #4
0
 public MeterManufacturer Update(MeterManufacturer meterManufacturer)
 {
     meterManufacturerRepository.Update(meterManufacturer);
     return meterManufacturer;
 }
コード例 #5
0
 public MeterManufacturer Add(MeterManufacturer meterManufacturer)
 {
     meterManufacturerRepository.Add(meterManufacturer);
     return meterManufacturer;
 }