示例#1
0
        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);
            }
        }
        private void btnSave_Click(object sender, EventArgs e)
        {
            if (chkSaveYes.Checked == true)
            {
                List <JHSchool.Data.JHCourseRecord> courseRecs = new List <JHSchool.Data.JHCourseRecord>();
                foreach (DAL.AttendCourseEntity ace in studAttendCourseEntitys)
                {
                    if (ace.CousreAttendType == DAL.AttendCourseEntity.AttendType.學生未修)
                    {
                        courseRecs.Add(ace.CourseRec);
                    }
                }
                // 待加入儲存
                if (courseRecs.Count > 0)
                {
                    DAL.DALTransfer2.SetStudentAttendCourse(studRec.ID, courseRecs);

                    string CourseName = "";

                    foreach (JHCourseRecord cor in courseRecs)
                    {
                        CourseName += cor.Name + ",";
                    }

                    // log
                    JHSchool.PermRecLogProcess prlp = new JHSchool.PermRecLogProcess();
                    prlp.SaveLog("學籍.學生轉入異動", "新增學生課程", "新增學生" + studRec.Name + "的課程,課程名稱:" + CourseName);
                }
            }

            // 學生課程成績輸入
            AddTransStudCourseScore ATSCS = new AddTransStudCourseScore(studRec);

            this.Visible        = false;
            ATSCS.StartPosition = FormStartPosition.CenterParent;
            ATSCS.ShowDialog();
        }