public JsonResult Index(SysBasicConfig model1) { var jsonm = new ResultJson(); try { var model = BasicConfig; if (string.IsNullOrEmpty(model1.emailpassword)) { model1.emailpassword = model.emailpassword; } if (string.IsNullOrEmpty(model1.smspassword)) { model1.smspassword = model.smspassword; } SerializationHelper.Save(model1, Utils.GetXmlMapPath(KeyHelper.FILE_SITE_XML_CONFING)); //刷新配置项 BasicConfigHelper.setBasicConfig(); return(Json(new ResultJson() { msg = "修改成功", backurl = "" })); } catch (Exception ex) { jsonm.msg = "修改失败"; jsonm.status = 500; LogProvider.Error("修改配置项", ex.StackTrace, ex.Message); } return(Json(jsonm)); }
public BaseApiController(IConfiguration config, IHostingEnvironment _hostingEnvironment) { Service = new SugarBase(); _config = config; hostingEnvironment = _hostingEnvironment; BasicConfig = BasicConfigHelper.getBasicConfig().Result; }
public BaseController(IConfiguration config, IHostingEnvironment _hostingEnvironment) { Service = new SugarBase(); _config = config; //SugarBase.SetConnectionString(config); //RedisHelper.GetIntance(config); hostingEnvironment = _hostingEnvironment; //Utils.ServerPath = hostingEnvironment.ContentRootPath; SysUserModel = getToken(); BasicConfig = BasicConfigHelper.getBasicConfig().Result; //DataHelper.GetIntance(config); ModuleList = GetSysModule(); }
public SMSHelper() { _sysconfig = LoadConfig(Utils.GetXmlMapPath(KeyHelper.FILE_SITE_XML_CONFING)); }
public UploadService() { _sysconfig = LoadConfig(Utils.GetXmlMapPath(KeyHelper.FILE_SITE_XML_CONFING)); }