/// <summary> /// 添加ExamHistory表行数据(如主键为非自增型字段,则自行修改代码) /// </summary> /// <param name="examhistorydata">数据集对象</param> /// <param name="examhistory">实体对象</param> public void AddRow(ref ExamHistoryData examhistorydata, EntityExamHistory examhistory) { #region DataRow dr = examhistorydata.Tables[0].NewRow(); examhistorydata.Assign(dr, ExamHistoryData.examHistoryId, examhistory.examHistoryId); examhistorydata.Assign(dr, ExamHistoryData.examPaperId, examhistory.examPaperId); examhistorydata.Assign(dr, ExamHistoryData.giveScoreRemark, examhistory.giveScoreRemark); examhistorydata.Assign(dr, ExamHistoryData.giveScoreUser, examhistory.giveScoreUser); examhistorydata.Assign(dr, ExamHistoryData.giveScoreTime, examhistory.giveScoreTime); examhistorydata.Assign(dr, ExamHistoryData.writeUser, examhistory.writeUser); examhistorydata.Assign(dr, ExamHistoryData.examSubmitTime, examhistory.examSubmitTime); examhistorydata.Assign(dr, ExamHistoryData.writeIp, examhistory.writeIp); examhistorydata.Assign(dr, ExamHistoryData.writeTime, examhistory.writeTime); examhistorydata.Tables[0].Rows.Add(dr); #endregion }
/// <summary> /// 编辑examhistorydata数据集中指定的行数据 /// </summary> /// <param name="examhistorydata">数据集对象</param> /// <param name="examhistory">实体对象</param> public void EditRow(ref ExamHistoryData examhistorydata, EntityExamHistory examhistory) { #region if (examhistorydata.Tables[0].Rows.Count <= 0) { examhistorydata = this.getData(examhistory.examHistoryId); } DataRow dr = examhistorydata.Tables[0].Rows.Find(new object[1] { examhistory.examHistoryId }); examhistorydata.Assign(dr, ExamHistoryData.examHistoryId, examhistory.examHistoryId); examhistorydata.Assign(dr, ExamHistoryData.examPaperId, examhistory.examPaperId); examhistorydata.Assign(dr, ExamHistoryData.giveScoreRemark, examhistory.giveScoreRemark); examhistorydata.Assign(dr, ExamHistoryData.giveScoreUser, examhistory.giveScoreUser); examhistorydata.Assign(dr, ExamHistoryData.giveScoreTime, examhistory.giveScoreTime); examhistorydata.Assign(dr, ExamHistoryData.writeUser, examhistory.writeUser); examhistorydata.Assign(dr, ExamHistoryData.examSubmitTime, examhistory.examSubmitTime); examhistorydata.Assign(dr, ExamHistoryData.writeIp, examhistory.writeIp); examhistorydata.Assign(dr, ExamHistoryData.writeTime, examhistory.writeTime); #endregion }