public void UpdateFacilityWithOffering(DC.FacilityWithOffering request) { try { BL.FacilityWithOfferingLogic facilityWithOfferingLogic = new BL.FacilityWithOfferingLogic(); BE.FacilityWithOffering entity = request.ToBusinessEntity(); facilityWithOfferingLogic.UpdateFacilityWithOffering(entity); } catch (BE.FacilityOfferingNotFoundException ex) { FC.DefaultFaultContract fault = new FC.DefaultFaultContract(); fault.ErrorMessage = String.Format("Unable to update FacilityWithOffering data for person '{0}' and '{1}'.", request.FacilityGuid.ToString(), request.Offering_OfferingGuid.ToString()); throw new FaultException<FC.DefaultFaultContract>(fault, new FaultReason(ex.Message)); } }
public List<DC.FacilityWithOffering> GetFacilityWithOfferingByOfferingGuid(Guid taskGuid) { try { BL.FacilityWithOfferingLogic facilityWithOfferingLogic = new BL.FacilityWithOfferingLogic(); List<BE.FacilityWithOffering> entities = facilityWithOfferingLogic.GetFacilityWithOfferingByOfferingGuid(taskGuid); List<DC.FacilityWithOffering> response = entities.ToDataContractList(); return response; } catch (Exception ex) { FC.FacilityOfferingFault fault = new FC.FacilityOfferingFault(); fault.ErrorMessage = "Unable to retrieve FacilityWithOffering data."; throw new FaultException<FC.FacilityOfferingFault>(fault, new FaultReason(ex.Message)); } }