public Config FindByParamName(string name) { string dbparamname = string.Format("{0}_{1}", Prefix, name); CryptorManager cm = CryptorManager.Instance; string ConfigName = cm.encrypt(dbparamname); return(FindByConfigName(ConfigName)); }
public bool ParamExists(string name) { if (string.IsNullOrEmpty(name)) { return(false); } CryptorManager cm = CryptorManager.Instance; string dbparamname = string.Format("{0}_{1}", Prefix, name); string ConfigName = cm.encrypt(dbparamname); return(Exists(ConfigName)); }
public void SetParam(string name, string value) { CryptorManager cm = CryptorManager.Instance; string dbparamname = string.Format("{0}_{1}", Prefix, name); string ConfigName = cm.encrypt(dbparamname); string ConfigValue = cm.encrypt(value); Config _obj = null; if (ParamExists(name)) { _obj = FindByConfigName(ConfigName); _obj.ConfigValue = ConfigValue; } else { _obj = CreateEntity(); _obj.ConfigName = ConfigName; _obj.ConfigValue = ConfigValue; } Store(_obj); }
protected string Encrypt(string value) { CryptorManager cm = CryptorManager.Instance; return(cm.encrypt(value)); }