public Registration() { InitializeComponent(); aar = new Controller.AutorizAndRegistr(); comboBoxGroup.DisplayMemberPath = "Name"; comboBoxGroup.SelectedValue = "Id"; comboBoxGroup.ItemsSource = aar.GetGroupList(); }
private void Con() { keynerContext = new Model.KeynerContext(); aar = new Controller.AutorizAndRegistr(); comboBoxGroup.DisplayMemberPath = "Name"; comboBoxGroup.SelectedValue = "Id"; comboBoxGroup.ItemsSource = aar.GetGroupList().OrderBy(g => g.Name); //comboBoxUser.DataContext = keynerContext.UserSet.ToList(); //comboBoxUser.DisplayMemberPath = "Name"; //comboBoxUser.SelectedValue = "Id"; }