예제 #1
0
        /// <summary>
        /// 设置指定公司的配置信息
        /// </summary>
        /// <param name="companyId">公司编号</param>
        /// <param name="fieldKey">配置key</param>
        /// <param name="fieldValue">配置value</param>
        /// <returns></returns>
        public bool SetValue(string K, string V)
        {
            DbCommand dc = this._db.GetSqlStringCommand(SqlSetSetting);

            this._db.AddInParameter(dc, "K", DbType.String, K);
            this._db.AddInParameter(dc, "V", DbType.String, V);
            return(DbHelper.ExecuteSqlTrans(dc, this._db) > 0 ? true : false);
        }
예제 #2
0
        /// <summary>
        /// 增加一条数据
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public bool SetCompanySetting(Eyousoft_yhq.Model.MCompanySetting model)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.AppendFormat(SqlBcthSetSeting, "CompanyIntroduce", model.CompanyIntroduce);
            strSql.AppendFormat(SqlBcthSetSeting, "About", model.About);
            strSql.AppendFormat(SqlBcthSetSeting, "Contact", model.Contact);
            strSql.AppendFormat(SqlBcthSetSeting, "Join", model.Join);
            strSql.AppendFormat(SqlBcthSetSeting, "LegalNotices", model.LegalNotices);
            strSql.AppendFormat(SqlBcthSetSeting, "Copyright", model.Copyright);
            strSql.AppendFormat(SqlBcthSetSeting, "Code", model.Code);
            strSql.AppendFormat(SqlBcthSetSeting, "Description", model.Description);
            strSql.AppendFormat(SqlBcthSetSeting, "Keywords", model.Keywords);
            strSql.AppendFormat(SqlBcthSetSeting, "Title", model.Title);
            strSql.AppendFormat(SqlBcthSetSeting, "Logo", model.Logo);
            DbCommand cmd = this._db.GetSqlStringCommand(strSql.ToString());

            return(DbHelper.ExecuteSqlTrans(cmd, this._db) == 0 ? false : true);
        }