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

            PLLink.GetLink().TableGET_AddFilter(createHandle, "ActivityStatus", "EQ", "0", 1);
            while (PLLink.GetLink().TableGET_GetNextRecord(createHandle) == 0)
            {
                PLLink.GetLink().TableGET_RecordField_ValueString(createHandle, "ActivityNickName", "", ref szValue);
                string sNickname           = szValue.ToString().ToUpper().Trim();
                int    recordFieldValueI32 = PLLink.GetLink().TableGET_RecordField_ValueI32(createHandle, "ActivityID");
                PLExpCode.AddMapIDtoNN(recordFieldValueI32, sNickname.ToUpper());
                PLExpCode.AddMapNNtoID(sNickname.ToUpper(), recordFieldValueI32);
                PLExpCode.AddNicknameToList(sNickname);
                PLLink.GetLink().TableGET_RecordField_ValueString(createHandle, "ActivityName", "", ref szValue);
                PLExpCode.AddMapIDtoExplanation(recordFieldValueI32, szValue.ToString());
                PLLink.GetLink().TableGET_RecordField_ValueString(createHandle, "ActivityQuickBooksID", "", ref szValue);
                string str = szValue.ToString().ToUpper().Trim();
                if (!str.Equals(""))
                {
                    PLExpCode.AddMapPLIDtoQBID(recordFieldValueI32, str);
                }
            }
            PLLink.GetLink().TableGET_CloseHandle(createHandle);
            num             = 0U;
            PLExpCode.bRead = true;
        }
Example #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) && PLExpCode.GetIDFromNN(this.NickName) > 0)
            // this.NickName = this.MakeNN(true);
            //else if ((this.NickName.Length.Equals(0) ? 1 : (this.NickName.Length > 6 ? 1 : 0)) != 0)
            //this.NickName = this.MakeNN(true);
            PLExpCode.AddNicknameToList(this.NickName);
            base.AddRecord();
            this.GetLink().TablePOST_AddRecord(this.m_hndPOST);
            PLExpCode plExpCode = this;

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