private void checkClosingState(object sender, EventArgs e) { if (IsLoggingOut == true) { //open login window after user logs out this.Close(); MainWindow loginw = new MainWindow(); if (IsLoaded == false) { IsLoggingOut = false; loginw.ShowDialog(); checkClosing.Stop(); } } if (BackToMain == true) { MainCP ac = new MainCP(); FFhost.Navigate(ac); if (AccountsTable.IsAdmin() == true) { this.Title = "لوحه المدراء"; } else if (AccountsTable.IsAdmin() == false) { this.Title = "لوحه الموظفين"; MeSe.Visibility = Visibility.Collapsed; MIAddEMP.Visibility = Visibility.Collapsed; MILOGLOG.Visibility = Visibility.Collapsed; MISM.Visibility = Visibility.Collapsed; } BackToMain = false; } }
private void MISM_Click(object sender, RoutedEventArgs e) { IsSL = true; SoldLogs sl = new SoldLogs(); FFhost.Navigate(sl); }
private void BAR_Click(object sender, RoutedEventArgs e) { IsBR = true; BAR br = new BAR(); FFhost.Navigate(br); }
private void MISO_Click(object sender, RoutedEventArgs e) { IsSO = true; Out so = new Out(); FFhost.Navigate(so); }
private void MIExy_Click(object sender, RoutedEventArgs e) { IsEX = true; Expiration ex = new Expiration(); FFhost.Navigate(ex); }
private void MIBills_Click(object sender, RoutedEventArgs e) { IsBills = true; Bills bl = new Bills(); FFhost.Navigate(bl); }
private void MISet_Click(object sender, RoutedEventArgs e) { IsOSettings = true; Settings set = new Settings(); FFhost.Navigate(set); }
private void MIAllMeds_Click(object sender, RoutedEventArgs e) { AllMeds am = new AllMeds(); FFhost.Navigate(am); }