public List<BE.Facility> GetAllFacilityFilter(BE.CityStateZip csz, IEnumerable<BE.Offering> offerings, bool wideSearch, int page, int pageSize, out int totalCount) { DA.FacilityGateway gateway = new DA.FacilityGateway(); return gateway.GetAllFilter( csz.ToDataEntity(), offerings.ToDataEntitiesList(), wideSearch, page, pageSize, out totalCount) .ToBusinessEntitiesList(); }
public BE.FacilityLocationCriteria InsertFacilityLocationCriteria(BE.FacilityLocationCriteria entity) { //@@NEW - remove try/catch. insert returns DA entity (with new data). this method now returns an entity. DA.FacilityLocationCriteriaGateway gateway = new DA.FacilityLocationCriteriaGateway(); DA.FacilityLocationCriteria result = gateway.Insert(entity.ToDataEntity()); return result.ToBusinessEntity(); }
public BE.FacilityPhoto InsertFacilityPhoto(BE.FacilityPhoto entity) { //@@NEW - removed try/catch. insert returns DA entity (with new data). this method now returns an entity. DA.FacilityPhotoGateway gateway = new DA.FacilityPhotoGateway(); DA.FacilityPhoto result = gateway.Insert(entity.ToDataEntity()); return result.ToBusinessEntity(); }
public BE.ClientAudit InsertClientAudit(BE.ClientAudit entity) { //@@NEW - removed try/catch. insert returns DA entity (with new data). this method now returns an entity. DA.ClientAuditGateway gateway = new DA.ClientAuditGateway(); DA.ClientAudit result = gateway.Insert(entity.ToDataEntity()); return result.ToBusinessEntity(); }
public List<BE.Facility> GetAllFacilityByDistance(BE.DistanceParameters parameters, int page, int pageSize, out int totalCount) { DA.FacilityGateway gateway = new DA.FacilityGateway(); return gateway.GetAllByDistance( new DA.DAEntities.LatLng(parameters.Latitude, parameters.Longitude), parameters.DistanceRadius, page, pageSize, out totalCount).ToBusinessEntitiesList(); }
public List<BE.Facility> GetAllFacilityByDistanceFilter(BE.DistanceParameters parameters, IEnumerable<BE.Offering> offerings, bool wideSearch, int page, int pageSize, out int totalCount) { DA.FacilityGateway gateway = new DA.FacilityGateway(); return gateway.GetAllByDistanceFilter(offerings.ToDataEntitiesList(), new DA.DAEntities.LatLng(parameters.Latitude, parameters.Longitude), parameters.DistanceRadius, wideSearch, page, pageSize, out totalCount).ToBusinessEntitiesList(); }
public BE.Offering InsertOffering(BE.Offering entity) { //@@NEW - removed try/catch. insert returns DA entity (with new data). this method now returns an entity. DA.OfferingGateway gateway = new DA.OfferingGateway(); DA.Offering result = gateway.Insert(entity.ToDataEntity()); return result.ToBusinessEntity(); }
public void UpdateFacilityWithOffering(BE.FacilityWithOffering request) { DA.FacilityWithOfferingGateway gateway = new DA.FacilityWithOfferingGateway(); try { gateway.Update(request); } catch (Exception ex) { throw ex; } }
public void DeleteClick(BE.Click entity) { try { DA.ClickGateway gateway = new DA.ClickGateway(); gateway.Delete(entity.ClickGuid); } catch (Exception ex) { throw ex; } }
public void UpdateFacilityWithCityStateZip(BE.FacilityWithCityStateZip request) { DA.FacilityWithCityStateZipGateway gateway = new DA.FacilityWithCityStateZipGateway(); try { gateway.Update(request); } catch (Exception ex) { throw ex; } }
public void UpdateOfferingWithFacility(BE.OfferingWithFacility request) { DA.OfferingWithFacilityGateway gateway = new DA.OfferingWithFacilityGateway(); try { gateway.Update(request); } catch (Exception ex) { throw ex; } }
public void UpdateCityStateZipWithFacility(BE.CityStateZipWithFacility request) { DA.CityStateZipWithFacilityGateway gateway = new DA.CityStateZipWithFacilityGateway(); try { gateway.Update(request); } catch (Exception ex) { throw ex; } }
public void UpdatePaymentInfo(BE.PaymentInfo entity) { //@@NEW // Update the main record. DA.PaymentInfoGateway gateway = new DA.PaymentInfoGateway(); gateway.Update(entity.ToDataEntity()); // Create the audit record. PaymentInfoAuditLogic auditLogic = new PaymentInfoAuditLogic(); auditLogic.InsertPaymentInfoAudit(entity); }
public void DeletePaymentInfo(BE.PaymentInfo entity) { //@@NEW // Delete the main record. DA.PaymentInfoGateway gateway = new DA.PaymentInfoGateway(); gateway.Delete(entity.PaymentInfoGuid); // Create the audit record. PaymentInfoAuditLogic auditLogic = new PaymentInfoAuditLogic(); auditLogic.InsertPaymentInfoAudit(entity); }
public void DeleteClient(BE.Client entity) { // Delete the main record. DA.ClientGateway gateway = new DA.ClientGateway(); gateway.Delete(entity.ClientGuid); //@@NEW // Create the audit record. ClientAuditLogic auditLogic = new ClientAuditLogic(); auditLogic.InsertClientAudit(entity); }
public void DeleteFacility(BE.Facility entity) { // Delete the main record. DA.FacilityGateway gateway = new DA.FacilityGateway(); gateway.Delete(entity.FacilityGuid); //@@NEW // Create the audit record. FacilityAuditLogic auditLogic = new FacilityAuditLogic(); auditLogic.InsertFacilityAudit(entity); }
public BE.PaymentInfo InsertPaymentInfo(BE.PaymentInfo entity) { //@@NEW - removed try/catch. insert returns DA entity (with new data). this method now returns an entity. DA.PaymentInfoGateway gateway = new DA.PaymentInfoGateway(); DA.PaymentInfo result = gateway.Insert(entity.ToDataEntity()); // Create the audit record. PaymentInfoAuditLogic auditLogic = new PaymentInfoAuditLogic(); auditLogic.InsertPaymentInfoAudit(result.ToBusinessEntity()); return result.ToBusinessEntity(); }
//@@NEW - new method. public BE.PaymentInfoAudit InsertPaymentInfoAudit(BE.PaymentInfo entity) { // Create the audit record. BE.PaymentInfoAudit audit = new BE.PaymentInfoAudit(entity); // Insert the audit record. BE.PaymentInfoAudit result = InsertPaymentInfoAudit(audit); if (Guid.Empty == result.PaymentInfoAuditGuid) throw new BE.PaymentInfoAuditException("PaymentInfo Audit record was not inserted.", audit); return result; }
public BE.ListingType InsertListingType(BE.ListingType entity) { //@@NEW // Check if a CityStateZip already exists with this ZipCode. BE.ListingType existingEntity = GetListingTypeByListingTypeName(entity.ListingTypeName); if (null != existingEntity) return existingEntity; //@@NEW - removed try/catch. insert returns DA entity (with new data). this method now returns an entity. DA.ListingTypeGateway gateway = new DA.ListingTypeGateway(); DA.ListingType result = gateway.Insert(entity.ToDataEntity()); return result.ToBusinessEntity(); }
//@@NEW - new method. public BE.ClientAudit InsertClientAudit(BE.Client entity) { // Create the audit record. BE.ClientAudit audit = new BE.ClientAudit(entity); audit.AccountPaused = entity.AccountPaused; // Insert the audit record. BE.ClientAudit result = InsertClientAudit(audit); if (Guid.Empty == result.ClientAuditGuid) throw new BE.ClientAuditException("Client Audit record was not inserted.", audit); return result; }
public BE.CityStateZip InsertCityStateZip(BE.CityStateZip entity) { //@@NEW // Check if a CityStateZip already exists with this ZipCode. BE.CityStateZip existingEntity = GetCityStateZipCodeByZipCode(entity.ZipCode); DA.CityStateZipGateway gateway = new DA.CityStateZipGateway(); if (null != existingEntity) {// existing entity - problematic if first entry contains wrong city/state if (!existingEntity.Equals(entity)) {// argument entity contains different city/state => update with these values //// entity comes without guid from UI entity.CityStateZipGuid = existingEntity.CityStateZipGuid; gateway.Update(entity.ToDataEntity()); // should return new value existingEntity = this.GetCityStateZipCodeByZipCode(entity.ZipCode); } return existingEntity; } //@@NEW - removed try/catch. insert returns DA entity (with new data). this method now returns an entity. DA.CityStateZip result = gateway.Insert(entity.ToDataEntity()); return result.ToBusinessEntity(); }
public void UpdateCityStateZip(BE.CityStateZip entity) { DA.CityStateZipGateway gateway = new DA.CityStateZipGateway(); gateway.Update(entity.ToDataEntity()); }
public void UpdateClient(BE.Client entity) { StripPhoneNumber(entity); // Update the main record. DA.ClientGateway gateway = new DA.ClientGateway(); gateway.Update(entity.ToDataEntity()); //@@NEW // Create the audit record. ClientAuditLogic auditLogic = new ClientAuditLogic(); auditLogic.InsertClientAudit(entity); }
private void StripPhoneNumber(BE.Client entity) { if (null == entity) { entity.PhoneNumber = string.Empty; return; } System.Text.StringBuilder result = new System.Text.StringBuilder(); foreach (char c in entity.PhoneNumber) { if (char.IsNumber(c)) result.Append(c); } entity.PhoneNumber = result.ToString().Substring(0, 10).PadLeft(10); }
public void DeleteCityStateZip(BE.CityStateZip entity) { DA.CityStateZipGateway gateway = new DA.CityStateZipGateway(); gateway.Delete(entity.CityStateZipGuid); }
private void StripPhoneNumber(BE.Facility entity) { System.Text.StringBuilder result = new System.Text.StringBuilder(); foreach (char c in entity.PhoneNumber) { if (char.IsNumber(c)) result.Append(c); } entity.PhoneNumber = result.ToString().Substring(0, 10).PadLeft(10); }
public void UpdateFacility(BE.Facility entity) { StripPhoneNumber(entity); // Update the main record. DA.FacilityGateway gateway = new DA.FacilityGateway(); gateway.Update(entity.ToDataEntity()); //@@NEW // Create the audit record. FacilityAuditLogic auditLogic = new FacilityAuditLogic(); auditLogic.InsertFacilityAudit(entity); }
public BE.Facility InsertFacility(BE.Facility entity) { StripPhoneNumber(entity); //@@NEW - removed try/catch. insert returns DA entity (with new data). this method now returns an entity. DA.FacilityGateway gateway = new DA.FacilityGateway(); DA.Facility result = gateway.Insert(entity.ToDataEntity()); //@@NEW // Create the audit record. FacilityAuditLogic auditLogic = new FacilityAuditLogic(); auditLogic.InsertFacilityAudit(result.ToBusinessEntity()); return result.ToBusinessEntity(); }
public void DeleteFacilityPhoto(BE.FacilityPhoto entity) { DA.FacilityPhotoGateway gateway = new DA.FacilityPhotoGateway(); gateway.Delete(entity.FacilityPhotoGuid); }
public void UpdateFacilityPhoto(BE.FacilityPhoto entity) { DA.FacilityPhotoGateway gateway = new DA.FacilityPhotoGateway(); gateway.Update(entity.ToDataEntity()); }