Exemple #1
0
        public void ZeroBalances()
        {
            PLGBEnt plgbEnt      = new PLGBEnt();
            uint    num          = 0;
            uint    createHandle = PLLink.GetLink().TableGET_CreateHandle("GeneralBankAcct", 0, 0, 0U);

            while (PLLink.GetLink().TableGET_GetNextRecord(createHandle) == 0)
            {
                int    recordFieldValueI32 = PLLink.GetLink().TableGET_RecordField_ValueI32(createHandle, "GeneralBankAcctID");
                double fieldValueDouble    = PLLink.GetLink().TableGET_RecordField_ValueDOUBLE(createHandle, "GeneralBankAcctBalance");
                if (!fieldValueDouble.Equals(0.0))
                {
                    plgbEnt.BankAcctID        = recordFieldValueI32;
                    plgbEnt.CheckNum          = "Zero";
                    plgbEnt.Date              = 19900101;
                    plgbEnt.EntryType         = PLGBEnt.eGBEntryType.GEN_RCPT;
                    plgbEnt.PaidTo            = "Adjusting Entry";
                    plgbEnt.TotalAmount       = -fieldValueDouble;
                    plgbEnt.Alloc.Amount      = -fieldValueDouble;
                    plgbEnt.Alloc.EntryType   = PLGBAlloc.eGBAllocEntryType.GEN_RCPT;
                    plgbEnt.Alloc.Explanation = "Zero General Bank Balance";
                    plgbEnt.Alloc.GLNN        = "9999";
                    plgbEnt.AddGBAllocation();
                    plgbEnt.AddRecord();
                }
            }
            plgbEnt.SendLast();
            PLLink.GetLink().TableGET_CloseHandle(createHandle);
            num = 0U;
        }
Exemple #2
0
        public override void AddRecord()
        {
            if ((int)this.m_hndPOST == 0)
            {
                this.m_hndPOST = this.GetLink().TablePOST_CreateHandle(this.m_sTableName, 0);
                this.GetLink().TablePOST_AddDirective(this.m_hndPOST, "allowentonclosedmtr", PLGBEnt.m_bAllowEntOnClosedMtr ? "1" : "0");
            }
            base.AddRecord();
            for (int nRepeat = 1; nRepeat <= this.m_AllocArray.Count; ++nRepeat)
            {
                this.m_AllocArray[nRepeat - 1].AddRepeatFields(this.m_hndPOST, nRepeat);
            }
            this.m_AllocArray.Clear();
            for (int nRepeat = 1; nRepeat <= this.m_ARAllocArray.Count; ++nRepeat)
            {
                this.m_ARAllocArray[nRepeat - 1].AddRepeatFields(this.m_hndPOST, nRepeat);
            }
            this.m_ARAllocArray.Clear();
            this.GetLink().TablePOST_AddRecord(this.m_hndPOST);
            PLGBEnt plgbEnt = this;

            plgbEnt.m_lCounter = plgbEnt.m_lCounter + 1;
            if (this.m_lCounter < PLXMLData.m_nMaxCounter)
            {
                return;
            }
            this.Send();
        }
 public PCLawConversion()
 {
     try
     {
         this.PL               = new PLLink();
         this.GenInf           = new PLGenInfo();
         this.Lawyer           = new PLLawyer();
         this.User             = new PLUser();
         this.Rate             = new PLRate();
         this.ContactType      = new PLContactType();
         this.DiaryCode        = new PLDiaryCode();
         this.ExpCode          = new PLExpCode();
         this.GLAccts          = new PLGLAccts();
         this.Task             = new PLTask();
         this.GBAcct           = new PLGBAcct();
         this.TBAcct           = new PLTBAcct();
         this.TypeOfLaw        = new PLTypeOfLaw();
         this.Location         = new PLLocationCode();
         this.Department       = new PLDepartment();
         this.RefSource        = new PLRefSource();
         this.Client           = new PLClient();
         this.Contact          = new PLContact();
         this.Matter           = new PLMatter();
         this.Vendor           = new PLVendor();
         this.Bill             = new PLBilling();
         this.WUD              = new PLWUD();
         this.TimeEntry        = new PLTimeEntry();
         this.Trust            = new PLTBEnt();
         this.General          = new PLGBEnt();
         this.Expense          = new PLExpense();
         this.Payable          = new PLPayableEntry();
         this.GJ               = new PLGJEntry();
         this.Diary            = new PLDiary();
         this.SCStageGroup     = new PLSafeCustStageGroup();
         this.SCStage          = new PLSafeCustStage();
         this.SCType           = new PLSafeCustType();
         this.SCStatus         = new PLSafeCustStatus();
         this.SCPacket         = new PLSafeCustPacket();
         this.SCSafeCustRecord = new PLSafeCustEntry();
         this.SCMovements      = new PLSafeCustMovement();
         this.CustomTab        = new PLCustomTab();
     }
     catch (Exception ex)
     {
         int num = (int)MessageBox.Show(ex.Message);
     }
 }