/// <summary> /// 更新一条数据 /// </summary> public void Update(Model.BlogType model) { StringBuilder strSql = new StringBuilder(); strSql.Append("update [Type] set "); strSql.Append("[Type]='" + model.Type + "'"); strSql.Append(" where ID=" + model.ID + " "); SQLHelper.ExecuteNonQuery(strSql.ToString()); }
/// <summary> /// 增加一条数据 /// </summary> public void Add(Model.BlogType model) { StringBuilder strSql = new StringBuilder(); strSql.Append("insert into [Type]("); strSql.Append("[Type]"); strSql.Append(")"); strSql.Append(" values ("); strSql.Append("'" + model.Type + "'"); strSql.Append(")"); SQLHelper.ExecuteNonQuery(strSql.ToString()); }
/// <summary> /// 更新一条数据 /// </summary> public void Update(Model.BlogType model) { dal_type.Update(model); }
/// <summary> /// 增加一条数据 /// </summary> public void Add(Model.BlogType model) { dal_type.Add(model); }