예제 #1
0
 private void btnYes_Click(object sender, EventArgs e)
 {
     if (!_ViewModel.Modify(NewStudent = StuInfoControl.GetStudent()))
     {
         MessageBox.Show("修改失败!!!");
     }
     else
     {
         this.DialogResult = DialogResult.OK;
         this.Close();
     }
 }
예제 #2
0
        private void btnYes_Click(object sender, EventArgs e)
        {
            StudentMsg student = StuInfoControl.GetStudent();

            if (student == null)
            {
                //MessageBox.Show("添加失败!!!", "错误", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                return;
            }
            else
            {
                _ViewModel.AddStudent(student);
            }
        }
예제 #3
0
 public ModifyWindow(StudentMsg student) : this()
 {
     StuInfoControl.SetStudent(student);
 }