private void Page_Loaded(object sender, RoutedEventArgs e) { var orgs = DataManagement.RetrieveOrganizationChart(); OrgCom.Items.Clear(); if (orgs.Count > 0) { foreach (var item in orgs) { OrgCom.Items.Add(item.Title); } } var positions = DataManagement.RetrievePositions(); foreach (var item in positions) { var temp = new ComboBoxItem(); temp.Content = item.PositionTitle; temp.Tag = item.PositionId; PositionTxt.Items.Add(temp); } FNameTxt.Text = ""; LNameTxt.Text = ""; PositionTxt.Text = ""; OrgCom.SelectedIndex = -1; PositionTxt.SelectedIndex = -1; FNameTxt.Focus(); Grid.ItemsSource = null; }
private void RefreshBtn_Click(object sender, RoutedEventArgs e) { FNameTxt.Text = ""; LNameTxt.Text = ""; PositionTxt.Text = ""; PositionTxt.SelectedIndex = -1; OrgCom.SelectedIndex = -1; FNameTxt.Focus(); }