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); } }
public static string GetQBIDFromPLID(int nID) { string str; if (!nID.Equals(0)) { if (!PLTBAcct.bRead) { PLTBAcct.ReadTable(); } str = PLTBAcct.m_MapPLIDtoQBID == null ? "" : (PLTBAcct.m_MapPLIDtoQBID.ContainsKey(nID) ? Convert.ToString(PLTBAcct.m_MapPLIDtoQBID[nID]) : ""); } else { str = ""; } return(str); }
public static int GetPLIDFromQBID(string sQBID) { int num1; if (!sQBID.Equals("")) { if (!PLTBAcct.bRead) { PLTBAcct.ReadTable(); } if (PLTBAcct.m_MapPLIDtoQBID == null) { num1 = 0; } else if (PLTBAcct.m_MapPLIDtoQBID.ContainsValue(sQBID)) { int num2 = 0; Dictionary <int, string> .Enumerator enumerator = PLTBAcct.m_MapPLIDtoQBID.GetEnumerator(); while (enumerator.MoveNext()) { Dictionary <int, string> mapPliDtoQbid = PLTBAcct.m_MapPLIDtoQBID; KeyValuePair <int, string> current = enumerator.Current; if (mapPliDtoQbid[current.Key].ToUpper().CompareTo(sQBID.ToUpper()) == 0) { current = enumerator.Current; num2 = current.Key; } } num1 = num2; } else { num1 = 0; } } else { num1 = 0; } return(num1); }
public override void Send() { object nProcessed = new object(); object nExceptions = new object(); object vunIDCreated = new object(); object nExceptionError = new object(); object szExceptionErrorMsg = new object(); object szExceptionSentData = new object(); object szValue = new object(); string szDefault = ""; string str1 = ""; PLGLAccts plglAccts = new PLGLAccts(); this.GetLink().TablePOST_Send(this.m_hndPOST, ref nProcessed, ref nExceptions); while (this.GetLink().TablePOST_GetNextResult(this.m_hndPOST, ref vunIDCreated, ref nExceptionError, ref szExceptionErrorMsg, ref szExceptionSentData) == 0) { if (Convert.ToInt32(nExceptionError) <= 0) { int int32 = Convert.ToInt32(vunIDCreated); this.GetLink().TablePOST_ResultDataField_String(this.m_hndPOST, this.m_NickName.sLinkName, szDefault, ref szValue); PLTBAcct.AddMapIDtoNN(int32, szValue.ToString().ToUpper()); PLTBAcct.AddMapNNtoID(szValue.ToString().ToUpper(), int32); this.GetLink().TablePOST_ResultDataField_String(this.m_hndPOST, this.m_GLNN.sLinkName, szDefault, ref szValue); PLTBAcct.AddMapIDtoGLNN(int32, szValue.ToString()); this.GetLink().TablePOST_ResultDataField_String(this.m_hndPOST, this.m_ExternalID_1.sLinkName, szDefault, ref szValue); if (!szValue.ToString().Equals("")) { PLTBAcct.AddMapExtID1toPLID(szValue.ToString(), int32); } this.GetLink().TablePOST_ResultDataField_String(this.m_hndPOST, this.m_ExternalID_2.sLinkName, szDefault, ref szValue); if (!szValue.ToString().Equals("")) { PLTBAcct.AddMapExtID2toPLID(szValue.ToString(), int32); } this.GetLink().TablePOST_ResultDataField_String(this.m_hndPOST, "TrustBankAcctQuickBooksID", szDefault, ref szValue); szValue = (object)szValue.ToString().ToUpper().Trim(); if (!szValue.Equals((object)"")) { PLTBAcct.AddMapPLIDtoQBID(int32, szValue.ToString()); str1 = szValue.ToString(); } this.GetLink().TablePOST_ResultDataField_String(this.m_hndPOST, "TrustBankAcctPostRefNickName", szDefault, ref szValue); szValue = (object)szValue.ToString().ToUpper().Trim(); if (!szValue.Equals((object)"")) { string str2 = szValue.ToString(); plglAccts.AddFilter(plglAccts.NickName_LinkName, PLXMLData.eFilterCompare.EQ, str2, 1); while (plglAccts.GetNextRecord() == 0) { PLGLAccts.AddMapNNtoID(str2, plglAccts.ID); PLGLAccts.AddMapIDtoNN(plglAccts.ID, str2); plglAccts.ReadExisting((uint)plglAccts.ID); if (str1 != "") { plglAccts.QuickBooksID = str1; plglAccts.AddRecord(); plglAccts.SendLast(); } } } } } short int16_1 = Convert.ToInt16(nProcessed); short int16_2 = Convert.ToInt16(nExceptions); PLXMLData.m_lErrorCount += (long)int16_2; if (((int)int16_2 > 0 ? 1 : (this.m_lCounter != (int)int16_1 ? 1 : 0)) != 0) { this.GetLink().TablePOST_DumpExceptionsToLinkLog(this.m_hndPOST); } this.GetLink().TablePOST_Reset(this.m_hndPOST); this.m_lCounter = 0; }