/// <summary> /// 輸出學習歷程或領域成績有問題學生 /// </summary> /// <param name="StudentObj"></param> /// <param name="gradeList"></param> public void OutWarningData(ValueObj.StudentVO StudentObj, ValueObj.LackMsg msgList) { int columnIndex = 0; _RowIndex++; if (_RowIndex > _MAX_ROW_COUNT) { _IsOverRow = true; return; } StringBuilder sb = new StringBuilder(); sb.Append(StudentObj.StudentName).Append(" 缺少 "); if (msgList.HistoryLack.Count > 0) { sb.Append(Utility.ComposeHistoryLackMsg(msgList.HistoryLack)); sb.Append(" "); } if (msgList.DomainLack.Count > 0) { sb.Append(Utility.ComposeDomainLackMsg(msgList.DomainLack)); } SetColumnValue(_OutCells, columnIndex++, sb.ToString(), _Style_Error); }
public override bool Equals(object obj) { if (obj is StudentVO) { StudentVO other = obj as StudentVO; if (this.StudentId == other.StudentId) { return(true); } return(false); } return(false); }
/// <summary> /// for debug /// </summary> /// <param name="StudentObj"></param> public void OutDetailData(ValueObj.StudentVO StudentObj) { if (Global.IsDebug == false) { return; } int columnIndex = 0; if (_DetailRowIndex == 0) { OutDetailTitle(_DetailCells); } _DetailRowIndex++; if (_DetailRowIndex > _MAX_ROW_COUNT) { return; } // 年級/班級序號/班級名稱/座號/學號/姓名 _DetailCells[_DetailRowIndex, columnIndex++].PutValue(StudentObj.ClassGradeYear); _DetailCells[_DetailRowIndex, columnIndex++].PutValue(StudentObj.ClassDisplayOrder); _DetailCells[_DetailRowIndex, columnIndex++].PutValue(StudentObj.ClassName); _DetailCells[_DetailRowIndex, columnIndex++].PutValue(StudentObj.StudentSeatNo); _DetailCells[_DetailRowIndex, columnIndex++].PutValue(StudentObj.StudentNumber); // 學生姓名 _DetailCells[_DetailRowIndex, columnIndex++].PutValue(StudentObj.StudentName); // 身分證統一編號 _DetailCells[_DetailRowIndex, columnIndex++].PutValue(StudentObj.StudentIdNumber); // 生日 _DetailCells[_DetailRowIndex, columnIndex++].PutValue("" + StudentObj.StudentBirthday); // 詳細資料 foreach (string itemName in StudentObj.ItemList.Keys) { _DetailCells[_DetailRowIndex, columnIndex++].PutValue("" + StudentObj.ItemList[itemName]); foreach (ValueObj.DetailItemVO rec in StudentObj.DetailItemList[itemName].Values) { _DetailCells[_DetailRowIndex, columnIndex++].PutValue("" + rec.Value); _DetailCells[_DetailRowIndex, columnIndex++].PutValue("" + rec.Points); } } }
/// <summary> /// 輸出一列資料 /// </summary> /// <param name="StudentObj"></param> public void OutRowData(ValueObj.StudentVO StudentObj) { int columnIndex = 0; _RowIndex++; if (_RowIndex > _MAX_ROW_COUNT) { _IsOverRow = true; return; } // 學生姓名 SetColumnValue(_OutCells, columnIndex++, StudentObj.StudentName, _Style_Normal); // 身分證統一編號 SetColumnValue(_OutCells, columnIndex++, StudentObj.StudentIdNumber, _Style_Normal); // 生日 if (StudentObj.StudentBirthday.HasValue) { // 出生年 string tmp = ((StudentObj.StudentBirthday.Value.Year) - 1911).ToString().PadLeft(3, '0'); SetColumnValue(_OutCells, columnIndex++, tmp, _Style_Normal); // 出生月 tmp = StudentObj.StudentBirthday.Value.Month.ToString().PadLeft(2, '0'); SetColumnValue(_OutCells, columnIndex++, tmp, _Style_Normal); // 出生日 tmp = StudentObj.StudentBirthday.Value.Day.ToString().PadLeft(2, '0'); SetColumnValue(_OutCells, columnIndex++, tmp, _Style_Normal); } else { // 出生年 SetColumnValue(_OutCells, columnIndex++, "000", _Style_Normal); // 出生月 SetColumnValue(_OutCells, columnIndex++, "00", _Style_Normal); // 出生日 SetColumnValue(_OutCells, columnIndex++, "00", _Style_Normal); } // 就近入學 SetColumnValue(_OutCells, columnIndex++, "00", _Style_Normal); // 扶助弱勢 均衡學習 德行表現 無記過紀錄 獎勵紀錄 for (int intI = 0; intI < StudentObj.ItemList.Count; intI++) { decimal point = StudentObj.ItemList.Values.ToArray()[intI]; // 針對某些欄位格式化 switch (intI) { case Global.index_BalanceLearning: SetColumnValue(_OutCells, columnIndex++, point.ToString().PadLeft(2, '0'), _Style_Normal); break; case Global.index_Merit: SetColumnValue(_OutCells, columnIndex++, String.Format("{0:0.0}", point), _Style_Normal); break; default: SetColumnValue(_OutCells, columnIndex++, point.ToString(), _Style_Normal); break; } } }