Ejemplo n.º 1
0
 public Subject()
 {
     InitializeComponent();
     dataGrid.ItemsSource = service.SelectSubject();
     gridDB.Visibility    = Visibility.Hidden;
     dataGrid.Visibility  = Visibility.Visible;
 }
Ejemplo n.º 2
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 });
            }
        }