Exemple #1
0
 public void AddGJAllocation(string GLNN, double dAmount)
 {
     this.AddGJAllocation(PLGLAccts.GetIDFromNN(GLNN), dAmount);
 }
Exemple #2
0
        public override void AddRecord()
        {
            if ((int)this.m_hndPOST == 0)
            {
                this.m_hndPOST = this.GetLink().TablePOST_CreateHandle(this.m_sTableName, 0);
            }
            if (!this.m_NickName.m_bIsSet)
            {
                ++PLVendor.m_nVendorNN;
                this.NickName = "~" + PLVendor.m_nVendorNN.ToString();
            }
            else if ((this.m_ID.m_bIsSet && this.m_ID.nValue.Equals(0) || !this.m_ID.m_bIsSet) && PLVendor.GetIDFromNN(this.NickName) > 0)
            {
                ++PLVendor.m_nVendorNN;
                this.NickName = "~" + PLVendor.m_nVendorNN.ToString();
            }
            else if ((this.NickName.Length.Equals(0) ? 1 : (this.NickName.Length > 6 ? 1 : 0)) != 0)
            {
                ++PLVendor.m_nVendorNN;
                this.NickName = "~" + PLVendor.m_nVendorNN.ToString();
            }
            this.Name.AddFields(this.m_hndPOST);
            this.Address.AddFields(this.m_hndPOST);
            this.Phone.AddFields(this.m_hndPOST);
            this.m_ID.AddField(this.m_hndPOST);
            this.m_Status.AddField(this.m_hndPOST);
            this.m_NickName.AddField(this.m_hndPOST);
            if (this.DefExpCodeNN.Length > 0)
            {
                int idFromNn = PLExpCode.GetIDFromNN(this.DefExpCodeNN);
                if (idFromNn > 0)
                {
                    this.DefExpCodeID = idFromNn;
                    this.m_DefExpCode.AddField(this.m_hndPOST);
                    this.DefExpCodeNN = "";
                }
            }
            if (this.DefGLAcctNN.Length > 0)
            {
                int idFromNn = PLGLAccts.GetIDFromNN(this.DefExpCodeNN);
                if (idFromNn > 0)
                {
                    this.DefGLAcctID = idFromNn;
                    this.m_DefGLAcctID.AddField(this.m_hndPOST);
                    this.DefGLAcctNN = "";
                }
            }
            this.m_US1099BoxNumber.AddField(this.m_hndPOST);
            this.m_US1099ID.AddField(this.m_hndPOST);
            this.m_US1099Type.AddField(this.m_hndPOST);
            this.m_AcctNum.AddField(this.m_hndPOST);
            this.m_ActiveFlag.AddField(this.m_hndPOST);
            this.m_DefGSTCat.AddField(this.m_hndPOST);
            this.m_DiscDays1.AddField(this.m_hndPOST);
            this.m_DiscPct1.AddField(this.m_hndPOST);
            this.m_DiscDays2.AddField(this.m_hndPOST);
            this.m_DiscPct2.AddField(this.m_hndPOST);
            this.m_DiscDays3.AddField(this.m_hndPOST);
            this.m_DiscPct3.AddField(this.m_hndPOST);
            this.m_Notes.AddField(this.m_hndPOST);
            this.m_Terms.AddField(this.m_hndPOST);
            this.m_QuickBooksID.AddField(this.m_hndPOST);
            this.m_ContactID.AddField(this.m_hndPOST);
            this.m_ExternalID_1.AddField(this.m_hndPOST);
            this.m_ExternalID_2.AddField(this.m_hndPOST);
            this.GetLink().TablePOST_AddRecord(this.m_hndPOST);
            PLVendor plVendor = this;

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