Browse Source

Исправлена ошибка, при которой происходило неправильно окончание сеанса работы с окном

master
Никита 6 years ago
parent
commit
a88659155c
  1. 2
      eCompanies/MainWindow.xaml.cs
  2. 2
      eCompanies/UsersWindow.xaml.cs

2
eCompanies/MainWindow.xaml.cs

@ -75,7 +75,7 @@ namespace eCompanies
switch (App.saveResultsMsgBox()) switch (App.saveResultsMsgBox())
{ {
case MessageBoxResult.No: return; case MessageBoxResult.No: return;
case MessageBoxResult.Cancel: e.Cancel = true; break; case MessageBoxResult.Cancel: e.Cancel = true; return;
} }
foreach (Company c in (ObservableCollection<Company>)companyGrid.DataContext) foreach (Company c in (ObservableCollection<Company>)companyGrid.DataContext)
{ {

2
eCompanies/UsersWindow.xaml.cs

@ -37,7 +37,7 @@ namespace eCompanies
switch (App.saveResultsMsgBox()) switch (App.saveResultsMsgBox())
{ {
case MessageBoxResult.No: return; case MessageBoxResult.No: return;
case MessageBoxResult.Cancel: e.Cancel = true; break; case MessageBoxResult.Cancel: e.Cancel = true; return;
} }
currentCompany.Users.Clear(); currentCompany.Users.Clear();
foreach (Users u in (ObservableCollection<Users>)usersGrid.DataContext) foreach (Users u in (ObservableCollection<Users>)usersGrid.DataContext)

Loading…
Cancel
Save