private void FixupPAYMENT(PAYMENT previousValue) { if (previousValue != null && ReferenceEquals(previousValue.ORDERS, this)) { previousValue.ORDERS = null; } if (PAYMENT != null) { PAYMENT.ORDERS = this; } }
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(); }
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; } } }
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(); }
public List<PAYMENT> Search(PAYMENT Entity, int PageSize, int PageIndex, out int TotalRecords, string OrderExp, Util.SortDirection SortDirection) { throw new NotImplementedException(); }
public void Delete(PAYMENT Entity) { Context.PAYMENT.Attach(Entity); Context.DeleteObject(Entity); }
public void Update(PAYMENT Entity) { Context.PAYMENT.Attach(Entity); Context.ObjectStateManager.ChangeObjectState(Entity, System.Data.EntityState.Modified); }
public void Insert(PAYMENT Entity) { Context.PAYMENT.AddObject(Entity); }