public JsonResult EditMeterManufacturer(MeterManufacturer meterManufacturer)
 {
     if (meterManufacturer != null)
     {
         _meterManufacturerService.Update(meterManufacturer);
         return Json(true);
     }
     return Json(false);
 }
 public JsonResult AddMeterManufacturer(MeterManufacturer MeterManufacturer)
 {
     if (MeterManufacturer != null)
     {
         MeterManufacturer.Id = Guid.NewGuid();
         _meterManufacturerService.Add(MeterManufacturer);
         return Json(true);
     }
     return Json(false);
 }
 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);
     }
 }
Esempio n. 4
0
 public MeterManufacturer Update(MeterManufacturer meterManufacturer)
 {
     meterManufacturerRepository.Update(meterManufacturer);
     return meterManufacturer;
 }
Esempio n. 5
0
 public MeterManufacturer Add(MeterManufacturer meterManufacturer)
 {
     meterManufacturerRepository.Add(meterManufacturer);
     return meterManufacturer;
 }