예제 #1
0
 public void Delete(int id)
 {
     var order = new OrderDa(databasecontext);
     if (id > 0)
     {
         var currentOrder = GetById(id);
         order.Delete(currentOrder);
     }
 }
예제 #2
0
        public Order Save(int id, string OrderNumber, OrderStatus Status, DateTime DateTime)
        {
            var order = id > 0 ? GetById(id) : new Order();

            order.OrderNumber = OrderNumber;
            order.Status = (int)Status;
            order.DateTime = DateTime;

            var orderDa = new OrderDa(databasecontext);

            //if new
            if (id < 1) order = orderDa.Add(order);
            //update
            else order = orderDa.Update(order);
            return order;
        }
예제 #3
0
 public void SetDispatched(Order order)
 {
     var orderDa = new OrderDa(databasecontext);
     order.Status = (int)OrderStatus.Dispatched;         
     orderDa.Update(order);
 }
예제 #4
0
 public void SetReady(Order order)
 {
     var orderDa= new OrderDa(databasecontext);
     order.Status = (int)OrderStatus.Ready;            
     orderDa.Update(order);
 }