Example #1
0
        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);
        }
Example #2
0
        private TimeSpan?PromptForTime()
        {
            TimeSpan?time   = null;
            Window   window = Window.GetWindow(this);

            if (window is IShadeable)
            {
                IShadeable dialogWindow = (IShadeable)window;
                dialogWindow.ShowShadingOverlay = true;
                time = PosDialogWindow.PromptForTime("Enter Time", CurrentDateTime.TimeOfDay);
                dialogWindow.ShowShadingOverlay = false;
            }
            else
            {
                time = PosDialogWindow.PromptForTime("Enter Time", CurrentDateTime.TimeOfDay);
            }
            return(time);
        }
Example #3
0
        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);
        }
Example #4
0
 public static bool?ShowDialog(this Window thisWindow, Window ownerWindow)
 {
     if (thisWindow != null)
     {
         thisWindow.Owner = ownerWindow;
         if (ownerWindow is IShadeable)
         {
             IShadeable shadable = ownerWindow as IShadeable;
             if (!shadable.ShowShadingOverlay)
             {
                 shadable.ShowShadingOverlay = true;
             }
             bool?result = thisWindow.ShowDialog();
             shadable.ShowShadingOverlay = false;
             return(result);
         }
         return(thisWindow.ShowDialog());
     }
     return(null);
 }
Example #5
0
        private void buttonTips_Click(object sender, RoutedEventArgs e)
        {
            double?    initialValue = _dataModel.DeclaredTipAmount;
            IShadeable parentWindow = Window.GetWindow(this) as IShadeable;

            parentWindow.ShowShadingOverlay = true;
            _tipsDeclared = PosDialogWindow.PromptCurrency(
                Strings.DeclareTips, _tipsDeclared);
            parentWindow.ShowShadingOverlay = false;
            if (_tipsDeclared == null)
            {
                buttonTips.Text = Strings.None;
            }
            else
            {
                buttonTips.Text = _tipsDeclared.Value.ToString("C2");
            }
            if (initialValue != _tipsDeclared)
            {
                buttonSave.IsEnabled = true;
            }
        }
Example #6
0
        public static ActionNotificationControl Create(IShadeable ownerWindow,
                                                       string message, string titlebar)
        {
            ActionNotificationControl notification = new ActionNotificationControl();

            double width;

            if (!notification.MeasureText(message, out width))
            {
                throw new Exception("Text Measurement Exception");
            }
            width = MathHelper.Clamp(width + 10, 200, 1000);

            notification.labelMessage.Content = message;
            notification.OwnerWindow          = ownerWindow;
            notification.ParentWindow         = new PosDialogWindow(notification,
                                                                    titlebar, width, 85);
            notification.ParentWindow.IsClosable = false;
            notification.ParentWindow.Topmost    = true;

            return(notification);
        }
        private void DeclareTips()
        {
            IShadeable parentWindow = Window.GetWindow(this) as IShadeable;

            if (parentWindow != null)
            {
                parentWindow.ShowShadingOverlay = true;
            }
            _tipsDeclared = PosDialogWindow.PromptCurrency(
                Strings.ClockOutDeclareTips, _tipsDeclared);
            if (parentWindow != null)
            {
                parentWindow.ShowShadingOverlay = false;
            }
            if (_tipsDeclared == null)
            {
                buttonDeclareTips.Text = Strings.ClockOutDeclareTips;
            }
            else
            {
                buttonDeclareTips.Text = Strings.ClockOutTips + _tipsDeclared.Value.ToString("C2");
            }
        }
Example #8
0
 private static void EOYReportClosed_EventHandler(object sender, EventArgs args)
 {
     // Remove shading overlay
     _endOfYearReportParentWindow.ShowShadingOverlay = false;
     _endOfYearReportParentWindow = null;
 }