Example #1
0
        public void WriteValueToPCLawConfig(string sName, string sValue, string sSection, int nUserID)
        {
            uint idFromNn = (uint)PLConfig.GetIDFromNN(sName);

            if ((int)idFromNn == 0)
            {
                this.Status  = PLXMLData.eSTATUS.ACTIVE;
                this.Name    = sName;
                this.Value   = sValue;
                this.Section = sSection;
                this.UserID  = nUserID;
            }
            else
            {
                this.ReadExisting(idFromNn);
                this.Value   = sValue;
                this.Section = sSection;
                this.UserID  = nUserID;
            }
            this.AddRecord();
            this.SendLast();
        }
Example #2
0
        public override void AddRecord()
        {
            if (!this.m_Name.m_bIsSet)
            {
                this.Name = this.MakeNN(true);
            }
            else if ((this.m_ID.m_bIsSet && this.m_ID.nValue.Equals(0) || !this.m_ID.m_bIsSet ? (PLConfig.GetIDFromNN(this.Name) > 0 ? 1 : 0) : 0) != 0)
            {
                this.Name = this.MakeNN(true);
            }
            StaticData.AddNicknameToList(this.Name);
            base.AddRecord();
            this.GetLink().TablePOST_AddRecord(this.m_hndPOST);
            PLConfig plConfig = this;

            plConfig.m_lCounter = plConfig.m_lCounter + 1;
            if (this.m_lCounter < PLXMLData.m_nMaxCounter)
            {
                return;
            }
            this.Send();
        }