public DashboardMenu() { try { InitializeComponent(); availableOptions = new Dictionary<System.Windows.Controls.Primitives.ToggleButton, UserControl>(); home = new HomeContent(); newQuote = new NewQuoteContent(); customer = new CustomerSettingsContent(); priceSettings = new PriceSettingsContent(); soSection = new SalesOrderContent(); worksheetSection = new WorksheetContent(); invoice = new InvoiceContent(); makePayment = new MakeInvoicePayment(); commanderSection = new CommanderSectionContent(); barcodePrinter = new BarcodePrinter(); availableOptions.Add(btnHome, home); availableOptions.Add(btnCreateNewQuote, newQuote); availableOptions.Add(btnPriceSettings, priceSettings); availableOptions.Add(btnCustomerSettings, customer); availableOptions.Add(btnSaleOrder, soSection); availableOptions.Add(btnWorksheet, worksheetSection); availableOptions.Add(btnInvoice, invoice); availableOptions.Add(btnMakePayment, makePayment); availableOptions.Add(btnCommanderSection, commanderSection); availableOptions.Add(btnBarcodePrinter, barcodePrinter); btnHome.IsChecked = true; } catch (Exception ex) { Logger.LogException(ex); } }
private void OpenWorksheet() { try { Dashboard parent = Window.GetWindow(this) as Dashboard; WorksheetEntity entity = dgCustomerList.SelectedItem as WorksheetEntity; if (entity == null) { return; } if (parent != null) { DashboardMenu sideMenu = parent.ucDashboardMenu.CurrentPage as DashboardMenu; DashboardHelper.ChangeDashboardSelection(parent, sideMenu.btnWorksheet); WorksheetContent newQuote = new WorksheetContent(true, entity.QuoteNumber); parent.ucMainContent.ShowPage(newQuote); } } catch (Exception ex) { Logger.LogException(ex); } }
private void btnOpenWorksheet_Click(object sender, RoutedEventArgs e) { try { Dashboard parent = Window.GetWindow(this) as Dashboard; if (parent != null) { WorksheetContent wsContent = new WorksheetContent(true, txtQuoteNumber.Text); parent.ucMainContent.ShowPage(wsContent); } } catch (Exception ex) { Logger.LogException(ex); } }