private void WindowClosed(object sender, CancelEventArgs e) { e.Cancel = true; DBWishForDayOffController.LoadWishForDayOffs(); MenuWindow.MenuWindowInstance.Show(); e.Cancel = false; }
public MainWindow() { InitializeComponent(); MainWindowInstance = this; bool connecting = true; while (connecting) { try { DBDateController.LoadDates(); DBRosterController.LoadRosters(); DBEmployeeController.LoadEmployees(); DBWishForDayOffController.LoadWishForDayOffs(); DBDutyController.LoadDuties(); DBDutyExchangeController.LoadDutyExchanges(); connecting = false; } catch (Exception e) { MessageBoxButton btn = MessageBoxButton.OK; MessageBoxImage image = MessageBoxImage.Exclamation; MessageBoxResult result = MessageBox.Show($"{e.Message}\n\nDu er ikke tilsuttet vpn.eal.dk, tilslut først, og prøv igen.", "Husk at bruge vpn.eal.dk!", btn, image); if (result == MessageBoxResult.OK) { connecting = false; this.Close(); } } } }
public MainWindow() { InitializeComponent(); DBDateController.LoadDates(); DBRosterController.LoadRosters(); DBEmployeeController.LoadEmployees(); DBWishForDayOffController.LoadWishForDayOffs(); DBDutyController.LoadDuties(); DBDutyExchangeController.LoadDutyExchanges(); }