예제 #1
0
 private void OnEdit(object sender, RoutedEventArgs e)
 {
     Models.EmployeeInfo emp = this.Dgrid.SelectedItem as Models.EmployeeInfo;
     modalWindow = new ModalWin(emp);
     modalWindow.Title = "编辑员工窗口";
     modalWindow.Tag = "edit";
     modalWindow.Closed += (s1, e1) =>
     {
         if (modalWindow.DialogResult == true)
             GetEmployess();
     };
     modalWindow.Show();
 }
예제 #2
0
 private void OnCreate(object sender, RoutedEventArgs e)
 {
     var emp = new Models.EmployeeInfo();
     byte[] buffer = Guid.NewGuid().ToByteArray();
     emp.Id = BitConverter.ToInt32(buffer, 0);
     emp.Birthday = DateTime.Now.AddYears(-20);
     modalWindow = new ModalWin(emp);
     modalWindow.Title = "添加员工窗口";
     modalWindow.Tag = "add";
     modalWindow.Closed += (s1, e1) =>
     {
         if (modalWindow.DialogResult == true)
             GetEmployess();
     };
     modalWindow.Show();
 }