private void buttonPayout_Click(object sender, RoutedEventArgs e) { RegisterContextMenu.IsOpen = false; string reason = PosDialogWindow.PromptKeyboard(Types.Strings.RegisterMenuPayoutReason, null); if (reason != null) { double?amount = PosDialogWindow.PromptCurrency(Types.Strings.RegisterMenuPayoutAmount, null); if (amount.HasValue && (amount.Value > 0)) { RegisterPayout.Add(RegisterManager.ActiveRegisterDrawer.Id, SessionManager.ActiveEmployee.Id, amount.Value, reason, DateTime.Now); RegisterManager.ActiveRegisterDrawer.RemoveFromCurrentAmount(amount.Value); RegisterManager.OpenCashDrawer(); } } }
private void TaxExemption() { string result = PosDialogWindow.PromptKeyboard(Types.Strings.EnterTaxExemptionId, SelectedTicket.TaxExemptId); if (result == null) { return; } if (String.IsNullOrEmpty(result)) { result = null; } SelectedTicket.SetTaxExemptId(result); SelectedTicket.Update(); // Update the tax on the payment control paymentControl.SelectedTicket = SelectedTicket; }
private void AddInvite() { if (ConfigurationManager.UseOnScreenTextEntry) { PosDialogWindow parent = ((PosDialogWindow)Window.GetWindow(this)); parent.ShowShadingOverlay = true; string inviteName = PosDialogWindow.PromptKeyboard(Strings.InvitesName, ""); parent.ShowShadingOverlay = false; if (!String.IsNullOrEmpty(inviteName) && !String.IsNullOrWhiteSpace(inviteName)) { listBoxGuests.SelectedItem = null; AddInvite(inviteName); textBoxGuestName.Text = inviteName; } } else { AddInvite(textBoxGuestName.Text); } }
public static Employee GetPermission(Permissions permission) { if (SessionManager.PseudoEmployee != null) { return(SessionManager.PseudoEmployee); } Employee employee = null; Window window = Application.Current.Windows.Cast <Window>().SingleOrDefault(x => x.IsActive); if (window is IShadeable) { (window as IShadeable).ShowShadingOverlay = true; } string password = PosDialogWindow.PromptKeyboard(Types.Strings.PermissionRequiredEnterPassword, "", true, ShiftMode.None); if (window is IShadeable) { (window as IShadeable).ShowShadingOverlay = false; } if (App.IsAppShuttingDown) { return(null); } if (password != null) { employee = EmployeeManager.LookupByScanCode(password); } if ((employee == null) || !employee.HasPermission(permission)) { return(null); } SessionManager.PseudoEmployee = employee; return(employee); }
private void buttonLogin_Click(object sender, RoutedEventArgs e) { buttonLogin.Visibility = Visibility.Visible; label1.Visibility = Visibility.Hidden; passwordBox.Visibility = Visibility.Hidden; MainWindow.ShowWindowShadingOverlay = true; string temp = PosDialogWindow.PromptKeyboard(Types.Strings.LoginEnterLogin, "", true, ShiftMode.None); MainWindow.ShowWindowShadingOverlay = false; if (App.IsAppShuttingDown) { return; } if (temp != null) { passwordBox.Password = temp; DoLogin(passwordBox.Password); } else { passwordBox.Password = ""; } }