private void ChangeSeating() { if (!LockCheckPass(true, false, Types.Strings.ThisTicketIsOpenSomewhereElseItCanNotBeModified)) { return; } // Create the seating selection control PosDialogWindow window = SeatingSelectionControl.CreateInDefaultWindow(); SeatingSelectionControl control = window.DockedControl as SeatingSelectionControl; control.InitializeFromTicket(CurrentTicket); // Show the dialog ParentWindow.ShowShadingOverlay = true; window.ShowDialog(ParentWindow); if (!window.ClosedByUser) { // Process Results if (CurrentTicket != null) { if (control.SelectedCustomer != null) { CurrentTicket.SetCustomerId(control.SelectedCustomer.Id); } CurrentTicket.SetType(control.TicketType); CurrentTicket.SetSeatingId(control.SelectedSeatingId); CurrentTicket.Update(); } } ParentWindow.ShowShadingOverlay = false; }
private void CreateTicketCommand() { // Make sure that start-of-day has occured if (DayOfOperation.Today == null) { PosDialogWindow.ShowDialog( Types.Strings.YouCanNotCreateTicketsUntilStartOfDayHasBeenCompleted, Types.Strings.RequiresStartOfDay, DialogButtons.Ok); return; } // Create the seating selection control if (ConfigurationManager.UseSeating) { PosDialogWindow window = SeatingSelectionControl.CreateInDefaultWindow(); var control = window.DockedControl as SeatingSelectionControl; if (control == null) { return; } control.InitializeFromTicket(null); // Show the dialog PosDialogWindow.ShowPosDialogWindow(window); if (!window.ClosedByUser) { SessionManager.ActiveTicket = TicketManager.Add(control.TicketType, Party.NoPartyId, control.SelectedSeatingId, SessionManager.ActiveEmployee.Id, ((control.SelectedCustomer != null) ? control.SelectedCustomer.Id : Customer.NoCustomerId)); SelectedTicket = SessionManager.ActiveTicket; OrderEntryControl.SetAndLoadActiveTicket(SessionManager.ActiveTicket); } MainWindow.ShowWindowShadingOverlay = false; } else { SessionManager.ActiveTicket = TicketManager.Add(TicketType.DineIn, Party.NoPartyId, Seating.NoSeatingId, SessionManager.ActiveEmployee.Id, Customer.NoCustomerId); SelectedTicket = SessionManager.ActiveTicket; OrderEntryControl.SetAndLoadActiveTicket(SessionManager.ActiveTicket); } // Stop auto-logoff timer, if it should be disabled StoreSetting setting = SettingManager.GetStoreSetting("EnableAutoLogoffWhileInOrderEntry"); if ((setting.IntValue == null) || (setting.IntValue.Value == 0)) { LoginControl.StopAutoLogoutTimer(); } // Need to change displayed tickets to open tickets, otherwise it will cause // an exception in the TicketCashoutControl when cashing-out from in-order if ((TicketFilterControl.CurrentFilter != TicketSelectionShow.MyOpen) && (TicketFilterControl.CurrentFilter != TicketSelectionShow.AllOpen) && (TicketFilterControl.CurrentFilter != TicketSelectionShow.AllDay) && (TicketFilterControl.CurrentFilter != TicketSelectionShow.All)) { TicketFilterControl.CurrentFilter = TicketSelectionShow.MyOpen; } UpdateTickets(); }