Ejemplo n.º 1
0
 /// <summary>
 /// 添加ExamQuestionType表行数据(如主键为非自增型字段,则自行修改代码)
 /// </summary>
 /// <param name="examquestiontypedata">数据集对象</param>
 /// <param name="examquestiontype">实体对象</param>
 public void AddRow(ref ExamQuestionTypeData examquestiontypedata, EntityExamQuestionType examquestiontype)
 {
     #region
     DataRow dr = examquestiontypedata.Tables[0].NewRow();
     examquestiontypedata.Assign(dr, ExamQuestionTypeData.questionTypeId, examquestiontype.questionTypeId);
     examquestiontypedata.Assign(dr, ExamQuestionTypeData.questionTypeName, examquestiontype.questionTypeName);
     examquestiontypedata.Assign(dr, ExamQuestionTypeData.usable, examquestiontype.usable);
     examquestiontypedata.Assign(dr, ExamQuestionTypeData.remark, examquestiontype.remark);
     examquestiontypedata.Assign(dr, ExamQuestionTypeData.sort, examquestiontype.sort);
     examquestiontypedata.Assign(dr, ExamQuestionTypeData.writeUser, examquestiontype.writeUser);
     examquestiontypedata.Assign(dr, ExamQuestionTypeData.writeIp, examquestiontype.writeIp);
     examquestiontypedata.Assign(dr, ExamQuestionTypeData.writeTime, examquestiontype.writeTime);
     examquestiontypedata.Tables[0].Rows.Add(dr);
     #endregion
 }
Ejemplo n.º 2
0
 /// <summary>
 /// 编辑examquestiontypedata数据集中指定的行数据
 /// </summary>
 /// <param name="examquestiontypedata">数据集对象</param>
 /// <param name="examquestiontype">实体对象</param>
 public void EditRow(ref ExamQuestionTypeData examquestiontypedata, EntityExamQuestionType examquestiontype)
 {
     #region
     if (examquestiontypedata.Tables[0].Rows.Count <= 0)
     {
         examquestiontypedata = this.getData(examquestiontype.questionTypeId);
     }
     DataRow dr = examquestiontypedata.Tables[0].Rows.Find(new object[1] {
         examquestiontype.questionTypeId
     });
     examquestiontypedata.Assign(dr, ExamQuestionTypeData.questionTypeId, examquestiontype.questionTypeId);
     examquestiontypedata.Assign(dr, ExamQuestionTypeData.questionTypeName, examquestiontype.questionTypeName);
     examquestiontypedata.Assign(dr, ExamQuestionTypeData.usable, examquestiontype.usable);
     examquestiontypedata.Assign(dr, ExamQuestionTypeData.remark, examquestiontype.remark);
     examquestiontypedata.Assign(dr, ExamQuestionTypeData.sort, examquestiontype.sort);
     examquestiontypedata.Assign(dr, ExamQuestionTypeData.writeUser, examquestiontype.writeUser);
     examquestiontypedata.Assign(dr, ExamQuestionTypeData.writeIp, examquestiontype.writeIp);
     examquestiontypedata.Assign(dr, ExamQuestionTypeData.writeTime, examquestiontype.writeTime);
     #endregion
 }