private void ChangeWage(object sender, RoutedEventArgs e) { ADEDS.Worker a = (ADEDS.Worker)lvWorkers.SelectedItem; if (a != null) { a.wageChange(Int32.Parse(tbWage.Text)); } lvWorkers.Items.Refresh(); }
private void LvWorkers_SelectionChanged(object sender, SelectionChangedEventArgs e) { ADEDS.Worker a = (ADEDS.Worker)lvWorkers.SelectedItem; if (a == null) { tbWage.Text = ""; } else { tbWage.Text = a.wage.ToString(); } }
private void ChangeITSpecialist(object sender, RoutedEventArgs e) { ADEDS.Worker a = (ADEDS.Worker)lvWorkers.SelectedItem; if (a != null) { if (a.is_IT_spec.Equals("X")) { workerList.Remove(a); workerList.Add(new ITSpecialist(a)); workerList.Sort((x, y) => string.Compare(x.lastName, y.lastName)); lvWorkers.Items.Refresh(); } } }