Ejemplo n.º 1
0
        private static void ReadTable()
        {
            if (PLVendor.bRead)
            {
                return;
            }
            uint   num          = 0;
            object szValue      = new object();
            string empty        = string.Empty;
            string szText       = "VendorID|VendorNickName|VendorQuickBooksID";
            uint   createHandle = PLLink.GetLink().TableGET_CreateHandle("Vendor", 0, 0, 0U);

            PLLink.GetLink().TableGET_AddFilter(createHandle, "VendorStatus", "EQ", "0", 1);
            PLLink.GetLink().TableGET_AddDirective(createHandle, "FieldList", szText);
            while (PLLink.GetLink().TableGET_GetNextRecord(createHandle) == 0)
            {
                PLLink.GetLink().TableGET_RecordField_ValueString(createHandle, "VendorNickName", "", ref szValue);
                string Key = szValue.ToString().ToUpper().Trim();
                int    recordFieldValueI32 = PLLink.GetLink().TableGET_RecordField_ValueI32(createHandle, "VendorID");
                PLVendor.AddMapIDtoNN(recordFieldValueI32, Key);
                PLVendor.AddMapNNtoID(Key, recordFieldValueI32);
                PLLink.GetLink().TableGET_RecordField_ValueString(createHandle, "VendorQuickBooksID", "", ref szValue);
                if (!szValue.ToString().ToUpper().Trim().Equals(""))
                {
                    PLVendor.AddMapIDtoQuickBooksID(recordFieldValueI32, szValue.ToString());
                }
            }
            PLLink.GetLink().TableGET_CloseHandle(createHandle);
            num            = 0U;
            PLVendor.bRead = true;
        }
Ejemplo n.º 2
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;
        }
Ejemplo n.º 3
0
        private static void ReadTable()
        {
            if (PLConfig.bRead)
            {
                return;
            }
            uint   num          = 0;
            object szValue      = new object();
            uint   createHandle = PLLink.GetLink().TableGET_CreateHandle("Configuration", 0, 0, 0U);

            PLLink.GetLink().TableGET_AddFilter(createHandle, "ConfigStatus", "EQ", "0", 1);
            while (PLLink.GetLink().TableGET_GetNextRecord(createHandle) == 0)
            {
                PLLink.GetLink().TableGET_RecordField_ValueString(createHandle, "ConfigName", "", ref szValue);
                string str = szValue.ToString().Trim();
                int    recordFieldValueI32 = PLLink.GetLink().TableGET_RecordField_ValueI32(createHandle, "ConfigID");
                PLConfig.AddMapNNtoID(str, recordFieldValueI32);
                PLConfig.AddMapIDtoNN(recordFieldValueI32, str);
                StaticData.AddNicknameToList(str);
                PLLink.GetLink().TableGET_RecordField_ValueString(createHandle, "ConfigValue", "", ref szValue);
                PLConfig.AddMapNametoValue(str, szValue.ToString().Trim());
                PLLink.GetLink().TableGET_RecordField_ValueString(createHandle, "ConfigSection", "", ref szValue);
                PLConfig.AddMapNametoSection(str, szValue.ToString().Trim());
            }
            PLLink.GetLink().TableGET_CloseHandle(createHandle);
            num            = 0U;
            PLConfig.bRead = true;
        }
Ejemplo n.º 4
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;
        }
Ejemplo n.º 5
0
        private static void ReadTable()
        {
            if (PLGBAcct.bRead)
            {
                return;
            }
            uint   num          = 0;
            object szValue      = new object();
            uint   createHandle = PLLink.GetLink().TableGET_CreateHandle("GeneralBankAcct", 0, 0, 0U);

            PLLink.GetLink().TableGET_AddFilter(createHandle, "GeneralBankAcctStatus", "EQ", "0", 1);
            while (PLLink.GetLink().TableGET_GetNextRecord(createHandle) == 0)
            {
                PLLink.GetLink().TableGET_RecordField_ValueString(createHandle, "GeneralBankAcctNickName", "", ref szValue);
                string Key = szValue.ToString().ToUpper().Trim();
                int    recordFieldValueI32 = PLLink.GetLink().TableGET_RecordField_ValueI32(createHandle, "GeneralBankAcctID");
                PLGBAcct.AddMapNNtoID(Key, recordFieldValueI32);
                PLGBAcct.AddMapIDtoNN(recordFieldValueI32, Key);
                PLLink.GetLink().TableGET_RecordField_ValueString(createHandle, "GeneralBankAcctPostRefNickName", "", ref szValue);
                string str1 = szValue.ToString().ToUpper().Trim();
                PLGBAcct.AddMapIDtoGLNN(recordFieldValueI32, str1);
                PLLink.GetLink().TableGET_RecordField_ValueString(createHandle, "GeneralBankAcctQuickBooksID", "", ref szValue);
                string str2 = szValue.ToString().ToUpper().Trim();
                if (!str2.Equals(""))
                {
                    PLGBAcct.AddMapPLIDtoQBID(recordFieldValueI32, str2);
                }
            }
            PLLink.GetLink().TableGET_CloseHandle(createHandle);
            num            = 0U;
            PLGBAcct.bRead = true;
        }
Ejemplo n.º 6
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;
        }
Ejemplo n.º 7
0
        public static string GetNextClientNN()
        {
            string empty = string.Empty;
            object obj   = new object();

            PLLink.GetLink().GetNextAvailClient(ref obj);
            return(obj.ToString());
        }
Ejemplo n.º 8
0
 private static void ReadTable()
 {
     if (!PLClient.m_bRead)
     {
         uint   num = 0;
         object obj = new object();
         if (PLClient.m_MapNameKeytoPLID == null)
         {
             PLClient.m_MapNameKeytoPLID = new Dictionary <string, int>();
         }
         num = PLLink.GetLink().TableGET_CreateHandle("Client", 0, 0, 0);
         PLLink.GetLink().TableGET_AddFilter(num, "ClientStatus", "EQ", "0", 1);
         if (!PLClient.m_sFieldList.Equals(""))
         {
             PLLink.GetLink().TableGET_AddDirective(num, "FieldList", PLClient.m_sFieldList);
         }
         while (PLLink.GetLink().TableGET_GetNextRecord(num) == 0)
         {
             PLLink.GetLink().TableGET_RecordField_ValueString(num, "ClientNum", "", ref obj);
             string str  = obj.ToString().ToUpper().Trim();
             int    num1 = PLLink.GetLink().TableGET_RecordField_ValueI32(num, "ClientID");
             PLClient.AddMapIDtoNN(num1, str);
             PLClient.AddMapNNtoID(str, num1);
             int num2 = PLLink.GetLink().TableGET_RecordField_ValueI32(num, "ClientPersonContactID");
             PLClient.AddMapNNtoContactID(str, num2);
             PLClient.AddMapClientIDtoContactID(num1, num2);
             PLClient.AddMapContactIDtoClientID(num2, num1);
             PLLink.GetLink().TableGET_RecordField_ValueString(num, "ClientFirstName", "", ref obj);
             string str1 = obj.ToString().ToUpper().Trim();
             PLLink.GetLink().TableGET_RecordField_ValueString(num, "ClientInitial", "", ref obj);
             string str2 = obj.ToString().ToUpper().Trim();
             PLLink.GetLink().TableGET_RecordField_ValueString(num, "ClientLastName", "", ref obj);
             string str3 = obj.ToString().ToUpper().Trim();
             PLLink.GetLink().TableGET_RecordField_ValueString(num, "ClientCompany", "", ref obj);
             string str4 = obj.ToString().ToUpper().Trim();
             string str5 = string.Concat(str1, str2, str3, str4);
             str5 = str5.ToUpper().Trim();
             while (str5.IndexOf("  ") > 0)
             {
                 str5 = str5.Replace("  ", " ");
             }
             PLClient.AddMapNameKeytoPLID(str5, num1);
             PLLink.GetLink().TableGET_RecordField_ValueString(num, "ClientQuickBooksID", "", ref obj);
             string str6 = obj.ToString().ToUpper().Trim();
             if (!str6.Equals(""))
             {
                 PLClient.AddMapPLIDtoQBID(num1, str6);
             }
         }
         PLLink.GetLink().TableGET_CloseHandle(num);
         num = 0;
         PLClient.m_bRead = true;
     }
 }
Ejemplo n.º 9
0
        public int ResetQuickBooksConnection()
        {
            if (!PLConfig.bRead)
            {
                PLConfig.ReadTable();
            }
            Dictionary <string, int> .Enumerator enumerator = PLConfig.m_MapNNtoID.GetEnumerator();
            while (enumerator.MoveNext())
            {
                KeyValuePair <string, int> current = enumerator.Current;
                bool flag;
                if (!current.Key.ToLower().Contains("qb_companyname"))
                {
                    current = enumerator.Current;
                    if (!current.Key.ToLower().Contains("qb_lastsyncdate"))
                    {
                        current = enumerator.Current;
                        if (!current.Key.ToLower().Contains("qb_pclaw_"))
                        {
                            current = enumerator.Current;
                            flag    = !current.Key.ToLower().Contains("qb_employee_");
                            goto label_8;
                        }
                    }
                }
                flag = false;
label_8:
                if (!flag)
                {
                    current = enumerator.Current;
                    if (current.Value != 0)
                    {
                        current = enumerator.Current;
                        this.ReadExisting((uint)current.Value);
                        this.Value   = string.Empty;
                        this.Section = string.Empty;
                        this.UserID  = 0;
                    }
                }
            }
            return(PLLink.GetLink().ResetAllQuickBooksIDs());
        }
Ejemplo n.º 10
0
        private static void ReadTable()
        {
            if (PLSafeCustStatus.bRead)
            {
                return;
            }
            uint   num          = 0;
            object szValue      = new object();
            uint   createHandle = PLLink.GetLink().TableGET_CreateHandle("SafeCustStatus", 0, 0, 0U);

            PLLink.GetLink().TableGET_AddFilter(createHandle, "SCStatusStatus", "EQ", "0", 1);
            while (PLLink.GetLink().TableGET_GetNextRecord(createHandle) == 0)
            {
                PLLink.GetLink().TableGET_RecordField_ValueString(createHandle, "SCStatusDescription", "", ref szValue);
                string Key = szValue.ToString().ToUpper().Trim();
                int    recordFieldValueI32 = PLLink.GetLink().TableGET_RecordField_ValueI32(createHandle, "SCStatusID");
                PLSafeCustStatus.AddMapNNtoID(Key, recordFieldValueI32);
                PLSafeCustStatus.AddMapIDtoNN(recordFieldValueI32, Key);
            }
            PLLink.GetLink().TableGET_CloseHandle(createHandle);
            num = 0U;
            PLSafeCustStatus.bRead = true;
        }
Ejemplo n.º 11
0
        private static void ReadTable()
        {
            if (PLLawyer.bRead)
            {
                return;
            }
            uint   num          = 0;
            object szValue      = new object();
            string empty        = string.Empty;
            uint   createHandle = PLLink.GetLink().TableGET_CreateHandle("Lawyer", 0, 0, 0U);

            while (PLLink.GetLink().TableGET_GetNextRecord(createHandle) == 0)
            {
                PLLink.GetLink().TableGET_RecordField_ValueString(createHandle, "LawyerStatus", "", ref szValue);
                int int32 = Convert.ToInt32(szValue.ToString().ToUpper().Trim());
                PLLink.GetLink().TableGET_RecordField_ValueString(createHandle, "LawyerNickName", "", ref szValue);
                string str1 = szValue.ToString().ToUpper().Trim();
                if (int32 <= 0 || (str1.ToLower() == "it~" ? 0 : (str1.ToLower() != "int~" ? 1 : 0)) == 0)
                {
                    int recordFieldValueI32_1 = PLLink.GetLink().TableGET_RecordField_ValueI32(createHandle, "LawyerID");
                    int recordFieldValueI32_2 = PLLink.GetLink().TableGET_RecordField_ValueI32(createHandle, "LawyerFeesAccountID");
                    PLLink.GetLink().TableGET_RecordField_ValueString(createHandle, "LawyerQuickBooksID", "", ref szValue);
                    string str2 = szValue.ToString().ToUpper().Trim();
                    PLLawyer.AddMapNNtoID(str1, recordFieldValueI32_1);
                    PLLawyer.AddMapIDtoNN(recordFieldValueI32_1, str1);
                    PLLawyer.AddMapPLIDtoGLID(recordFieldValueI32_1, recordFieldValueI32_2);
                    PLLawyer.AddNicknameToList(str1);
                    if (!str2.Equals(""))
                    {
                        PLLawyer.AddMapPLIDtoQBID(recordFieldValueI32_1, str2);
                    }
                }
            }
            PLLink.GetLink().TableGET_CloseHandle(createHandle);
            num            = 0U;
            PLLawyer.bRead = true;
        }
Ejemplo n.º 12
0
        private static void ReadTable()
        {
            if (PLDiaryCode.bRead)
            {
                return;
            }
            uint   num = 0;
            object obj = new object();

            num = PLLink.GetLink().TableGET_CreateHandle("DiaryCode", 0, 0, 0);
            PLLink.GetLink().TableGET_AddFilter(num, "DiaryCodeStatus", "EQ", "0", 1);
            while (PLLink.GetLink().TableGET_GetNextRecord(num) == 0)
            {
                PLLink.GetLink().TableGET_RecordField_ValueString(num, "DiaryCodeNickName", "", ref obj);
                string str = obj.ToString().ToUpper().Trim();
                int    recordFieldValueI32 = PLLink.GetLink().TableGET_RecordField_ValueI32(num, "DiaryCodeID");
                PLDiaryCode.AddMapNNtoID(str, recordFieldValueI32);
                PLDiaryCode.AddMapIDtoNN(recordFieldValueI32, str);
                PLDiaryCode.AddNicknameToList(str);
            }
            PLLink.GetLink().TableGET_CloseHandle(num);
            num = 0U;
            PLDiaryCode.bRead = true;
        }
Ejemplo n.º 13
0
        private static void ReadTable()
        {
            if (PLUser.bRead)
            {
                return;
            }
            uint   num          = 0;
            object szValue      = new object();
            uint   createHandle = PLLink.GetLink().TableGET_CreateHandle("SecUser", 0, 0, 0U);

            PLLink.GetLink().TableGET_AddFilter(createHandle, "SecUserStatus", "EQ", "0", 1);
            while (PLLink.GetLink().TableGET_GetNextRecord(createHandle) == 0)
            {
                PLLink.GetLink().TableGET_RecordField_ValueString(createHandle, "SecUserNickName", "", ref szValue);
                string str = szValue.ToString().ToUpper().Trim();
                int    recordFieldValueI32 = PLLink.GetLink().TableGET_RecordField_ValueI32(createHandle, "SecUserID");
                PLUser.AddMapNNtoID(str, recordFieldValueI32);
                PLUser.AddMapIDtoNN(recordFieldValueI32, str);
                PLUser.AddNicknameToList(str);
            }
            PLLink.GetLink().TableGET_CloseHandle(createHandle);
            num          = 0U;
            PLUser.bRead = true;
        }
Ejemplo n.º 14
0
 private PCLawATLClass GetLink()
 {
     return(PLLink.GetLink());
 }
Ejemplo n.º 15
0
 public int ResetQuickBooksIDsInPCLaw(uint nStartFromID)
 {
     return(PLLink.GetLink().ResetQuickbooksID(this.m_sTableName, nStartFromID));
 }
Ejemplo n.º 16
0
 protected PCLawATLClass GetLink()
 {
     return(PLLink.GetLink());
 }
Ejemplo n.º 17
0
        private static void ReadTable()
        {
            if (PLGLAccts.bRead)
            {
                return;
            }
            uint   num          = 0;
            object szValue      = new object();
            uint   createHandle = PLLink.GetLink().TableGET_CreateHandle("PostRef", 0, 0, 0U);

            PLLink.GetLink().TableGET_AddFilter(createHandle, "PostRefStatus", "EQ", "0", 1);
            while (PLLink.GetLink().TableGET_GetNextRecord(createHandle) == 0)
            {
                PLLink.GetLink().TableGET_RecordField_ValueString(createHandle, "PostRefNickName", "", ref szValue);
                string Key = szValue.ToString().ToUpper().Trim();
                int    recordFieldValueI32_1 = PLLink.GetLink().TableGET_RecordField_ValueI32(createHandle, "PostRefID");
                PLGLAccts.AddMapNNtoID(Key, recordFieldValueI32_1);
                PLGLAccts.AddMapIDtoNN(recordFieldValueI32_1, Key);
                int recordFieldValueI32_2 = PLLink.GetLink().TableGET_RecordField_ValueI32(createHandle, "LawyerID");
                PLLink.GetLink().TableGET_RecordField_ValueString(createHandle, "PostRefSpecialAcct", "", ref szValue);
                if (!szValue.ToString().Equals(""))
                {
                    if (Convert.ToInt32(szValue) == Convert.ToInt32((object)PLGLAccts.eSPEC_ACCT.DISB_REC))
                    {
                        PLGLAccts.m_ExpRecovNN = Key;
                        PLGLAccts.m_ExpRecovID = recordFieldValueI32_1;
                    }
                    else if (Convert.ToInt32(szValue) == Convert.ToInt32((object)PLGLAccts.eSPEC_ACCT.SUSPENSE))
                    {
                        PLGLAccts.m_SuspenseNN = Key;
                        PLGLAccts.m_SuspenseID = recordFieldValueI32_1;
                    }
                    else if (Convert.ToInt32(szValue) == Convert.ToInt32((object)PLGLAccts.eSPEC_ACCT.AP))
                    {
                        PLGLAccts.m_APAccountNN = Key;
                        PLGLAccts.m_APAccountID = recordFieldValueI32_1;
                    }
                    else if (Convert.ToInt32(szValue) == Convert.ToInt32((object)PLGLAccts.eSPEC_ACCT.AR))
                    {
                        PLGLAccts.m_ARAccountNN = Key;
                        PLGLAccts.m_ARAccountID = recordFieldValueI32_1;
                    }
                    else if (recordFieldValueI32_2 == 0 && Convert.ToInt32(szValue) == Convert.ToInt32((object)PLGLAccts.eSPEC_ACCT.FEES))
                    {
                        PLGLAccts.m_FeesEarnedAccountID = recordFieldValueI32_1;
                    }
                    else if (Convert.ToInt32(szValue) == Convert.ToInt32((object)PLGLAccts.eSPEC_ACCT.TRUST_LIABILITY))
                    {
                        PLGLAccts.m_TrustLiabilityID = recordFieldValueI32_1;
                    }
                }
                PLLink.GetLink().TableGET_RecordField_ValueString(createHandle, "PostRefQuickBooksID", "", ref szValue);
                string str = szValue.ToString().ToUpper().Trim();
                if (!str.Equals(""))
                {
                    PLGLAccts.AddMapPLIDtoQBID(recordFieldValueI32_1, str);
                }
            }
            PLLink.GetLink().TableGET_CloseHandle(createHandle);
            num             = 0U;
            PLGLAccts.bRead = true;
        }