private void Preparing(int OrderItemID, OrderState orderstate) { currentorder.OrderState = orderstate; currentorder.OrderItemID = OrderItemID; TimeSpan myDateResult = DateTime.Now.TimeOfDay; currentorder.LastStateChange = myDateResult; try { Orderserv.Changetoprpred(currentorder); Start(kitchenorbar); Checkmarkpic.Show(); } catch (Exception e) { MessageBox.Show(e.Message); Crossmarkpic.Show(); } }
private void Preparing(OrderItem currentorder) // Change order to preparing in database and refresh the tables { currentorder.LastStateChange = DateTime.Now; try { Orderserv.Changetoprpred(currentorder); AutoRefresh(kitchenorbar); resultdialogbox.Text = "The order of " + currentorder.MenuItem.Name + " for Table " + currentorder.Table.TableID + " was changed to Preparing!"; resultdialogbox.Show(); Checkmarkpic.Show(); } catch (Exception e) { MessageBox.Show(e.Message); resultdialogbox.Text = currentorder.MenuItem.Name + "status could not be changed"; resultdialogbox.Show(); Crossmarkpic.Show(); } }