Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
        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();
        }
Exemplo n.º 3
0
        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));
            }
        }
Exemplo n.º 4
0
        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);
        }