Ejemplo n.º 1
0
 public OrderHistory GetStatus() {
     OrderHistory history = new OrderHistory();
     try {
         EcommercePlatformDataContext db = new EcommercePlatformDataContext();
         history = db.OrderHistories.Where(x => x.orderID.Equals(this.ID)).OrderByDescending(x => x.dateAdded).First();
     } catch {
         history = new OrderHistory {
             statusID = 0,
             OrderStatus = new OrderStatus {
                 status = "Unknown",
                 ID = 0
             },
         };
     }
     return history;
 }
Ejemplo n.º 2
0
 public void SetStatus(int statusID) {
     EcommercePlatformDataContext db = new EcommercePlatformDataContext();
     OrderHistory status = new OrderHistory {
         dateAdded = DateTime.UtcNow,
         changedBy = "System",
         orderID = this.ID,
         statusID = statusID
     };
     db.OrderHistories.InsertOnSubmit(status);
     db.SubmitChanges();
 }
		private void detach_OrderHistories(OrderHistory entity)
		{
			this.SendPropertyChanging();
			entity.Cart = null;
		}
 partial void DeleteOrderHistory(OrderHistory instance);
 partial void UpdateOrderHistory(OrderHistory instance);
 partial void InsertOrderHistory(OrderHistory instance);
		private void attach_OrderHistories(OrderHistory entity)
		{
			this.SendPropertyChanging();
			entity.OrderStatus = this;
		}