You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
44 lines
1.5 KiB
44 lines
1.5 KiB
using System;
|
|
using System.Collections.Generic;
|
|
using System.Collections.ObjectModel;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using System.Windows;
|
|
using System.Windows.Controls;
|
|
using System.Windows.Data;
|
|
using System.Windows.Documents;
|
|
using System.Windows.Input;
|
|
using System.Windows.Media;
|
|
using System.Windows.Media.Imaging;
|
|
using System.Windows.Shapes;
|
|
|
|
namespace eCompanies
|
|
{
|
|
/// <summary>
|
|
/// Логика взаимодействия для UsersWindow.xaml
|
|
/// </summary>
|
|
public partial class UsersWindow : Window
|
|
{
|
|
Companies currentCompany;
|
|
public UsersWindow(Companies c)
|
|
{
|
|
InitializeComponent();
|
|
currentCompany = c;
|
|
companyNameBox.Text = c.Name;
|
|
contractStatusComboBox.SelectedIndex = c.ContractStatus;
|
|
usersGrid.DataContext = new ObservableCollection<Users>(c.Users.AsEnumerable<Users>());
|
|
}
|
|
|
|
private void usersGrid_MouseDoubleClick(object sender, MouseButtonEventArgs e)
|
|
{
|
|
}
|
|
|
|
private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e)
|
|
{
|
|
MessageBoxResult mbr = MessageBox.Show("Вы закрываете окно с компанией. Хотите сохранить результаты?", "Сохранение изменений", MessageBoxButton.YesNo);
|
|
if (mbr == MessageBoxResult.Yes)
|
|
App.updateCompany(currentCompany);
|
|
}
|
|
}
|
|
}
|
|
|