private void cmdOk_Click(object sender, RoutedEventArgs e) { if (!revEntry.HasBagNo) { DMT.Windows.MessageBoxWindow msg = new DMT.Windows.MessageBoxWindow(); msg.Owner = Application.Current.MainWindow; msg.Setup("กรุณาระบุ หมายเลขถุงเงิน", "DMT - Tour of Duty"); if (msg.ShowDialog() == true) { } revEntry.FocusBagNo(); return; } if (!revEntry.HasBeltNo) { DMT.Windows.MessageBoxWindow msg = new DMT.Windows.MessageBoxWindow(); msg.Owner = Application.Current.MainWindow; msg.Setup("กรุณาระบุ หมายเลขเข็มขัดนิรภัย", "DMT - Tour of Duty"); if (msg.ShowDialog() == true) { } revEntry.FocusBeltNo(); return; } // Slip Preview var page = new Reports.RevenueSlipPreview(); page.MenuPage = new Menu.MainMenu(); // Set MenPage to main menu. page.CallerPage = this; // Set CallerPage for click back. page.Setup(_manager); PageContentManager.Instance.Current = page; }
private void revSlip_Click(object sender, RoutedEventArgs e) { var search = new DMT.TOD.Windows.Reports.RevenueSlipSearchWindow(); search.Owner = Application.Current.MainWindow; search.Setup(_user); if (search.ShowDialog() == false) { return; } Models.RevenueEntry revenueEntry = search.SelectedEntry; if (null == revenueEntry) { DMT.Windows.MessageBoxWindow msg = new DMT.Windows.MessageBoxWindow(); msg.Owner = Application.Current.MainWindow; msg.Setup("กรุณาเลือกรายการที่ต้องการเเรียกดูใบนำส่งรายได้", "DMT - Tour of Duty"); if (msg.ShowDialog() == true) { return; } } // Revenue Slip Preview var page = new Reports.RevenueSlipPreview(); page.MenuPage = this; page.CallerPage = this; // Set CallerPage for click back. RevenueEntryManager _manager = new RevenueEntryManager(); _manager.LoadRevenueEntry(revenueEntry); page.Setup(_manager); PageContentManager.Instance.Current = page; }