Beispiel #1
0
        /// <summary>
        /// 保存examscoreratedata数据集数据
        /// </summary>
        /// <param name="examscoreratedata">数据集对象</param>
        /// <returns>返回保存后的响应信息</returns>
        public String SaveExamScoreRate(ExamScoreRateData examscoreratedata)
        {
            #region
            return(base.Save(examscoreratedata, this._examscorerateclass));

            #endregion
        }
Beispiel #2
0
        /// <summary>
        /// 根据条件筛选所有ExamScoreRate指定页码的数据(分页型)
        /// </summary>
        /// <param name="examscorerate">实体对象</param>
        /// <param name="pageparams">分页对象</param>
        /// <param name="totalCount">符合条件的记录总数量</param>
        /// <returns></returns>
        public ExamScoreRateData GetData(EntityExamScoreRate examscorerate, PageParams pageparams, out int totalCount)
        {
            #region
            DBConditions querybusinessparams = new DBConditions(pageparams);
            querybusinessparams.Add(ExamScoreRateData.examScoreId, EnumSqlType.sqlint,
                                    EnumCondition.Equal, examscorerate.examScoreId);
            querybusinessparams.Add(ExamScoreRateData.examTemplateId, EnumSqlType.sqlint,
                                    EnumCondition.Equal, examscorerate.examTemplateId);
            querybusinessparams.Add(ExamScoreRateData.questionTypeId, EnumSqlType.tinyint,
                                    EnumCondition.Equal, examscorerate.questionTypeId);
            querybusinessparams.Add(ExamScoreRateData.rate, EnumSqlType.sqldecimal,
                                    EnumCondition.Equal, examscorerate.rate);
            querybusinessparams.Add(ExamScoreRateData.usable, EnumSqlType.bit,
                                    EnumCondition.Equal, examscorerate.usable);
            querybusinessparams.Add(ExamScoreRateData.writeUser, EnumSqlType.sqlint,
                                    EnumCondition.Equal, examscorerate.writeUser);
            querybusinessparams.Add(ExamScoreRateData.writeIp, EnumSqlType.nvarchar,
                                    EnumCondition.Equal, examscorerate.writeIp);
            querybusinessparams.Add(ExamScoreRateData.writeTime, EnumSqlType.datetime,
                                    EnumCondition.Equal, examscorerate.writeTime);
            ExamScoreRateData examscoreratedata = new ExamScoreRateData();
            totalCount = this._examscorerateclass.GetSingleT(examscoreratedata, querybusinessparams);
            return(examscoreratedata);

            #endregion
        }
Beispiel #3
0
        /// <summary>
        /// 获取ExamScoreRate数据表的全部数据
        /// </summary>
        /// <returns>Json字符串</returns>
        public string GetJsonByAll()
        {
            #region
            int totalCount = 0;
            ExamScoreRateData examscoreratedata = this.getData(null);
            totalCount = examscoreratedata.Tables[0].Rows.Count;
            return(base.GetJson(examscoreratedata, totalCount));

            #endregion
        }
Beispiel #4
0
        /// <summary>
        /// 根据主键值检索符合该条件的记录,用于编辑和删除记录时。
        /// </summary>
        /// <param name="examScoreId">主键-考卷比例编号</param>
        /// <returns></returns>
        private ExamScoreRateData getData(string examScoreId)
        {
            #region
            ExamScoreRateData examscoreratedata   = new ExamScoreRateData();
            DBConditions      querybusinessparams = new DBConditions();
            querybusinessparams.Add(ExamScoreRateData.examScoreId, EnumSqlType.sqlint, EnumCondition.Equal, examScoreId);
            this._examscorerateclass.GetSingleTAllWithoutCount(examscoreratedata, querybusinessparams);
            return(examscoreratedata);

            #endregion
        }
Beispiel #5
0
 /// <summary>
 /// 添加ExamScoreRate表行数据(如主键为非自增型字段,则自行修改代码)
 /// </summary>
 /// <param name="examscoreratedata">数据集对象</param>
 /// <param name="examscorerate">实体对象</param>
 public void AddRow(ref ExamScoreRateData examscoreratedata, EntityExamScoreRate examscorerate)
 {
     #region
     DataRow dr = examscoreratedata.Tables[0].NewRow();
     examscoreratedata.Assign(dr, ExamScoreRateData.examScoreId, examscorerate.examScoreId);
     examscoreratedata.Assign(dr, ExamScoreRateData.examTemplateId, examscorerate.examTemplateId);
     examscoreratedata.Assign(dr, ExamScoreRateData.questionTypeId, examscorerate.questionTypeId);
     examscoreratedata.Assign(dr, ExamScoreRateData.rate, examscorerate.rate);
     examscoreratedata.Assign(dr, ExamScoreRateData.usable, examscorerate.usable);
     examscoreratedata.Assign(dr, ExamScoreRateData.writeUser, examscorerate.writeUser);
     examscoreratedata.Assign(dr, ExamScoreRateData.writeIp, examscorerate.writeIp);
     examscoreratedata.Assign(dr, ExamScoreRateData.writeTime, examscorerate.writeTime);
     examscoreratedata.Tables[0].Rows.Add(dr);
     #endregion
 }
Beispiel #6
0
 /// <summary>
 /// 删除examscoreratedata数据集中指定的行数据
 /// </summary>
 /// <param name="examscoreratedata">数据集对象</param>
 /// <param name="examScoreId">主键-考卷比例编号</param>
 public void DeleteRow(ref ExamScoreRateData examscoreratedata, string examScoreId)
 {
     #region
     if (examscoreratedata.Tables[0].Rows.Count <= 0)
     {
         examscoreratedata = this.getData(examScoreId);
     }
     DataRow dr = examscoreratedata.Tables[0].Rows.Find(new object[1] {
         examScoreId
     });
     if (dr != null)
     {
         dr.Delete();
     }
     #endregion
 }
Beispiel #7
0
 /// <summary>
 /// 编辑examscoreratedata数据集中指定的行数据
 /// </summary>
 /// <param name="examscoreratedata">数据集对象</param>
 /// <param name="examscorerate">实体对象</param>
 public void EditRow(ref ExamScoreRateData examscoreratedata, EntityExamScoreRate examscorerate)
 {
     #region
     if (examscoreratedata.Tables[0].Rows.Count <= 0)
     {
         examscoreratedata = this.getData(examscorerate.examScoreId);
     }
     DataRow dr = examscoreratedata.Tables[0].Rows.Find(new object[1] {
         examscorerate.examScoreId
     });
     examscoreratedata.Assign(dr, ExamScoreRateData.examScoreId, examscorerate.examScoreId);
     examscoreratedata.Assign(dr, ExamScoreRateData.examTemplateId, examscorerate.examTemplateId);
     examscoreratedata.Assign(dr, ExamScoreRateData.questionTypeId, examscorerate.questionTypeId);
     examscoreratedata.Assign(dr, ExamScoreRateData.rate, examscorerate.rate);
     examscoreratedata.Assign(dr, ExamScoreRateData.usable, examscorerate.usable);
     examscoreratedata.Assign(dr, ExamScoreRateData.writeUser, examscorerate.writeUser);
     examscoreratedata.Assign(dr, ExamScoreRateData.writeIp, examscorerate.writeIp);
     examscoreratedata.Assign(dr, ExamScoreRateData.writeTime, examscorerate.writeTime);
     #endregion
 }