Пример #1
0
 public void DeleteFacilityLocationCriteria(DC.FacilityLocationCriteria request)
 {
     try
     {
         BL.FacilityLocationCriteriaLogic facilityLocationCriteriaLogic = new BL.FacilityLocationCriteriaLogic();
         BE.FacilityLocationCriteria entity = request.ToBusinessEntity();
         facilityLocationCriteriaLogic.DeleteFacilityLocationCriteria(entity);
     }
     catch (BE.FacilityLocationCriteriaNotFoundException ex)
     {
         FC.DefaultFaultContract fault = new FC.DefaultFaultContract();
         fault.ErrorMessage = String.Format("Unable to delete FacilityLocationCriteria data for FacilityGuid '{0}' and CityStateZipGuid '{1}'.",
             request.FacilityGuid.ToString(), request.CityStateZipGuid.ToString());
         throw new FaultException<FC.DefaultFaultContract>(fault,
             new FaultReason(ex.Message));
     }
 }
Пример #2
0
 public void DeleteCityStateZipFromFacility(Guid facilityGuid, Guid cityStateZipGuid)
 {
     try
     {
         BE.FacilityLocationCriteria joinRowToDelete = new BE.FacilityLocationCriteria(facilityGuid, cityStateZipGuid);
         BL.FacilityLocationCriteriaLogic joinLogic = new BL.FacilityLocationCriteriaLogic();
         joinLogic.DeleteFacilityLocationCriteria(joinRowToDelete);
     }
     catch (Exception ex)
     {
         FC.FacilityLocationCriteriaFault fault = new FC.FacilityLocationCriteriaFault();
         fault.FacilityGuid = facilityGuid;
         fault.CityStateZipGuid = cityStateZipGuid;
         fault.ErrorMessage = String.Format("Unable to remove cityStateZip '{0}' from facility '{1}'.",
             cityStateZipGuid, facilityGuid);
         throw new FaultException<FC.FacilityLocationCriteriaFault>(fault,
             new FaultReason(ex.Message));
     }
 }