Exemple #1
0
        private void btnPrint_Click(object sender, EventArgs e)
        {
            if (!IsValid())
            {
                return;
            }

            ReportConfiguration rc = new ReportConfiguration(Global.ReportName);

            rc.SetString("缺曠獎懲統計開始日期", txtSDate.Text);
            rc.SetString("缺曠獎懲統計結束日期", txtEDate.Text);
            rc.Save();

            _config.StartDate = DateTime.Parse(txtSDate.Text);
            _config.EndDate   = DateTime.Parse(txtEDate.Text);

            List <JHStudentRecord> students = JHStudent.SelectByIDs(K12.Presentation.NLDPanels.Student.SelectedSource);

            //排序學生
            students.Sort(SortStudentByClassSeatNo);
            _config.Students = students;

            _config.SchoolYear = (int)cboSchoolYear.SelectedItem;
            _config.Semester   = (int)cboSemester.SelectedItem;

            _config.Load();
            Report report = new Report(_config);

            report._SchoolYear = cboSchoolYear.Text;
            report._Semester   = cboSemester.Text;
            report.Generate();

            this.DialogResult = DialogResult.OK;
        }
Exemple #2
0
        public static void Main()
        {
            string  code   = "JHEvaluation.Student.AttendCourseDuplReport";
            Catalog detail = RoleAclSource.Instance["學生"]["報表"];

            detail.Add(new ReportFeature(code, "學生學期修課檢查表"));

            MenuButton mb = K12.Presentation.NLDPanels.Student.RibbonBarItems["資料統計"]["報表"]["成績相關報表"]["學生學期修課檢查表"];

            mb.Enable = false;
            mb.Click += delegate
            {
                SemesterSelect selectForm = new SemesterSelect();
                if (selectForm.ShowDialog() == DialogResult.OK)
                {
                    List <JHStudentRecord> students = JHStudent.SelectByIDs(K12.Presentation.NLDPanels.Student.SelectedSource);
                    DuplicationCheck       check    = new DuplicationCheck(students, selectForm.SchoolYear, selectForm.Semester);
                    check.Run();
                }
            };

            //權限判斷。
            K12.Presentation.NLDPanels.Student.SelectedSourceChanged += delegate
            {
                mb.Enable = (K12.Presentation.NLDPanels.Student.SelectedSource.Count > 0) &&
                            Framework.User.Acl[code].Executable;
            };
        }
Exemple #3
0
 void _BGWorker_DoWork(object sender, DoWorkEventArgs e)
 {
     // 取得學生資料、學生電話、父母電話
     _StudRec      = JHStudent.SelectByID(PrimaryKey);
     _PhoneRec     = JHPhone.SelectByStudentID(PrimaryKey);
     _ParentRecord = JHParent.SelectByStudentID(PrimaryKey);
 }
Exemple #4
0
        /// <summary>
        /// 取得全部學生的資料(只包含一般、輟學)。
        /// </summary>
        /// <returns></returns>
        public static List <ReportStudent> GetAllStudents(List <ReportStudent> printStudents)
        {
            //2019/2/25 俊緯更新 高雄國中 在校成績證明書 效能問題,原本此處抓取了全部的學生的資料,包含已畢業及離校,現在修改成只抓取在校生及使用者所選取的非在校生的資料
            List <ReportStudent> students = new List <ReportStudent>();

            foreach (JHStudentRecord each in JHStudent.SelectAll())
            {
                if (each.Status == K12.Data.StudentRecord.StudentStatus.一般 ||
                    each.Status == K12.Data.StudentRecord.StudentStatus.輟學)
                {
                    students.Add(new ReportStudent(each));
                }
                else
                {
                    foreach (ReportStudent reportStudent in printStudents)
                    {
                        if (each.ID == reportStudent.StudentID)
                        {
                            students.Add(new ReportStudent(each));
                        }
                    }
                }
            }

            return(students);
        }
Exemple #5
0
        /// <summary>
        /// Group By 科目清單,儲存於 Subjects  變數中。
        /// (限制在已選擇的學生有修的才算)。
        /// </summary>
        /// <param name="semsScores"></param>
        //private void GroupBySubjects(List<JHSemesterScoreRecord> semsScores)
        private void GroupBySubjects(List <InternalExamScoreRecord> examScores)
        {
            SubjectDomainMap = new Dictionary <string, string>();
            Dictionary <string, string> groupBySubject = new Dictionary <string, string>();

            //Group By 可選擇的科目清單。
            Dictionary <string, ReportStudent> dicSelectedStudents = JHStudent.SelectByClassIDs(
                SelectedClasses.ToKeys()).ToReportStudent().ToDictionary();

            // TODO: 這裡
            //foreach (JHSemesterScoreRecord eachScore in semsScores)
            foreach (InternalExamScoreRecord eachScore in examScores)
            {
                //如果成績不屬於已選擇的學生之中,就跳到下一筆。
                if (!dicSelectedStudents.ContainsKey(eachScore.RefStudentID))
                {
                    continue;
                }

                foreach (SubjectScore each in eachScore.Subjects.Values)
                {
                    if (!groupBySubject.ContainsKey(each.Subject))
                    {
                        groupBySubject.Add(each.Subject, null);
                        SubjectDomainMap.Add(each.Subject, each.Domain);
                    }
                }
            }

            //所有可選擇的科目。
            Subjects = new List <string>(groupBySubject.Keys);
            Subjects.Sort(new Comparison <string>(SubjectSorter.Sort));
        }
Exemple #6
0
        public static List <string> GetGradeyearStudents(int gradeYear)
        {
            List <JHStudentRecord> allstudent = JHStudent.SelectAll();

            List <string> gyStudent = new List <string>();

            foreach (JHStudentRecord each in allstudent)
            {
                if (each.Status != StudentRecord.StudentStatus.一般)
                {
                    continue;
                }

                JHClassRecord cr = each.Class;

                if (cr == null)
                {
                    continue;
                }
                if (!cr.GradeYear.HasValue)
                {
                    continue;
                }
                if (cr.GradeYear.Value != gradeYear)
                {
                    continue;
                }

                gyStudent.Add(each.ID);
            }

            return(gyStudent);
        }
Exemple #7
0
        private void txtSeatNo_TextChanged(object sender, EventArgs e)
        {
            bool pass = false;

            pictureBox2.Visible = false;
            if (txtSeatNo.Text != "")
            {
                foreach (JHClassRecord cr in JHClass.SelectAll())
                {
                    if (cr.Name == txtClassName.Text)
                    {
                        foreach (JHStudentRecord studRec in JHStudent.SelectAll())
                        {
                            if (studRec.Status == K12.Data.StudentRecord.StudentStatus.一般 || studRec.Status == K12.Data.StudentRecord.StudentStatus.輟學)
                            {
                                if (studRec.Class != null && studRec.SeatNo.HasValue)
                                {
                                    if (studRec.Class.Name == txtClassName.Text && studRec.SeatNo.ToString() == txtSeatNo.Text)
                                    {
                                        pass = true;
                                    }
                                }
                            }
                        }
                    }
                }
                if (pass)
                {
                    pictureBox2.Visible = true;
                }
            }
        }
Exemple #8
0
 private void txtSeatNo_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.KeyData == Keys.Enter && txtSeatNo.Text != "")
     {
         foreach (JHClassRecord cr in JHClass.SelectAll())
         {
             if (cr.Name == txtClassName.Text)
             {
                 foreach (JHStudentRecord studRec in JHStudent.SelectAll())
                 {
                     // 只加入一般或輟學
                     if (studRec.Status == K12.Data.StudentRecord.StudentStatus.一般 || studRec.Status == K12.Data.StudentRecord.StudentStatus.輟學)
                     {
                         if (studRec.Class != null && studRec.SeatNo.HasValue)
                         {
                             if (studRec.SeatNo.Value.ToString() == txtSeatNo.Text && studRec.Class.Name == txtClassName.Text)
                             {
                                 if (!K12.Presentation.NLDPanels.Student.TempSource.Contains(studRec.ID))
                                 {
                                     List <string> ids = new List <string>();
                                     ids.Add(studRec.ID);
                                     K12.Presentation.NLDPanels.Student.AddToTemp(ids);
                                 }
                                 txtClassName.Focus();
                             }
                         }
                     }
                 }
             }
         }
     }
 }
Exemple #9
0
        public MainForm(List <string> classes)
        {
            InitializeComponent();

            this.MinimumSize = this.Size;
            this.MaximumSize = this.Size;

            cbExam.DisplayMember = "Name";
            cbScore.Items.Add("定期");
            cbScore.Items.Add("平時");
            cbScore.Items.Add("定期加平時平均");
            cbScore.SelectedIndex = 0;

            cbExam.Items.Add("");
            foreach (JHExamRecord exam in JHExam.SelectAll())
            {
                cbExam.Items.Add(exam);
            }
            cbExam.SelectedIndex = 0;

            cbExam.SelectedIndexChanged += new EventHandler(cbExam_SelectedIndexChanged);

            LoadingSubject.Visible = false;
            LoadingDomain.Visible  = false;

            //準備相關學生、班級資料。
            ReportStudent.SetClassMapping(JHClass.SelectAll());
            SelectedClasses = JHClass.SelectByIDs(classes); //要列印成績單的班級清單。
            AllStudents     = JHStudent.SelectAll().ToReportStudent();
        }
Exemple #10
0
        public static void Main()
        {
            Global.Params = ModuleLoader.GetDeployParametsers(typeof(Program), "Mode=KaoHsiung");

            //學生學期成績
            string key = "JHSchool.Student.Detail0050";

            if (FISCA.Permission.UserAcl.Current[key].Editable || FISCA.Permission.UserAcl.Current[key].Viewable)
            {
                K12.Presentation.NLDPanels.Student.AddDetailBulider(new DetailBulider <SemesterScoreItem>());
            }

            JHSchool.SF.Evaluation.SemesterScoreEditor.RegisterHandler(delegate(string studentId)
            {
                SemesterScoreEditor form;
                form = new SemesterScoreEditor(JHStudent.SelectByID(studentId));
                return(form.ShowDialog());
            });
            JHSchool.SF.Evaluation.SemesterScoreEditor.RegisterHandler(delegate(string studentId, int schoolYear, int semester)
            {
                SemesterScoreEditor form;
                form = new SemesterScoreEditor(JHStudent.SelectByID(studentId), JHSemesterScore.SelectBySchoolYearAndSemester(studentId, schoolYear, semester));
                return(form.ShowDialog());
            });
        }
Exemple #11
0
        public MainForm(List <string> classes)
        {
            InitializeComponent();

            //準備相關學生、班級資料。
            ReportStudent.SetClassMapping(JHClass.SelectAll());
            SelectedClasses = JHClass.SelectByIDs(classes); //要列印成績單的班級清單。
            AllStudents     = JHStudent.SelectAll().ToReportStudent();
        }
        public DataRationalityMessage Execute()
        {
            CanAutoCorrectStudentIDs.Clear();
            LogBuilder = new StringBuilder();
            LogBuilder.AppendLine("學生系統編號,身分證號,學號,班級,座號,姓名,狀態,學年度,學期,異動類別,原因及事項,異動日期,轉出後學校");

            DataRationalityMessage Message = new DataRationalityMessage();

            List <JHStudentRecord> Students = JHStudent.SelectAll().Where(x => x.Status == K12.Data.StudentRecord.StudentStatus.一般).ToList();

            List <JHUpdateRecordRecord> UpdateRecords = JHUpdateRecord.SelectByStudentIDs(Students.Select(x => x.ID)).Where(x => x.UpdateCode.Equals("4")).ToList();

            StringBuilder strBuilder = new StringBuilder();

            strBuilder.AppendLine("檢查學生筆數:" + Students.Count);
            strBuilder.AppendLine("問題學生筆數:" + UpdateRecords.Count);

            if (UpdateRecords.Count > 0)
            {
                strBuilder.AppendLine("建議修正方案:");
                strBuilder.AppendLine("1.將學生加入至待處理,手動變更學生的狀態為『畢業或離校』或『刪除』。");
                strBuilder.AppendLine("2.運用本合理性檢查自動修正功能,將學生的狀態批次變更為『刪除』。");
                strBuilder.AppendLine("3.若您運用本合理性檢查自動修正功能,建議先單選1位學生進行嘗試,確認正確變更為『刪除』狀態再進行批次作業。");
            }

            var StudentUpdateRecords = UpdateRecords.Join(Students, UpdateRecord => UpdateRecord.StudentID, Student => Student.ID, (UpdateRecord, Student) =>
                                                          new
            {
                學生系統編號 = Student.ID,
                身分證號   = Student.IDNumber,
                學號     = Student.StudentNumber,
                班級     = Student.Class != null ? Student.Class.Name : string.Empty,
                座號     = K12.Data.Int.GetString(Student.SeatNo),
                姓名     = Student.Name,
                狀態     = Student.StatusStr,
                學年度    = K12.Data.Int.GetString(UpdateRecord.SchoolYear),
                學期     = K12.Data.Int.GetString(UpdateRecord.Semester),
                異動類別   = "轉出",
                原因及事項  = UpdateRecord.UpdateDescription,
                異動日期   = UpdateRecord.UpdateDate,
                轉出後學校  = UpdateRecord.ImportExportSchool,
            });

            foreach (var r in StudentUpdateRecords)
            {
                LogBuilder.AppendLine(r.學生系統編號 + "," + r.身分證號 + "," + r.學號 + "," + r.班級 + "," + r.座號 + "," + r.姓名 + "," + r.狀態 + "," + r.學年度 + "," + r.學期 + "," + r.異動類別 + "," + r.原因及事項 + "," + r.異動日期 + "," + r.轉出後學校);
            }


            Message.Data    = StudentUpdateRecords.ToList();
            Message.Message = strBuilder.ToString();

            CanAutoCorrectStudentIDs.AddRange(UpdateRecords.Select(x => x.StudentID).Distinct());

            return(Message);
        }
Exemple #13
0
        /// <summary>
        /// 將學生編號轉換成 SCStudent 物件。
        /// </summary>
        /// <remarks>使用指定的學生編號,向 DAL 取得 VO 後轉換成 SCStudent 物件。</remarks>
        public static List <ReportStudent> ToReportStudent(this IEnumerable <string> studentIDs)
        {
            List <ReportStudent> students = new List <ReportStudent>();

            foreach (JHStudentRecord each in JHStudent.SelectByIDs(studentIDs))
            {
                students.Add(new ReportStudent(each));
            }
            return(students);
        }
Exemple #14
0
        void _BGWorker_DoWork(object sender, DoWorkEventArgs e)
        {
            // Get Photo
            _FreshmanPhotoStr = _GraduatePhotoStr = string.Empty;
            _FreshmanPhotoStr = K12.Data.Photo.SelectFreshmanPhoto(PrimaryKey);
            _GraduatePhotoStr = K12.Data.Photo.SelectGraduatePhoto(PrimaryKey);

            // studentRec
            _StudRec = JHStudent.SelectByID(PrimaryKey);
        }
        private static List <StudentScore> ToStudentScore(IEnumerable <string> studentIDs)
        {
            List <StudentScore> students = new List <StudentScore>();

            foreach (JHStudentRecord each in JHStudent.SelectByIDs(studentIDs))
            {
                students.Add(new StudentScore(each));
            }
            return(students);
        }
        //一般新增
        private void btnNornalAdd_Click(object sender, EventArgs e)
        {
            SemesterScoreEditor form = new SemesterScoreEditor(JHStudent.SelectByID(PrimaryKey));

            if (form.ShowDialog() == DialogResult.OK)
            {
                LoadSemesterScores();
            }

            listView.Focus();
        }
Exemple #17
0
        /// <summary>
        /// 取得全部學生的資料(只包含一般、輟學)。
        /// </summary>
        /// <returns></returns>
        public static List <ReportStudent> GetAllStudents()
        {
            List <ReportStudent> students = new List <ReportStudent>();

            foreach (JHStudentRecord each in JHStudent.SelectAll())
            {
                students.Add(new ReportStudent(each));
            }

            return(students);
        }
Exemple #18
0
        private void ChangeStudentsScoreCalcRuleID(string id)
        {
            _logSaver.ClearBatch();
            List <StudentRecordEditor> studentRecordEditors = new List <StudentRecordEditor>();

            foreach (var stu in Student.Instance.SelectedList)
            {
                StudentRecordEditor editor = stu.GetEditor();
                editor.OverrideScoreCalcRuleID = id;
                studentRecordEditors.Add(editor);

                string s = string.Empty;
                if (stu.Class != null)
                {
                    s += stu.Class.Name;
                    if (stu.SeatNo != "")
                    {
                        s += "(" + stu.SeatNo + "號)";
                    }
                    s += " ";
                }
                if (stu.StudentNumber != "")
                {
                    s += stu.StudentNumber + " ";
                }
                if (s == "")
                {
                    s += "學生:";
                }
                s += stu.Name;

                string desc = string.Empty;
                if (string.IsNullOrEmpty(id))
                {
                    desc = string.Format("學生「{0}」不指定計算規則", s);
                }
                else
                {
                    desc = string.Format("學生「{0}」指定計算規則為:{1}", s, ScoreCalcRule.Instance.Items[id].Name);
                }
                _logSaver.AddBatch("成績系統.計算規則", "學生指定計算規則", desc);
            }
            if (studentRecordEditors.Count > 0)
            {
                studentRecordEditors.SaveAllEditors();
                _logSaver.LogBatch();

                // 同步 JHDAL
                List <string> StudentIDs = (from data in Student.Instance.SelectedList select data.ID).ToList();
                JHStudent.RemoveByIDs(StudentIDs);
                JHStudent.SelectByIDs(StudentIDs);
            }
        }
        private void btnView_Click(object sender, EventArgs e)
        {
            //btnModify_Click(sender, e);
            if (listView.SelectedItems.Count <= 0)
            {
                return;
            }

            SemesterScoreEditor form = new SemesterScoreEditor(JHStudent.SelectByID(PrimaryKey), listView.SelectedItems[0].Tag as JHSemesterScoreRecord, false);

            form.ShowDialog();
        }
        private void OpenScoreInputForm()
        {
            if (listView.SelectedItems.Count <= 0)
            {
                return;
            }

            ListViewItem   item   = listView.SelectedItems[0];
            JHCourseRecord course = item.Tag as JHCourseRecord;
            ScoreInputForm form   = new ScoreInputForm(JHStudent.SelectByID(PrimaryKey), course);

            form.ShowDialog();
        }
Exemple #21
0
            public List <JHStudentRecord> GetAttendStudents(JHCourseRecord course)
            {
                List <JHStudentRecord> list = new List <JHStudentRecord>();

                if (ContainsKey(course.ID))
                {
                    foreach (JHSCAttendRecord sca in this[course.ID])
                    {
                        list.Add(JHStudent.SelectByID(sca.RefStudentID));
                    }
                }
                return(list);
            }
Exemple #22
0
        public Form1()
        {
            InitializeComponent();

            FISCA.Authentication.DSAServices.SetLicense("SmartSchoolLicense.key");
            FISCA.Authentication.DSAServices.Login("adrnin", "1234");

            Student = JHStudent.SelectByID("147285");
            listBox1.DisplayMember = "SchoolYear";
            foreach (var record in JHSemesterScore.SelectByStudentID(Student.ID))
            {
                listBox1.Items.Add(record);
            }
        }
Exemple #23
0
 private void txtStudentNumber_TextChanged(object sender, EventArgs e)
 {
     pictureBox3.Visible = false;
     if (txtStudentNumber.Text != "")
     {
         foreach (JHStudentRecord studRec in JHStudent.SelectAll())
         {
             if (studRec.StudentNumber == txtStudentNumber.Text)
             {
                 pictureBox3.Visible = true;
             }
         }
     }
 }
Exemple #24
0
        /// <summary>
        /// 取得全部學生的資料(只包含一般、輟學)。
        /// </summary>
        /// <returns></returns>
        public static List <ReportStudent> GetAllStudents()
        {
            List <ReportStudent> students = new List <ReportStudent>();

            foreach (JHStudentRecord each in JHStudent.SelectAll())
            {
                if (each.Status == K12.Data.StudentRecord.StudentStatus.一般 ||
                    each.Status == K12.Data.StudentRecord.StudentStatus.輟學)
                {
                    students.Add(new ReportStudent(each));
                }
            }
            return(students);
        }
Exemple #25
0
        private List <JHStudentRecord> GetInSchoolStudents()
        {
            List <JHStudentRecord> list = new List <JHStudentRecord>();

            foreach (JHStudentRecord student in JHStudent.SelectAll())
            {
                if (student.Status == StudentRecord.StudentStatus.一般 ||
                    student.Status == StudentRecord.StudentStatus.輟學)
                {
                    list.Add(student);
                }
            }
            return(list);
        }
        private void ChangeStudentsProgramPlanID(string id)
        {
            _logSaver.ClearBatch();

            List <JHStudentRecord> studentList = new List <JHStudentRecord>();

            foreach (var stu in JHStudent.SelectByIDs(K12.Presentation.NLDPanels.Student.SelectedSource))
            {
                stu.OverrideProgramPlanID = id;
                studentList.Add(stu);

                string s = string.Empty;
                if (stu.Class != null)
                {
                    s += stu.Class.Name;
                    if ("" + stu.SeatNo != "")
                    {
                        s += "(" + stu.SeatNo + "號)";
                    }
                    s += " ";
                }
                if (stu.StudentNumber != "")
                {
                    s += stu.StudentNumber + " ";
                }
                if (s == "")
                {
                    s += "學生:";
                }
                s += stu.Name;

                string desc = string.Empty;
                if (string.IsNullOrEmpty(id))
                {
                    desc = string.Format("學生「{0}」不指定課程規劃", s);
                }
                else
                {
                    desc = string.Format("學生「{0}」指定課程規劃為:{1}", s, ProgramPlan.Instance.Items[id].Name);
                }
                _logSaver.AddBatch("成績系統.課程規劃", "學生指定課程規劃", desc);
            }
            if (studentList.Count > 0)
            {
                JHStudent.Update(studentList);
                _logSaver.LogBatch();
            }
        }
Exemple #27
0
        protected override void OnSaveButtonClick(EventArgs e)
        {
            LeaveInfoRec.ClassName     = txtClass.Text;
            LeaveInfoRec.DiplomaNumber = txtGDNumber.Text;
            LeaveInfoRec.Memo          = txtMemo.Text;
            LeaveInfoRec.Reason        = cboReason.Text;
            int SchoolYear = 0;

            if (string.IsNullOrEmpty(txtSchoolYear.Text))
            {
                LeaveInfoRec.SchoolYear = null;
            }
            else
            {
                if (int.TryParse(txtSchoolYear.Text, out SchoolYear))
                {
                    LeaveInfoRec.SchoolYear = SchoolYear;
                }
                else
                {
                    epSchoolYear.SetError(txtSchoolYear, "請輸入整數");
                    return;
                }
            }
            JHSchool.Data.JHLeaveIfno.Update(LeaveInfoRec);

            SaveButtonVisible   = false;
            CancelButtonVisible = false;
            //Student.Instance.SyncDataBackground(PrimaryKey);
            //            this._DefaultClass = txtClass.Text;
            this._DefaultGDNumber   = txtGDNumber.Text;
            this._DefaultMemo       = txtMemo.Text;
            this._DefaultSchoolYear = txtSchoolYear.Text;
            this._DefaultReason     = cboReason.Text;

            prlp.SetAfterSaveText("畢業學年度", txtSchoolYear.Text);
            prlp.SetAfterSaveText("畢業資格", cboReason.Text);
            prlp.SetAfterSaveText("畢業證書字號", txtGDNumber.Text);
            prlp.SetAfterSaveText("畢業相關訊息", txtMemo.Text);
            prlp.SetActionBy("學籍", "學生畢業資訊");
            prlp.SetAction("修改學生畢業資訊");
            JHStudentRecord studRec = JHStudent.SelectByID(PrimaryKey);

            prlp.SetDescTitle("學生姓名:" + studRec.Name + ",學號:" + studRec.StudentNumber + ",");

            prlp.SaveLog("", "", "student", PrimaryKey);
            // BindDataToForm();
        }
        //修改
        private void btnModify_Click(object sender, EventArgs e)
        {
            if (listView.SelectedItems.Count <= 0)
            {
                return;
            }

            SemesterScoreEditor form = new SemesterScoreEditor(JHStudent.SelectByID(PrimaryKey), listView.SelectedItems[0].Tag as JHSemesterScoreRecord);

            if (form.ShowDialog() == DialogResult.OK)
            {
                LoadSemesterScores();
            }

            listView.Focus();
        }
Exemple #29
0
        /// <summary>
        /// 重新載入學生,當不排名類別設定後,學生可以即時反應
        /// </summary>
        private void ReloadAllStudent()
        {
            // 不列入排名學生ID
            Utility.notRankStudentIDList.Clear();
            AllStudents.Clear();

            if (Perference.NotRankTag != null)
            {
                if (!string.IsNullOrEmpty(Perference.NotRankTag))
                {
                    Utility.notRankStudentIDList = Utility.GetNotRankStudentIDList(Perference.NotRankTag);
                }
            }

            AllStudents = JHStudent.SelectAll().ToReportStudent(Utility.notRankStudentIDList);
        }
        public SemesterScoreItem()
        {
            InitializeComponent();
            InitializeQuickAddButton();

            _domainList = new List <string>();
            InitializeColumnHeader();

            UserPermission = Framework.User.Acl[FCode.GetCode(GetType())];

            btnAdd.Visible    = UserPermission.Editable;
            btnModify.Visible = UserPermission.Editable;
            btnDelete.Visible = UserPermission.Editable;
            btnView.Visible   = UserPermission.Viewable & !UserPermission.Editable;

            _worker         = new BackgroundWorker();
            _worker.DoWork += delegate(object sender, DoWorkEventArgs e)
            {
                if (_student == null)
                {
                    _student = JHStudent.SelectByID("" + e.Argument);
                }
                else if (_student.ID != "" + e.Argument)
                {
                    _student = JHStudent.SelectByID("" + e.Argument);
                }

                e.Result = JHSemesterScore.SelectByStudentID("" + e.Argument);
            };
            _worker.RunWorkerCompleted += delegate(object sender, RunWorkerCompletedEventArgs e)
            {
                if (_RunningID != PrimaryKey)
                {
                    _RunningID = PrimaryKey;
                    _worker.RunWorkerAsync(_RunningID);
                    return;
                }

                _recordList = e.Result as List <JHSemesterScoreRecord>;
                FillListView();
            };

            FISCA.InteractionService.SubscribeEvent("CalculationHelper.SaveSemesterScore", (sender, args) => {
                AfterSaveSemesterScore();
            });
        }