//修改订单数据库的paid属性
 private void set_order_paid(BathDBDataContext dc, Account account)
 {
     foreach (HotelRoom seat in m_Seats)
     {
         var orderList = dc.Orders.Where(x => x.systemId == seat.systemId && !x.paid);
         foreach (Orders order in orderList)
         {
             var ho = new HisOrders();
             ho.menu = order.menu;
             ho.text = order.text;
             ho.systemId = order.systemId;
             ho.number = order.number;
             ho.priceType = order.priceType;
             ho.money = order.money;
             ho.technician = order.technician;
             ho.techType = order.techType;
             ho.inputTime = order.inputTime;
             ho.inputEmployee = order.inputEmployee;
             ho.deleteEmployee = order.deleteEmployee;
             ho.donorEmployee = order.donorEmployee;
             ho.comboId = order.comboId;
             ho.paid = true;
             ho.accountId = account.id;
             ho.billId = order.billId;
             dc.HisOrders.InsertOnSubmit(ho);
             dc.Orders.DeleteOnSubmit(order);
         }
     }
 }
Exemple #2
0
 //修改订单数据库的paid属性
 private void set_order_paid()
 {
     var ids = m_Seats.Select(x => x.systemId);
     var orderList = db.Orders.Where(x => ids.Contains(x.systemId) && !x.paid);
     foreach (Orders order in orderList)
     {
         var ho = new HisOrders();
         ho.menu = order.menu;
         ho.text = order.text;
         ho.systemId = order.systemId;
         ho.number = order.number;
         ho.priceType = order.priceType;
         ho.money = order.money;
         ho.technician = order.technician;
         ho.techType = order.techType;
         ho.inputTime = order.inputTime;
         ho.inputEmployee = order.inputEmployee;
         ho.deleteEmployee = order.deleteEmployee;
         ho.donorEmployee = order.donorEmployee;
         ho.comboId = order.comboId;
         ho.paid = true;
         ho.accountId = account.id;
         ho.billId = order.billId;
         ho.departmentId = 1;
         db.HisOrders.InsertOnSubmit(ho);
         db.Orders.DeleteOnSubmit(order);
     }
 }
 partial void UpdateHisOrders(HisOrders instance);
 partial void DeleteHisOrders(HisOrders instance);
 partial void InsertHisOrders(HisOrders instance);