示例#1
0
        private void addPersonButton_Click(object sender, RoutedEventArgs e)
        {
            EditPersonWindow editPersonWindow1 = new EditPersonWindow();
            Person           p = new Person();

            //editPersonWindow1.
            model1.Persons.AddObject(p);
            //model1.Projects.First().Persons.Add(p);
        }
示例#2
0
        private void personsDataGrid_MouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            if (personsDataGrid.SelectedIndex != -1)
            {
                EditPersonWindow editPersonWindow1 = new EditPersonWindow();
                var t = personsDataGrid.SelectedItem; int id = (int)t.GetType().GetProperty("Id").GetValue(t, null);
                editPersonWindow1.Person_Id = id;

                editPersonWindow1.ShowDialog();
            }
        }
示例#3
0
        private void personsDataGrid_MouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            if (personsDataGrid.SelectedIndex != -1)
            {
                EditPersonWindow editPersonWindow1 = new EditPersonWindow();
                var t = personsDataGrid.SelectedItem; int id = (int)t.GetType().GetProperty("Id").GetValue(t, null);
                editPersonWindow1.Person_Id = id;

                editPersonWindow1.ShowDialog();
            }
        }
示例#4
0
 private void addPersonButton_Click(object sender, RoutedEventArgs e)
 {
     EditPersonWindow editPersonWindow1 = new EditPersonWindow();
     Person p = new Person();
     //editPersonWindow1.
     model1.Persons.AddObject(p);
     //model1.Projects.First().Persons.Add(p);
 }