Exemplo n.º 1
0
 /// <summary>
 /// 保存
 /// </summary>
 /// <param name="code"></param>
 /// <param name="value"></param>
 /// <returns></returns>
 public bool SaveEnvironment(string code, string value, ref string err)
 {
     try
     {
         IEnvironmentSettingsR environment = new EnvironmentSettingsR();
         const string          sql         = "update Sys_EnvironmentSettings set paramvalue=@value where paramcode=@code";
         return(environment.Excute(sql, new { value = value, code = code }) > 0);
     }
     catch (Exception ex)
     {
         err = ex.Message;
         return(false);
     }
 }
Exemplo n.º 2
0
        /// <summary>
        /// 获得环境变量信息
        /// </summary>
        /// <param name="enviCode"></param>
        /// <returns></returns>
        public string GetEnvironmentInfo(string enviCode)
        {
            IEnvironmentSettingsR environment = new EnvironmentSettingsR();

            return(environment.GetInfo(enviCode));
        }