private void ListViewStaff1_SelectionChanged_1(object sender, SelectionChangedEventArgs e) { Activechild.Setactivechild((Child)ListViewStaff1.SelectedItem); guardian = DbOperations.GetGuardianOfChild(Activechild.Id); getguardian(); UpdateSchedule(); UpdateChildLabel(); }
private void ComboBoxChildren_SelectionChanged(object sender, SelectionChangedEventArgs e) { if (comboBoxChildren.SelectedItem != null) { Activechild.Setactivechild((Child)comboBoxChildren.SelectedItem); UpdateSchedule(); } }
private void ListViewChildren_SelectionChanged(object sender, SelectionChangedEventArgs e) { try { Activechild.Setactivechild((Child)ListViewChildren.SelectedItem); UpdateChild(); } catch (PostgresException ex) { MessageBox.Show(ex.Message); } }
private void BtnChange_Click(object sender, RoutedEventArgs e) { try { Class classes = (Class)comboBoxClass.SelectedItem; Activechild.Setactivechild((Child)ListViewChildren.SelectedItem); DbOperations.UpdateChildProperties(txtboxFirstName.Text, txtboxLastName.Text, int.Parse(txtboxAge.Text), classes.Id); Updatelists(); ClearTextbox(); UpdatedMessage(); } catch (PostgresException ex) { MessageBox.Show(ex.Message); } }
public void DataBinding() { //Hämta barn children = DbOperations.GetChildrenOfGuardian(); comboBoxChildren.ItemsSource = children; comboBoxChildren.DisplayMemberPath = "Fullinformation"; comboBoxChildren.SelectedIndex = 0; //Hämta barn se children = DbOperations.GetChildrenOfGuardian(); comboBoxChildren2.ItemsSource = children; comboBoxChildren2.DisplayMemberPath = "Fullinformation"; comboBoxChildren2.SelectedIndex = 0; //Hämta frånvaro typer attendancecategories = DbOperations.GetAttendances(); comboBoxAbscence.ItemsSource = attendancecategories; comboBoxAbscence.DisplayMemberPath = "Fullinformation"; comboBoxAbscence.SelectedIndex = 0; //Hämta veckor weeks = DbOperations.GetWeek(); comboBoxWeek.ItemsSource = weeks; comboBoxWeek.DisplayMemberPath = "InformationWeek"; //Hämta dagar Weeks week = new Weeks(); week.Week = 1; dates = DbOperations.GetDays(week); comboBoxDay.ItemsSource = dates; comboBoxDay.DisplayMemberPath = "InformationDay"; Activechild.Setactivechild((Child)comboBoxChildren.SelectedItem); }
private void ListViewGuardianChild_SelectionChanged(object sender, SelectionChangedEventArgs e) { Activechild.Setactivechild((Child)listViewGuardianChild.SelectedItem); }
private void SetActiveChild(ComboBox comboBox) { Activechild.Setactivechild((Child)comboBox.SelectedItem); }