public SLROrganizers(SLRecord name) { _Organizers = name.Organizers; _InternalExternal = name.InternalOrExternal; //_AllCount += name.Hours; }
//取得獎勵資料 private List<SLRecord> GetSLRList() { sb.AppendLine("批次「服務學習記錄」快速登錄作業"); sb.AppendLine("學年度「" + integerInput1.Value.ToString() + "」"); sb.AppendLine("學期「" + integerInput2.Value.ToString() + "」"); sb.AppendLine("發生日期:" + dateTimeInput1.Value.ToShortDateString()); sb.AppendLine("登錄日期:" + dateTimeInput2.Value.ToShortDateString()); sb.AppendLine("詳細資料:"); List<SLRecord> SLRList = new List<SLRecord>(); //每一位學生的獎懲資料 foreach (DataGridViewRow row in dataGridViewX1.Rows) { K12.Data.StudentRecord student = (K12.Data.StudentRecord)row.Tag; SLRecord mr = new SLRecord(); mr.RefStudentID = student.ID; //學生ID mr.SchoolYear = integerInput1.Value; //學年度 mr.Semester = integerInput2.Value; //學期 mr.Hours = decimal.Parse("" + row.Cells[4].Value); //時數 mr.Reason = "" + row.Cells[5].Value; //事由 mr.Organizers = "" + row.Cells[6].Value; //主辦單位 mr.Remark = "" + row.Cells[7].Value; //備註 mr.InternalOrExternal = "" + row.Cells[8].Value; //校內外 mr.OccurDate = dateTimeInput1.Value; mr.RegisterDate = dateTimeInput2.Value; SLRList.Add(mr); sb.AppendLine("學生「" + student.Name + "」" + "時數「" + row.Cells[4].Value + "」" + "事由「" + row.Cells[5].Value + "」" + "主辦單位「" + row.Cells[6].Value + "」" + "備註「" + row.Cells[7].Value + "」" + "校內外「" + row.Cells[8].Value + "」"); } return SLRList; }