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 List<DC.PaymentInfoAudit> GetAllPaymentInfoAuditWithUndefined()
 {
     try
     {
         BL.PaymentInfoAuditLogic paymentInfoAuditLogic = new BL.PaymentInfoAuditLogic();
         List<BE.PaymentInfoAudit> entities = paymentInfoAuditLogic.GetAllPaymentInfoAuditWithUndefined();
         List<DC.PaymentInfoAudit> response = entities.ToDataContractList();
         return response;
     }
     catch (Exception ex)
     {
         FC.DefaultFaultContract fault = new FC.DefaultFaultContract();
         fault.ErrorMessage = "Unable to retrieve paymentInfoAudit data.";
         throw new FaultException<FC.DefaultFaultContract>(fault,
             new FaultReason(ex.Message));
     }
 }
Exemplo n.º 4
0
        public void DeletePaymentInfoAudit(DC.PaymentInfoAudit request)
        {
            try
            {
                BL.PaymentInfoAuditLogic paymentInfoAuditLogic = new BL.PaymentInfoAuditLogic();
                BE.PaymentInfoAudit entity = request.ToBusinessEntity();
                paymentInfoAuditLogic.DeletePaymentInfoAudit(entity);
            }
            catch (BE.PaymentInfoAuditNotFoundException ex)
            {
                FC.DefaultFaultContract fault = new FC.DefaultFaultContract();
                fault.ErrorMessage = String.Format(
                    "Unable to delete Payment Info Audit data. Data: {0}",
                    request.ToBusinessEntity().ToString());

                throw new FaultException<FC.DefaultFaultContract>(fault,
                    new FaultReason(ex.Message));
            }
        }
Exemplo n.º 5
0
 public DC.PaymentInfoAudit GetPaymentInfoAuditByPaymentInfoAuditGuid(Guid paymentInfoAuditGuid)
 {
     try
     {
         BL.PaymentInfoAuditLogic paymentInfoAuditLogic = new BL.PaymentInfoAuditLogic();
         BE.PaymentInfoAudit entity = paymentInfoAuditLogic.GetPaymentInfoAuditByPaymentInfoAuditGuid(paymentInfoAuditGuid);
         DC.PaymentInfoAudit response = entity.ToDataContract();
         return response;
     }
     catch (BE.PaymentInfoAuditNotFoundException ex)
     {
         FC.PaymentInfoAuditFault fault = new FC.PaymentInfoAuditFault();
         fault.PaymentInfoAuditGuid = ex.PaymentInfoAuditGuid;
         fault.ErrorMessage = "PaymentInfoAudit does not exsist in the database.";
         throw new FaultException<FC.PaymentInfoAuditFault>(fault,
             new FaultReason(ex.Message));
     }
     catch (Exception ex)
     {
         FC.PaymentInfoAuditFault fault = new FC.PaymentInfoAuditFault();
         fault.ErrorMessage = "Could not retrieve a specific PaymentInfoAudit for unknown reasons.";
         throw new FaultException<FC.PaymentInfoAuditFault>(fault,
             new FaultReason(ex.Message));
     }
 }
Exemplo n.º 6
0
 public List<DC.PaymentInfoAudit> GetPaymentInfoAuditsForPaymentInfoByPaymentInfoGuid(Guid paymentInfoGuid)
 {
     try
     {
         BL.PaymentInfoAuditLogic paymentInfoAuditLogic = new BL.PaymentInfoAuditLogic();
         List<BE.PaymentInfoAudit> entities = paymentInfoAuditLogic.GetPaymentInfoAuditsForPaymentInfoByPaymentInfoGuid(paymentInfoGuid);
         List<DC.PaymentInfoAudit> response = entities.ToDataContractList();
         return response;
     }
     catch (BE.PaymentInfoAuditException ex)
     {
         FC.DefaultFaultContract fault = new FC.DefaultFaultContract();
         fault.ErrorMessage = string.Format("Unable to find a PaymentInfoAudit with the given PaymentInfo");
         throw new FaultException<FC.DefaultFaultContract>(fault,
             new FaultReason(ex.Message));
     }
 }
Exemplo n.º 7
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);
        }