예제 #1
0
        private void FixupPAYMENT(PAYMENT previousValue)
        {
            if (previousValue != null && ReferenceEquals(previousValue.ORDERS, this))
            {
                previousValue.ORDERS = null;
            }

            if (PAYMENT != null)
            {
                PAYMENT.ORDERS = this;
            }
        }
예제 #2
0
        public void Delete(PAYMENT Entity)
        {
            _paymentDAO.Delete(Entity);

            if (Entity.Type == (int)PaymentType.CA)
            {
                _cashPaymentDAO.Delete(Entity.CASH_PAYMENT);
            }
            else if (Entity.Type == (int)PaymentType.PP)
            {
                _paypalPaymentDAO.Delete(Entity.PAYPAL_PAYMENT);
            }
            Context.SaveChanges();
        }
예제 #3
0
        private void FixupPAYMENT(PAYMENT previousValue)
        {
            if (previousValue != null && ReferenceEquals(previousValue.CASH_PAYMENT, this))
            {
                previousValue.CASH_PAYMENT = null;
            }

            if (PAYMENT != null)
            {
                PAYMENT.CASH_PAYMENT = this;
                if (ID != PAYMENT.ID)
                {
                    ID = PAYMENT.ID;
                }
            }
        }
예제 #4
0
     private void FixupPAYMENT(PAYMENT previousValue)
     {
         if (previousValue != null && ReferenceEquals(previousValue.CASH_PAYMENT, this))
         {
             previousValue.CASH_PAYMENT = null;
         }
 
         if (PAYMENT != null)
         {
             PAYMENT.CASH_PAYMENT = this;
             if (ID != PAYMENT.ID)
             {
                 ID = PAYMENT.ID;
             }
         }
     }
예제 #5
0
 public void Insert(PAYMENT Entity)
 {
     _paymentDAO.Insert(Entity);
     if (Entity.Type == (int)PaymentType.CA)
     {
         //Context.ObjectStateManager.ChangeObjectState(Entity.CASH_PAYMENT, System.Data.EntityState.Added);
         _cashPaymentDAO.Insert(Entity.CASH_PAYMENT);
     }
     else if (Entity.Type == (int)PaymentType.PP)
     {
         //Context.ObjectStateManager.ChangeObjectState(Entity.PAYPAL_PAYMENT, System.Data.EntityState.Added);
         _paypalPaymentDAO.Insert(Entity.PAYPAL_PAYMENT);
     }
     else if (Entity.Type == (int)PaymentType.EP)
     {
         //Context.ObjectStateManager.ChangeObjectState(Entity.PAYPAL_PAYMENT, System.Data.EntityState.Added);
         _easyPayPaymentDAO.Insert(Entity.EASYPAY_PAYMENT);
     }
     Context.SaveChanges();
 }
예제 #6
0
     private void FixupPAYMENT(PAYMENT previousValue)
     {
         if (previousValue != null && ReferenceEquals(previousValue.ORDERS, this))
         {
             previousValue.ORDERS = null;
         }
 
         if (PAYMENT != null)
         {
             PAYMENT.ORDERS = this;
         }
     }
예제 #7
0
 public List<PAYMENT> Search(PAYMENT Entity, int PageSize, int PageIndex, out int TotalRecords, string OrderExp, Util.SortDirection SortDirection)
 {
     throw new NotImplementedException();
 }
예제 #8
0
 public void Delete(PAYMENT Entity)
 {
     Context.PAYMENT.Attach(Entity);
     Context.DeleteObject(Entity);
 }
예제 #9
0
 public void Update(PAYMENT Entity)
 {
     Context.PAYMENT.Attach(Entity);
     Context.ObjectStateManager.ChangeObjectState(Entity, System.Data.EntityState.Modified);
 }
예제 #10
0
 public void Insert(PAYMENT Entity)
 {
     Context.PAYMENT.AddObject(Entity);
 }