Exemple #1
0
 /// <summary>
 /// 得到一个对象实体
 /// </summary>
 public ZIT.AppRouteServer.Model.QualityEvaluation DataRowToModel(DataRow row)
 {
     ZIT.AppRouteServer.Model.QualityEvaluation model = new ZIT.AppRouteServer.Model.QualityEvaluation();
     if (row != null)
     {
         if (row["LSH"] != null)
         {
             model.LSH = row["LSH"].ToString();
         }
         if (row["QUALITYCOMMENT"] != null)
         {
             model.QUALITYCOMMENT = row["QUALITYCOMMENT"].ToString();
         }
         if (row["REASON"] != null)
         {
             model.REASON = row["REASON"].ToString();
         }
         if (row["CASEID"] != null)
         {
             model.CASEID = row["CASEID"].ToString();
         }
         if (row["COMMENTTIME"] != null && row["COMMENTTIME"].ToString() != "")
         {
             model.COMMENTTIME = DateTime.Parse(row["COMMENTTIME"].ToString());
         }
     }
     return(model);
 }
Exemple #2
0
        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        public ZIT.AppRouteServer.Model.QualityEvaluation GetModel()
        {
            //该表无主键信息,请自定义主键/条件字段
            StringBuilder strSql = new StringBuilder();

            strSql.Append("select LSH,QUALITYCOMMENT,REASON,CASEID,COMMENTTIME from QualityEvaluation ");
            strSql.Append(" where ");
            OracleParameter[] parameters =
            {
            };

            ZIT.AppRouteServer.Model.QualityEvaluation model = new ZIT.AppRouteServer.Model.QualityEvaluation();
            DataSet ds = DbHelperOra.Query("", strSql.ToString(), parameters);

            if (ds.Tables[0].Rows.Count > 0)
            {
                return(DataRowToModel(ds.Tables[0].Rows[0]));
            }
            else
            {
                return(null);
            }
        }