示例#1
0
        private void InspectWorker_DoWork(object sender, PackageDoWorkEventArgs <StudentRecord> e)
        {
            try
            {
                object[] objs = e.Argument as object[];
                Dictionary <string, bool> passList = objs[0] as Dictionary <string, bool>;
                EvaluationResult          result   = objs[1] as EvaluationResult;

                StudentDomainResult.Clear();    // 小郭, 2013/12/30
                Dictionary <string, bool> list = Graduation.Instance.Evaluate(e.Items);
                foreach (string id in list.Keys)
                {
                    if (!passList.ContainsKey(id))
                    {
                        passList.Add(id, list[id]);
                    }
                }

                if (Graduation.Instance.Result.Count > 0)
                {
                    MergeResult(list, Graduation.Instance.Result, result);
                }
            }
            catch (Exception ex)
            {
                SmartSchool.ErrorReporting.ReportingService.ReportException(ex);
                MsgBox.Show("發生錯誤。" + ex.Message);
            }
        }
示例#2
0
 private void HistoryWorker_DoWork(object sender, PackageDoWorkEventArgs <StudentRecord> e)
 {
     try
     {
         List <StudentRecord> error_list = e.Argument as List <StudentRecord>;
         error_list.AddRange(Graduation.Instance.CheckSemesterHistories(e.Items));
     }
     catch (Exception ex)
     {
         SmartSchool.ErrorReporting.ReportingService.ReportException(ex);
         MsgBox.Show("檢查學期歷程時發生錯誤。" + ex.Message);
     }
 }