Example #1
0
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public void Add(Dukey.Model.Photos model)
 {
     dal.Add(model);
 }
Example #2
0
        /// <summary>
        /// 更新一条数据
        /// </summary>
        public void Update(Dukey.Model.WebConfig model)
        {
            StringBuilder strSql = new StringBuilder();
            strSql.Append("update WebConfig set ");
            strSql.Append("sitename=@sitename,");
            strSql.Append("title=@title,");
            strSql.Append("brief=@brief,");
            strSql.Append("keywords=@keywords,");
            strSql.Append("islock=@islock,");
            strSql.Append("showtype=@showtype");

            OleDbParameter[] parameters = {
                    new OleDbParameter("@sitename", OleDbType.VarChar,255),
                    new OleDbParameter("@title", OleDbType.VarChar,255),
                    new OleDbParameter("@brief", OleDbType.VarChar,255),
                    new OleDbParameter("@keywords", OleDbType.VarChar,255),
                    new OleDbParameter("@islock", OleDbType.Boolean,1),
                    new OleDbParameter("@showtype", OleDbType.Integer,4)
                                          };
            parameters[0].Value = model.sitename;
            parameters[1].Value = model.title;
            parameters[2].Value = model.brief;
            parameters[3].Value = model.keywords;
            parameters[4].Value = model.islock;
            parameters[5].Value = model.showtype;

            DbHelper.ExecuteSql(strSql.ToString(), parameters);
        }
Example #3
0
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public void Update(Dukey.Model.Photos model)
 {
     dal.Update(model);
 }