Ejemplo n.º 1
0
 public void AddCityStateZipToFacility(Guid facilityGuid, Guid cityStateZipGuid)
 {
     try
     {
         BE.FacilityLocationCriteria joinRowToAdd = new BE.FacilityLocationCriteria(facilityGuid, cityStateZipGuid);
         BL.FacilityLocationCriteriaLogic joinLogic = new BL.FacilityLocationCriteriaLogic();
         joinLogic.InsertFacilityLocationCriteria(joinRowToAdd);
     }
     catch (Exception ex)
     {
         FC.FacilityLocationCriteriaFault fault = new FC.FacilityLocationCriteriaFault();
         fault.FacilityGuid = facilityGuid;
         fault.CityStateZipGuid = cityStateZipGuid;
         fault.ErrorMessage = String.Format("Unable to insert cityStateZip '{0}' into facility '{1}'.",
             cityStateZipGuid, facilityGuid);
         throw new FaultException<FC.FacilityLocationCriteriaFault>(fault,
             new FaultReason(ex.Message));
     }
 }
Ejemplo n.º 2
0
 public void InsertFacilityLocationCriteria(DC.FacilityLocationCriteria request)
 {
     try
     {
         BL.FacilityLocationCriteriaLogic facilityLocationCriteriaLogic = new BL.FacilityLocationCriteriaLogic();
         BE.FacilityLocationCriteria entity = request.ToBusinessEntity();
         facilityLocationCriteriaLogic.InsertFacilityLocationCriteria(entity);
     }
     catch (BE.FacilityLocationCriteriaAlreadyExistsException ex)
     {
         FC.DefaultFaultContract fault = new FC.DefaultFaultContract();
         fault.ErrorMessage = String.Format("Unable to insert FacilityLocationCriteria data for FacilityGuid '{0}' and CityStateZipGuid '{1}'.",
             request.FacilityGuid.ToString(), request.CityStateZipGuid.ToString());
         throw new FaultException<FC.DefaultFaultContract>(fault,
             new FaultReason(ex.Message));
     }
 }