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 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(); }
public void InsertPaymentInfoAudit(DC.PaymentInfoAudit request) { try { BL.PaymentInfoAuditLogic paymentInfoAuditLogic = new BL.PaymentInfoAuditLogic(); BE.PaymentInfoAudit entity = request.ToBusinessEntity(); paymentInfoAuditLogic.InsertPaymentInfoAudit(entity); } catch (BE.PaymentInfoAuditAlreadyExistsException ex) { FC.DefaultFaultContract fault = new FC.DefaultFaultContract(); fault.ErrorMessage = String.Format( "Unable to insert Payment Info Audit data. Data: {0}", request.ToBusinessEntity().ToString()); throw new FaultException<FC.DefaultFaultContract>(fault, new FaultReason(ex.Message)); } }
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); }