Esempio n. 1
0
        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();
        }