private void PrintButton_Click(object sender, RoutedEventArgs e)
 {
     this.DialogResult = true;
     DataBase.TablesModel tables = new DataBase.TablesModel();
     tables.ChangeTableType(Table_row,3);
     this.Close();
 }
 private void SendOrderButton_Click(object sender, RoutedEventArgs e)
 {
     if (OrderListView.Items.Count > 0)
     {
         DataBase.OrdersModel orders = new DataBase.OrdersModel();
         DataBase.systemDataSet.ordersDataTable ordersDt = new DataBase.systemDataSet.ordersDataTable();
         DataRow OrdersRow = ordersDt.NewRow();
         OrdersRow["order_num"] = Order_num;
         OrdersRow["table_id"] = (int)TableRow["id"];
         OrdersRow["create_time"] = DateTime.Now.ToFileTime();
         ordersDt.Rows.Add(OrdersRow);
         DataRow[] listRow = Order_list.Select();
         if (orders.InsertOrder(ordersDt, listRow))
         {
             DataBase.TablesModel tables = new DataBase.TablesModel();
             tables.ChangeTableType(TableRow, 2);
             this.Close();
         }
     }
 }