示例#1
0
        private void Button_ClickAdd(object sender, RoutedEventArgs e)
        {
            Employer       emp      = new Employer();
            WindowEmployer childWin = new WindowEmployer(emp);

            if (childWin.ShowDialog() == true)
            {
                employers.Add(emp);
            }
        }
示例#2
0
 private void Button_ClickEdit(object sender, RoutedEventArgs e)
 {
     if (list.SelectedIndex != -1)
     {
         Employer       emp      = list.SelectedItem as Employer;
         WindowEmployer childWin = new WindowEmployer(emp);
         if (childWin.ShowDialog() == true)
         {
             employers[list.SelectedIndex] = emp;
         }
     }
 }