public QuickInputSemesterScoreForm(JHStudentRecord student) : this() { _student = student; JHScoreCalcRuleRecord record = student.ScoreCalcRule; _calculator = new ScoreCalculator(record); _util = new SemesterHistoryUtility(JHSemesterHistory.SelectByStudentID(student.ID)); _semesterScoreRecordList = JHSemesterScore.SelectByStudentID(_student.ID); errorProvider.SetError(cboSchoolYear, "無效的學年度"); errorProvider.SetError(cboSemester, "無效的學期"); }
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); } }
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(); }); }