Exemple #1
0
 /// <summary>
 /// 添加ExamHistoryScore表行数据(如主键为非自增型字段,则自行修改代码)
 /// </summary>
 /// <param name="examhistoryscoredata">数据集对象</param>
 /// <param name="examhistoryscore">实体对象</param>
 public void AddRow(ref ExamHistoryScoreData examhistoryscoredata, EntityExamHistoryScore examhistoryscore)
 {
     #region
     DataRow dr = examhistoryscoredata.Tables[0].NewRow();
     examhistoryscoredata.Assign(dr, ExamHistoryScoreData.examHistoryFullScoreId, examhistoryscore.examHistoryFullScoreId);
     examhistoryscoredata.Assign(dr, ExamHistoryScoreData.examPaperId, examhistoryscore.examPaperId);
     examhistoryscoredata.Assign(dr, ExamHistoryScoreData.questionId, examhistoryscore.questionId);
     examhistoryscoredata.Assign(dr, ExamHistoryScoreData.fullScore, examhistoryscore.fullScore);
     examhistoryscoredata.Assign(dr, ExamHistoryScoreData.writeIp, examhistoryscore.writeIp);
     examhistoryscoredata.Assign(dr, ExamHistoryScoreData.writeTime, examhistoryscore.writeTime);
     examhistoryscoredata.Tables[0].Rows.Add(dr);
     #endregion
 }
Exemple #2
0
 /// <summary>
 /// 编辑examhistoryscoredata数据集中指定的行数据
 /// </summary>
 /// <param name="examhistoryscoredata">数据集对象</param>
 /// <param name="examhistoryscore">实体对象</param>
 public void EditRow(ref ExamHistoryScoreData examhistoryscoredata, EntityExamHistoryScore examhistoryscore)
 {
     #region
     if (examhistoryscoredata.Tables[0].Rows.Count <= 0)
     {
         examhistoryscoredata = this.getData(examhistoryscore.examHistoryFullScoreId);
     }
     DataRow dr = examhistoryscoredata.Tables[0].Rows.Find(new object[1] {
         examhistoryscore.examHistoryFullScoreId
     });
     examhistoryscoredata.Assign(dr, ExamHistoryScoreData.examHistoryFullScoreId, examhistoryscore.examHistoryFullScoreId);
     examhistoryscoredata.Assign(dr, ExamHistoryScoreData.examPaperId, examhistoryscore.examPaperId);
     examhistoryscoredata.Assign(dr, ExamHistoryScoreData.questionId, examhistoryscore.questionId);
     examhistoryscoredata.Assign(dr, ExamHistoryScoreData.fullScore, examhistoryscore.fullScore);
     examhistoryscoredata.Assign(dr, ExamHistoryScoreData.writeIp, examhistoryscore.writeIp);
     examhistoryscoredata.Assign(dr, ExamHistoryScoreData.writeTime, examhistoryscore.writeTime);
     #endregion
 }