/// <summary> /// This method works when user click at waiting list button. Will call /// OrderService.ServeWaitingOrder() to mark bill item to served status. /// </summary> /// <param name="sender">Sender object</param> /// <param name="e">Event object</param> private void BillItemPad_PadClick(object sender, smartRestaurant.Controls.ButtonListPadEventArgs e) { if (e.Value == null) return; int id = int.Parse(e.Value); OrderService.OrderService service = new OrderService.OrderService(); if (id < 0) { // Order ID id = -id; orderWaiting = service.ServeWaitingOrder(id, 0); } else { // Bill Detail ID orderWaiting = service.ServeWaitingOrder(0, id); } UpdateWaitingList(); }
private void BillItemPad_PadClick(object sender, ButtonListPadEventArgs e) { if (e.ObjectValue != null) { int objectValue = (int) e.ObjectValue; smartRestaurant.OrderService.OrderService service = new smartRestaurant.OrderService.OrderService(); if (objectValue < 0) { objectValue = -objectValue; this.orderWaiting = service.ServeWaitingOrder(objectValue, 0); } else { this.orderWaiting = service.ServeWaitingOrder(0, objectValue); } this.AddTableButton(); this.UpdateWaitingList(); } }