示例#1
0
        private static void ReadTable()
        {
            if (PLTypeOfLaw.bRead)
            {
                return;
            }
            uint   num          = 0;
            object szValue      = new object();
            uint   createHandle = PLLink.GetLink().TableGET_CreateHandle("TypeOfLaw", 0, 0, 0U);

            PLLink.GetLink().TableGET_AddFilter(createHandle, "TypeOfLawStatus", "EQ", "0", 1);
            while (PLLink.GetLink().TableGET_GetNextRecord(createHandle) == 0)
            {
                PLLink.GetLink().TableGET_RecordField_ValueString(createHandle, "TypeOfLawNickName", "", ref szValue);
                string str1 = szValue.ToString().ToUpper().Trim();
                int    recordFieldValueI32 = PLLink.GetLink().TableGET_RecordField_ValueI32(createHandle, "TypeOfLawID");
                PLTypeOfLaw.AddMapNNtoID(str1, recordFieldValueI32);
                PLTypeOfLaw.AddMapIDtoNN(recordFieldValueI32, str1);
                PLTypeOfLaw.AddNicknameToList(str1);
                PLLink.GetLink().TableGET_RecordField_ValueString(createHandle, "TypeOfLawQuickBooksID", "", ref szValue);
                string str2 = szValue.ToString().ToUpper().Trim();
                if (!str2.Equals(""))
                {
                    PLTypeOfLaw.AddMapPLIDtoQBID(recordFieldValueI32, str2);
                }
            }
            PLLink.GetLink().TableGET_CloseHandle(createHandle);
            num = 0U;
            PLTypeOfLaw.bRead = true;
        }
示例#2
0
        public override void AddRecord()
        {
            if (!this.m_NickName.m_bIsSet)
            {
                this.NickName = this.MakeNN(true);
            }
            else if ((this.m_ID.m_bIsSet && this.m_ID.nValue.Equals(0) || !this.m_ID.m_bIsSet) && PLTypeOfLaw.GetIDFromNN(this.NickName) > 0)
            {
                this.NickName = this.MakeNN(true);
            }
            else if ((this.NickName.Length.Equals(0) ? 1 : (this.NickName.Length > 4 ? 1 : 0)) != 0)
            {
                this.NickName = this.MakeNN(true);
            }
            PLTypeOfLaw.AddNicknameToList(this.NickName);
            base.AddRecord();
            this.GetLink().TablePOST_AddRecord(this.m_hndPOST);
            PLTypeOfLaw plTypeOfLaw = this;

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