Browse Source

Удален бессмысленный код

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

10
eCompanies/MainWindow.xaml.cs

@ -26,16 +26,6 @@ namespace eCompanies
{
if (updatingCompany == null) return;
updatingCompany.needUpdate = true;
var context = ((ObservableCollection<Company>)companyGrid.DataContext).ToList<Company>();
for (int i = 0; i < context.Count; i++)
{
if (context[i].CompanyId.Equals(updatingCompany.CompanyId))
{
context[i] = updatingCompany;
companyGrid.DataContext = new ObservableCollection<Company>(context);
return;
}
}
}

1
eCompanies/UsersWindow.xaml.cs

@ -28,7 +28,6 @@ namespace eCompanies
{
companyNameBox.Text = c.Name;
contractStatusComboBox.SelectedIndex = c.ContractStatus;
currentCompany.Users = App.getUsers(c.CompanyId);
usersGrid.DataContext = new ObservableCollection<Users>(c.Users.AsEnumerable());
}

Loading…
Cancel
Save