示例#1
0
        /// <summary>
        /// 更新一条数据
        /// </summary>
        public bool Update(Model.CUX_FCASE_BK_20130827 model)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("update CUX_FCASE_BK_20130827 set ");
            strSql.Append("OURNO=:OURNO,");
            strSql.Append("TITLE=:TITLE,");
            strSql.Append("CTITLE=:CTITLE,");
            strSql.Append("RECEIVED=:RECEIVED,");
            strSql.Append("APPNO=:APPNO,");
            strSql.Append("APPDATE=:APPDATE,");
            strSql.Append("COMMENTS=:COMMENTS,");
            strSql.Append("STATUS=:STATUS,");
            strSql.Append("APPTYPE=:APPTYPE,");
            strSql.Append("DEADLINE=:DEADLINE");
            strSql.Append(" where ");
            OracleParameter[] parameters =
            {
                new OracleParameter(":OURNO",    OracleType.VarChar,     30),
                new OracleParameter(":TITLE",    OracleType.VarChar,    400),
                new OracleParameter(":CTITLE",   OracleType.VarChar,    200),
                new OracleParameter(":RECEIVED", OracleType.DateTime),
                new OracleParameter(":APPNO",    OracleType.VarChar,     30),
                new OracleParameter(":APPDATE",  OracleType.DateTime),
                new OracleParameter(":COMMENTS", OracleType.VarChar,   1500),
                new OracleParameter(":STATUS",   OracleType.VarChar,     10),
                new OracleParameter(":APPTYPE",  OracleType.VarChar,     50),
                new OracleParameter(":DEADLINE", OracleType.DateTime)
            };
            parameters[0].Value = model.OURNO;
            parameters[1].Value = model.TITLE;
            parameters[2].Value = model.CTITLE;
            parameters[3].Value = model.RECEIVED;
            parameters[4].Value = model.APPNO;
            parameters[5].Value = model.APPDATE;
            parameters[6].Value = model.COMMENTS;
            parameters[7].Value = model.STATUS;
            parameters[8].Value = model.APPTYPE;
            parameters[9].Value = model.DEADLINE;

            int rows = DbHelperOra.ExecuteSql(strSql.ToString(), parameters);

            if (rows > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
示例#2
0
 /// <summary>
 /// 得到一个对象实体
 /// </summary>
 public Model.CUX_FCASE_BK_20130827 DataRowToModel(DataRow row)
 {
     Model.CUX_FCASE_BK_20130827 model = new Model.CUX_FCASE_BK_20130827();
     if (row != null)
     {
         if (row["OURNO"] != null)
         {
             model.OURNO = row["OURNO"].ToString();
         }
         if (row["TITLE"] != null)
         {
             model.TITLE = row["TITLE"].ToString();
         }
         if (row["CTITLE"] != null)
         {
             model.CTITLE = row["CTITLE"].ToString();
         }
         if (row["RECEIVED"] != null && row["RECEIVED"].ToString() != "")
         {
             model.RECEIVED = DateTime.Parse(row["RECEIVED"].ToString());
         }
         if (row["APPNO"] != null)
         {
             model.APPNO = row["APPNO"].ToString();
         }
         if (row["APPDATE"] != null && row["APPDATE"].ToString() != "")
         {
             model.APPDATE = DateTime.Parse(row["APPDATE"].ToString());
         }
         if (row["COMMENTS"] != null)
         {
             model.COMMENTS = row["COMMENTS"].ToString();
         }
         if (row["STATUS"] != null)
         {
             model.STATUS = row["STATUS"].ToString();
         }
         if (row["APPTYPE"] != null)
         {
             model.APPTYPE = row["APPTYPE"].ToString();
         }
         if (row["DEADLINE"] != null && row["DEADLINE"].ToString() != "")
         {
             model.DEADLINE = DateTime.Parse(row["DEADLINE"].ToString());
         }
     }
     return(model);
 }
示例#3
0
        /// <summary>
        /// 增加一条数据
        /// </summary>
        public bool Add(Model.CUX_FCASE_BK_20130827 model)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("insert into CUX_FCASE_BK_20130827(");
            strSql.Append("OURNO,TITLE,CTITLE,RECEIVED,APPNO,APPDATE,COMMENTS,STATUS,APPTYPE,DEADLINE)");
            strSql.Append(" values (");
            strSql.Append(":OURNO,:TITLE,:CTITLE,:RECEIVED,:APPNO,:APPDATE,:COMMENTS,:STATUS,:APPTYPE,:DEADLINE)");
            OracleParameter[] parameters =
            {
                new OracleParameter(":OURNO",    OracleType.VarChar,     30),
                new OracleParameter(":TITLE",    OracleType.VarChar,    400),
                new OracleParameter(":CTITLE",   OracleType.VarChar,    200),
                new OracleParameter(":RECEIVED", OracleType.DateTime),
                new OracleParameter(":APPNO",    OracleType.VarChar,     30),
                new OracleParameter(":APPDATE",  OracleType.DateTime),
                new OracleParameter(":COMMENTS", OracleType.VarChar,   1500),
                new OracleParameter(":STATUS",   OracleType.VarChar,     10),
                new OracleParameter(":APPTYPE",  OracleType.VarChar,     50),
                new OracleParameter(":DEADLINE", OracleType.DateTime)
            };
            parameters[0].Value = model.OURNO;
            parameters[1].Value = model.TITLE;
            parameters[2].Value = model.CTITLE;
            parameters[3].Value = model.RECEIVED;
            parameters[4].Value = model.APPNO;
            parameters[5].Value = model.APPDATE;
            parameters[6].Value = model.COMMENTS;
            parameters[7].Value = model.STATUS;
            parameters[8].Value = model.APPTYPE;
            parameters[9].Value = model.DEADLINE;

            int rows = DbHelperOra.ExecuteSql(strSql.ToString(), parameters);

            if (rows > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
示例#4
0
        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        public Model.CUX_FCASE_BK_20130827 GetModel()
        {
            //该表无主键信息,请自定义主键/条件字段
            StringBuilder strSql = new StringBuilder();

            strSql.Append("select OURNO,TITLE,CTITLE,RECEIVED,APPNO,APPDATE,COMMENTS,STATUS,APPTYPE,DEADLINE from CUX_FCASE_BK_20130827 ");
            strSql.Append(" where ");
            OracleParameter[] parameters =
            {
            };

            Model.CUX_FCASE_BK_20130827 model = new Model.CUX_FCASE_BK_20130827();
            DataSet ds = DbHelperOra.Query(strSql.ToString(), parameters);

            if (ds.Tables[0].Rows.Count > 0)
            {
                return(DataRowToModel(ds.Tables[0].Rows[0]));
            }
            else
            {
                return(null);
            }
        }
示例#5
0
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public bool Update(Model.CUX_FCASE_BK_20130827 model)
 {
     return(dal.Update(model));
 }
示例#6
0
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public bool Add(Model.CUX_FCASE_BK_20130827 model)
 {
     return(dal.Add(model));
 }