コード例 #1
0
        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));
        }
コード例 #2
0
        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));
        }
コード例 #3
0
        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);
        }
コード例 #4
0
        protected string Encrypt(string value)
        {
            CryptorManager cm = CryptorManager.Instance;

            return(cm.encrypt(value));
        }