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; }
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) && PLLawyer.GetIDFromNN(this.NickName) > 0) { this.NickName = this.MakeNN(true); } else if ((this.NickName.Length.Equals(0) ? 1 : (this.NickName.Length > 4 ? 1 : 0)) != 0) { this.NickName = this.MakeNN(true); } PLLawyer.AddNicknameToList(this.NickName); base.AddRecord(); for (short index = 1; (int)index <= this.m_RateArr.Count; ++index) { this.m_RateID.SetValue(this.m_RateArr[(int)index - 1].RateID); this.m_RateID.AddRepeatField(this.m_hndPOST, (int)index); this.m_RateAmt.SetValue(this.m_RateArr[(int)index - 1].RateAmount); this.m_RateAmt.AddRepeatField(this.m_hndPOST, (int)index); this.m_RateDate.SetValue(this.m_RateArr[(int)index - 1].RateDate); this.m_RateDate.AddRepeatField(this.m_hndPOST, (int)index); } this.m_RateArr.Clear(); this.GetLink().TablePOST_AddRecord(this.m_hndPOST); PLLawyer plLawyer = this; plLawyer.m_lCounter = plLawyer.m_lCounter + 1; if (this.m_lCounter < PLXMLData.m_nMaxCounter) { return; } this.Send(); }