private void buttonDock_Click(object sender, RoutedEventArgs e) { RegisterContextMenu.IsOpen = false; int registerSubId = 0; RegisterDrawer registerDrawer = RegisterDrawer.GetFloating(SessionManager.ActiveEmployee.Id); if (registerDrawer == null) { PosDialogWindow.ShowDialog( Types.Strings.RegisterMenuNotFloating, Types.Strings.Error); return; } if (registerSubId == 0) { DeviceManager.OpenCashDrawer1(); } else if (registerSubId == 1) { DeviceManager.OpenCashDrawer2(); } RegisterManager.DockRegisterDrawer(registerDrawer, registerSubId); OrderEntryCommands.SetupNoOrderCommands(); PosDialogWindow.ShowDialog( Types.Strings.RegisterMenuDrawerIsNowDocked, Types.Strings.Notification); OrderEntryCommands.UpdateTicketDetailCommands(); }
public static void StartOfDay() { DayOfOperation.ProcessStartOfDay(); #if !DEMO PrinterManager.PrintLineToReceipt(DeviceManager.ActivePosPrinterLocal, Strings.StartOfDay + ": " + DateTime.Now); PrinterManager.PrintLineToReceipt(DeviceManager.ActivePosPrinterLocal); #endif OrderEntryCommands.SetupNoOrderCommands(); }
public static void StartRegister() { // No network card or bad network setup if (RegisterId == null) { PosDialogWindow.ShowDialog(MainWindow.Singleton, Strings.CanNotDetermineTheRegisterIDCheckNetworkSetup, Strings.Error); return; } #if !DEMO // Are and physical register drawers even setup? if ((DeviceManager.ActiveCashDrawer1 == null) && (DeviceManager.ActiveCashDrawer2 == null)) { PosDialogWindow.ShowDialog(MainWindow.Singleton, Strings.ThereAreNoPhysicalCashRegisterDrawersSetup, Strings.Error); return; } // Are both register drawers assigned to other employees already? bool drawer1Available, drawer2Available; RegisterManager.CheckAvailable(out drawer1Available, out drawer2Available); if (!drawer1Available && !drawer2Available) { bool bothDrawersSetup = ((DeviceManager.ActiveCashDrawer1 != null) && (DeviceManager.ActiveCashDrawer2 != null)); PosDialogWindow.ShowDialog(MainWindow.Singleton, (bothDrawersSetup ? Strings.BothDrawersAre : Strings.TheRegisterDrawerIs) + Strings.AlreadyBeingUsedBy + (bothDrawersSetup ? Strings.OtherEmployees : Strings.AnotherEmployee), Strings.Error); return; } #endif PosDialogWindow window = RegisterDrawerStartControl.CreateInDefaultWindow(); RegisterDrawerStartControl control = window.DockedControl as RegisterDrawerStartControl; PosDialogWindow.ShowPosDialogWindow(MainWindow.Singleton, window); if (!window.ClosedByUser && (control.StartingAmount != null)) { RegisterManager.ActiveRegisterDrawer = RegisterDrawer.Add(RegisterId.Value, 0, // TODO: Set RegisterSubId to the physical register drawer used SessionManager.ActiveEmployee.Id, control.StartingAmount.Value); // Resetup command buttons OrderEntryCommands.SetupNoOrderCommands(); // Open the register so the drawer can be placed in it OpenCashDrawer(); } }
private static void PrintEndOfYear(IShadeable parentWindow) { _endOfYearReportParentWindow = parentWindow; _endOfYearReportParentWindow.ShowShadingOverlay = true; Ticket.ResetAutoIdentity(); TicketItem.ResetAutoIdentity(); TicketItemOption.ResetAutoIdentity(); SettingManager.SetStoreSetting("DailyIdOffset", 0); OrderEntryCommands.SetupNoOrderCommands(); // Show Report ReportManager.PrintEndOfYear(DayOfOperation.YearOfLastStartOfDay, EOYReportClosed_EventHandler); }
private void buttonFloat_Click(object sender, RoutedEventArgs e) { RegisterContextMenu.IsOpen = false; if (PosDialogWindow.ShowDialog( Types.Strings.RegisterMenuConfirmFloat, Types.Strings.Confirmation, DialogButtons.YesNo) == DialogButton.Yes) { RegisterManager.OpenCashDrawer(); RegisterManager.FloatActiveRegisterDrawer(); OrderEntryCommands.SetupNoOrderCommands(); PosDialogWindow.ShowDialog( Types.Strings.RegisterMenuNotifyFloat, Types.Strings.Notification); } OrderEntryCommands.UpdateTicketDetailCommands(); }
private void buttonStartRegister_Click(object sender, RoutedEventArgs e) { RegisterContextMenu.IsOpen = false; if (DayOfOperation.Today != null) { RegisterManager.StartRegister(); OrderEntryCommands.SetupNoOrderCommands(); OrderEntryCommands.UpdateTicketDetailCommands(); } else { PosDialogWindow.ShowDialog( Types.Strings.RegisterMenuRunStartOfDay, Types.Strings.RegisterMenuUnableToProceed); } }
void SessionManager_TicketCleared(object sender, EventArgs e) { ShowCouponControl(false); ShowDiscountControl(false); couponEntryControl.Visibility = Visibility.Hidden; couponEntryControl.SelectedTicket = null; discountControl.Visibility = Visibility.Hidden; discountControl.SelectedTicket = null; buttonTouchInputCategory.Clear(); orderEntryItemSelection.Clear(); orderEntryItemOptions.Clear(); orderEntryPizzaItemOptions.Clear(); receiptTape1.Items.Clear(); InitializeTicketSelection(SessionManager.ActiveTicket); ShowTicketSelection(true); OrderEntryCommands.SetupNoOrderCommands(); }
public void Login(Employee employee) { Person employeePerson = Person.Get(Employee.GetPersonId(employee.Id)); textBlockUserName.Text = employeePerson.FirstName; SessionManager.ActiveEmployee = employee; SettingManager.SetEmployeeSetting(employee.Id, "LastLogin", DateTime.Now); // Initialize Employee Settings InitializeEmployeeSettings(employee); RegisterManager.SetActiveRegisterDrawer(); OrderEntryCommands.SetupNoOrderCommands(); InitializeTicketSelection(SessionManager.ActiveTicket); ShowTicketSelection(true); LoadSuspendedTicket(); }
private static void PrintEndOfDay(IShadeable parentWindow) { // Setup shading overlay _endOfDayReportParentWindow = parentWindow; _endOfDayReportParentWindow.ShowShadingOverlay = true; // Reset order id's and process the DayOfOperation DayOfOperation today = DayOfOperation.Today; DayOfOperation.SetTodayNull(); TicketManager.SetOrderIdOffset(); DayOfOperation.ProcessEndOfDay(today, SessionManager.ActiveEmployee.Id, TicketManager.GetOrderIdOffset()); OrderEntryCommands.SetupNoOrderCommands(); // Show Report ReportManager.PrintEndOfDay(today, EODReportClosed_EventHandler); }
void StringsCore_LanguageChanged(object sender, EventArgs e) { QueryCurrentWeather(); OrderEntryCommands.SetupNoOrderCommands(); SetDisplayedTicketTypeToStatusBar(); }