Beispiel #1
0
        private void Btn_Save_Click(object sender, EventArgs e)
        {
            if (!CheckStuInfo())
            {
                return;
            }
            if (!StudentMS_logic.IsEditStatus())
            {
                return;
            }
            else if (Status.IsAdding_Status)
            {
                if (MessageBox.Show("是否保存新学生信息", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2) == DialogResult.Yes)
                {
                    FillObjectInfo();

                    if (StudentMS_logic.AddStudentInfo(studentExt) == false)
                    {
                        return;
                    }
                    else
                    {
                        MessageBox.Show("保存成功", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                        Log.AddLog(Program.Current_root.Account_num, Do.Add, Object_id.Student, studentExt.Student_id);
                        StudentMS_logic.DGV_studentInfo_Load(this.DGV_studentInfo);
                        Data_Load();
                    }
                }
                else
                {
                    return;
                }
            }
        }
Beispiel #2
0
 private void Btn_Add_Click(object sender, EventArgs e)
 {
     if (!StudentMS_logic.IsEditStatus())
     {
         return;
     }
     else
     {
         Add_Clear();
         Status.EdittingStatus  = true;
         Status.IsAdding_Status = true;
         EditCon_Load();
     }
 }
Beispiel #3
0
 private void Btn_Cancel_Click(object sender, EventArgs e)
 {
     if (!StudentMS_logic.IsEditStatus())
     {
         return;
     }
     else if (Status.IsAdding_Status == false)
     {
         if (MessageBox.Show("是否放弃修改?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2) == DialogResult.Yes)
         {
             StudentMS_logic.DGV_studentInfo_Load(this.DGV_studentInfo);
             Data_Load();
         }
     }
     else if (Status.IsAdding_Status == true)
     {
         if (MessageBox.Show("是否放弃添加", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2) == DialogResult.Yes)
         {
             StudentMS_logic.DGV_studentInfo_Load(this.DGV_studentInfo);
             Data_Load();
             Status.IsAdding_Status = false;
         }
     }
 }