Пример #1
0
 public Group()
 {
     InitializeComponent();
     dataGrid.ItemsSource = service.SelectGroup();
     gridDB.Visibility    = Visibility.Hidden;
     dataGrid.Visibility  = Visibility.Visible;
 }
Пример #2
0
 private void BtnDel_Click(object sender, RoutedEventArgs e)
 {
     foreach (object SelectedItem in dataGrid.SelectedItems)
     {
         Service.Group group = SelectedItem as Service.Group;
         service.DeleteGroup(group.ID_Group);
     }
     dataGrid.ItemsSource = service.SelectGroup();
 }
Пример #3
0
        public MenuUser()
        {
            InitializeComponent();
            var user = service.FindByIDUser(Properties.Settings.Default.User_ID);

            lb_user.Content = user.Name + " " + user.Surname + " " + user.Patronymic;

            cbGroup.SelectedValuePath = "Value";
            cbGroup.DisplayMemberPath = "Text";

            foreach (var element in service.SelectGroup())
            {
                cbGroup.Items.Add(new { Value = element.ID_Group, Text = element.Name + " " + element.Number });
            }

            cbSubject.SelectedValuePath = "Value";
            cbSubject.DisplayMemberPath = "Text";

            foreach (var element in service.SelectSubject())
            {
                cbSubject.Items.Add(new { Value = element.ID_Subject, Text = element.Name });
            }
        }