Пример #1
0
 public void Save(MasterLocationType data)
 {
     if (data.LocationTypeId == 0)
     {
         var institutionId = _securityService.GetCurrentInstitutionId();
         data.InstitutionId = institutionId;
     }
     _locationTypeRepository.Save(data);
     _locationTypeRepository.Commit();
 }
Пример #2
0
 public IHttpActionResult Delete(MasterLocationType data)
 {
     if (!ModelState.IsValid)
     {
         return(BadRequest(ModelState));
     }
     try
     {
         _locationTypeService.Delete(data);
         return(Ok());
     }
     catch (Exception ex)
     {
         return(BadRequest(ex.Message));
     }
 }
Пример #3
0
 public void Delete(MasterLocationType data)
 {
     _locationTypeRepository.Delete(data);
     _locationTypeRepository.Commit();
 }