private void btnOK_Click(object sender, EventArgs e) { AddTransStudBase.AddTransStudStatus status; if (string.IsNullOrEmpty(txtSSN.Text)) { return; } if (AddTransBackgroundManager.GetHasStudentData() == false || (txtSSN.Text != AddTransBackgroundManager.StudentIDNumber)) { AddTransBackgroundManager.SetStudentBySSN(txtSSN.Text.ToUpper()); } AddTransBackgroundManager.StudentIDNumber = txtSSN.Text.ToUpper(); // 已有學生資料 if (AddTransBackgroundManager.GetHasStudentData()) { status = AddTransStudBase.AddTransStudStatus.Modify; } else { status = AddTransStudBase.AddTransStudStatus.Added; } setTransClassAndCourse(status, AddTransBackgroundManager.GetStudent()); //StudentEntity student=null ; //if (AddTransBackgroundManager.GetCheckSSN()==false ) //{ //student = DAL.TransferDAL.GetStudent(txtSSN.Text); //} //if (student == null) //{ // // 修改先不新增學生 // // student = DAL.TransferDAL.AddStudent(txtSSN.Text); // status = AddTransStudBase.AddTransStudStatus.Added; //} //else // status = AddTransStudBase.AddTransStudStatus.Modify; //setTransClassAndCourse(status, student); }
private void btnOk_Click(object sender, EventArgs e) { string sid = AddTransBackgroundManager.GetStudent().ID; JHSchool.Data.JHStudentRecord StudRec = JHSchool.Data.JHStudent.SelectByID(sid); if (chkStudBase.Checked) { AddTransStudBaseData atsbd = new AddTransStudBaseData(AddTransBackgroundManager.GetStudent()); atsbd.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; atsbd.ShowDialog(FISCA.Presentation.MotherForm.Form); } if (chkStudCourse.Checked) { AddTransStudCourse atsc = new AddTransStudCourse(StudRec); atsc.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; atsc.ShowDialog(FISCA.Presentation.MotherForm.Form); } if (chkStudCourseScore.Checked) { AddTransStudCourseScore atscs = new AddTransStudCourseScore(StudRec); atscs.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; atscs.ShowDialog(FISCA.Presentation.MotherForm.Form); } if (chkSemesterHistory.Checked) { AddTransStudSemesterHistory atssh = new AddTransStudSemesterHistory(StudRec); atssh.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; atssh.ShowDialog(FISCA.Presentation.MotherForm.Form); } if (chkStudSemsSubjScore.Checked) { AddTransStudSemsSubjScore atssss = new AddTransStudSemsSubjScore(AddTransBackgroundManager.GetStudent()); atssss.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; atssss.ShowDialog(FISCA.Presentation.MotherForm.Form); } if (chkStudUpdateRec.Checked) { AddTransStudUpdateRecord atsur = new AddTransStudUpdateRecord(AddTransBackgroundManager.GetStudent()); atsur.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; atsur.ShowDialog(FISCA.Presentation.MotherForm.Form); } }