コード例 #1
0
        public static void LoadConfigFromDB(this SynapseAdvancedControls.ObjectListView olv, string key)
        {
            SynapseOlvConfig Config;

            Config = SynapseOlvConfig.Load("WHERE OLVKEY = '" + key + "' AND MODULEID = " + SynapseForm.FormUser.CurrentModuleID + " AND USERID = '" + SynapseForm.FormUser.UserID + "'").FirstOrDefault();
            if (Config != null)
            {
                olv.RestoreState(Config.CONFIG);
                //olv.RestoreState(new byte[1]);
            }
        }
コード例 #2
0
        public static void SaveConfigToDB(this SynapseAdvancedControls.ObjectListView olv, string key)
        {
            SynapseOlvConfig Config;

            Config = SynapseOlvConfig.Load("WHERE OLVKEY = '" + key + "' AND MODULEID = " + SynapseForm.FormUser.CurrentModuleID + " AND USERID = '" + SynapseForm.FormUser.UserID + "'").FirstOrDefault();
            if (Config == null)
            {
                Config          = new SynapseOlvConfig();
                Config.OLVKEY   = key;
                Config.MODULEID = SynapseForm.FormUser.CurrentModuleID;
                Config.USERID   = SynapseForm.FormUser.UserID;
            }
            Config.CONFIG = olv.SaveState();
            Config.save();
        }