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 GetNNFromID(int nID) { string str; if (!nID.Equals(0)) { if (!PLCustomTab.bRead) { PLCustomTab.ReadTable(); } str = PLCustomTab.m_MapIDtoNN == null ? "" : (PLCustomTab.m_MapIDtoNN.ContainsKey((object)nID) ? PLCustomTab.m_MapIDtoNN[(object)nID].ToString() : ""); } else { str = ""; } return(str); }
public static int GetIDFromNN(string Key) { Key = Key.ToUpper(); int num; if (!Key.Equals("")) { if (!PLCustomTab.bRead) { PLCustomTab.ReadTable(); } num = PLCustomTab.m_MapNNtoID == null ? 0 : (PLCustomTab.m_MapNNtoID.ContainsKey((object)Key) ? Convert.ToInt32(PLCustomTab.m_MapNNtoID[(object)Key]) : 0); } else { num = 0; } return(num); }
private static void ReadTable() { if (PLCustomTab.bRead) { return; } uint num = 0; object szValue = new object(); uint createHandle = PLLink.GetLink().TableGET_CreateHandle("CustomTab", 0, 0, 0U); PLLink.GetLink().TableGET_AddFilter(createHandle, "CustomTabStatus", "EQ", "0", 1); while (PLLink.GetLink().TableGET_GetNextRecord(createHandle) == 0) { PLLink.GetLink().TableGET_RecordField_ValueString(createHandle, "CustomTabName", "", ref szValue); string str = szValue.ToString().ToUpper().Trim(); int recordFieldValueI32 = PLLink.GetLink().TableGET_RecordField_ValueI32(createHandle, "CustomTabID"); PLCustomTab.AddMapNNtoID(str, recordFieldValueI32); PLCustomTab.AddMapIDtoNN(recordFieldValueI32, str); StaticData.AddNicknameToList(str); } PLLink.GetLink().TableGET_CloseHandle(createHandle); num = 0U; PLCustomTab.bRead = true; }
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 = ""; this.m_lSendErrorCount = 0L; string str1; string str2; string str3; string str4; string str5; string str6; try { this.GetLink().TablePOST_Send(this.m_hndPOST, ref nProcessed, ref nExceptions); } catch (AccessViolationException ex) { str1 = ex.Data == null ? "" : ex.Data.ToString(); str2 = ex.HelpLink == null ? "" : ex.HelpLink.ToString(); str3 = ex.InnerException == null ? "" : ex.InnerException.ToString(); string message = ex.Message; str4 = ex.Source == null ? "" : ex.Source.ToString(); str5 = ex.StackTrace == null ? "" : ex.StackTrace.ToString(); str6 = ex.TargetSite == (MethodBase)null ? "" : ex.TargetSite.ToString(); this.GetLink().LinkLog_AddLinkLogMessage("AccessViolationException Execption: " + message); this.GetLink().TablePOST_DumpExceptionsToLinkLog(this.m_hndPOST); this.GetLink().TablePOST_Reset(this.m_hndPOST); return; } catch (FormatException ex) { str1 = ex.Data == null ? "" : ex.Data.ToString(); str2 = ex.HelpLink == null ? "" : ex.HelpLink.ToString(); str3 = ex.InnerException == null ? "" : ex.InnerException.ToString(); string message = ex.Message; str4 = ex.Source == null ? "" : ex.Source.ToString(); str5 = ex.StackTrace == null ? "" : ex.StackTrace.ToString(); str6 = ex.TargetSite == (MethodBase)null ? "" : ex.TargetSite.ToString(); this.GetLink().LinkLog_AddLinkLogMessage("Format Execption: " + message); this.GetLink().TablePOST_DumpExceptionsToLinkLog(this.m_hndPOST); this.GetLink().TablePOST_Reset(this.m_hndPOST); return; } catch (Exception ex) { str1 = ex.Data == null ? "" : ex.Data.ToString(); str2 = ex.HelpLink == null ? "" : ex.HelpLink.ToString(); str3 = ex.InnerException == null ? "" : ex.InnerException.ToString(); string message = ex.Message; str4 = ex.Source == null ? "" : ex.Source.ToString(); str5 = ex.StackTrace == null ? "" : ex.StackTrace.ToString(); str6 = ex.TargetSite == (MethodBase)null ? "" : ex.TargetSite.ToString(); this.GetLink().LinkLog_AddLinkLogMessage("Catch All Execption: " + message); this.GetLink().TablePOST_DumpExceptionsToLinkLog(this.m_hndPOST); this.GetLink().TablePOST_Reset(this.m_hndPOST); this.m_lCounter = 0; return; } try { 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); PLCustomTab plCustomTab = this; plCustomTab.m_lSendErrorCount = plCustomTab.m_lSendErrorCount + 1L; } while (this.GetLink().TablePOST_GetNextResult(this.m_hndPOST, ref vunIDCreated, ref nExceptionError, ref szExceptionErrorMsg, ref szExceptionSentData) == 0) { if (Convert.ToInt32(nExceptionError) <= 0) { this.GetLink().TablePOST_ResultDataField_String(this.m_hndPOST, this.m_ExternalID_1.sLinkName, szDefault, ref szValue); PLCustomTab.AddMapExtID1toPLID(szValue.ToString(), Convert.ToInt32(vunIDCreated)); this.GetLink().TablePOST_ResultDataField_String(this.m_hndPOST, this.m_ExternalID_2.sLinkName, szDefault, ref szValue); PLCustomTab.AddMapExtID2toPLID(szValue.ToString(), Convert.ToInt32(vunIDCreated)); } } PLCustomTab.ClearMapIDtoNN(); PLCustomTab.ClearMapNNtoID(); PLCustomTab.bRead = false; PLCustomTab.ReadTable(); this.GetLink().TablePOST_Reset(this.m_hndPOST); this.m_lCounter = 0; } catch (Exception ex) { str1 = ex.Data == null ? "" : ex.Data.ToString(); str2 = ex.HelpLink == null ? "" : ex.HelpLink.ToString(); str3 = ex.InnerException == null ? "" : ex.InnerException.ToString(); string message = ex.Message; str4 = ex.Source == null ? "" : ex.Source.ToString(); str5 = ex.StackTrace == null ? "" : ex.StackTrace.ToString(); str6 = ex.TargetSite == (MethodBase)null ? "" : ex.TargetSite.ToString(); this.GetLink().LinkLog_AddLinkLogMessage("Catch All Execption: " + message); this.GetLink().TablePOST_DumpExceptionsToLinkLog(this.m_hndPOST); this.GetLink().TablePOST_Reset(this.m_hndPOST); this.m_lCounter = 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 || !this.m_ID.m_bIsSet ? 0 : (this.m_ID.nValue.Equals(0) ? 1 : 0)) != 0 && (PLCustomTab.GetIDFromNN(this.NickName) > 0 || string.IsNullOrEmpty(this.NickName) ? 1 : (this.NickName.Length > 20 ? 1 : 0)) != 0) { ++PLCustomTab.m_nNN; string str = PLCustomTab.m_nNN.ToString(); while (str.Length < 20) { str = "0" + str; } this.NickName = str; } StaticData.AddNicknameToList(this.NickName); this.m_ID.AddField(this.m_hndPOST); this.m_Status.AddField(this.m_hndPOST); this.m_Flags.AddField(this.m_hndPOST); this.m_Flags2.AddField(this.m_hndPOST); this.m_TabType.AddField(this.m_hndPOST); this.m_Template.AddField(this.m_hndPOST); this.m_NickName.AddField(this.m_hndPOST); this.m_Description.AddField(this.m_hndPOST); this.m_XMLName.AddField(this.m_hndPOST); this.m_TypeOfLawID.AddField(this.m_hndPOST); this.m_IsElecBilling.AddField(this.m_hndPOST); this.m_HasRequiredFields.AddField(this.m_hndPOST); this.m_ShowbyDefaultLawtype.AddField(this.m_hndPOST); this.m_MustShowLawtype.AddField(this.m_hndPOST); this.m_IsOriginalCustomTab.AddField(this.m_hndPOST); this.m_ShowForMatter.AddField(this.m_hndPOST); this.m_ShowForClient.AddField(this.m_hndPOST); this.m_ShowForContact.AddField(this.m_hndPOST); this.m_ShowForVendor.AddField(this.m_hndPOST); for (short index = 1; (int)index <= this.m_FieldIDArr.Count; ++index) { this.m_FieldID.SetValue(Convert.ToInt32(this.m_FieldIDArr[(int)index - 1])); this.m_FieldID.AddRepeatField(this.m_hndPOST, (int)index); this.m_FieldStatus.SetValue(Convert.ToInt32(this.m_FieldStatusArr[(int)index - 1])); this.m_FieldStatus.AddRepeatField(this.m_hndPOST, (int)index); this.m_FieldOrder.SetValue(Convert.ToInt32(this.m_FieldOrderArr[(int)index - 1])); this.m_FieldOrder.AddRepeatField(this.m_hndPOST, (int)index); this.m_FieldRequired.SetValue(Convert.ToBoolean(this.m_FieldRequiredArr[(int)index - 1])); this.m_FieldRequired.AddRepeatField(this.m_hndPOST, (int)index); this.m_FieldLabel.SetValue(Convert.ToString(this.m_FieldLabelArr[(int)index - 1])); this.m_FieldLabel.AddRepeatField(this.m_hndPOST, (int)index); this.m_FieldToolTip.SetValue(Convert.ToString(this.m_FieldToolTipArr[(int)index - 1])); this.m_FieldToolTip.AddRepeatField(this.m_hndPOST, (int)index); this.m_FieldType.SetValue(Convert.ToInt32(this.m_FieldTypeArr[(int)index - 1])); this.m_FieldType.AddRepeatField(this.m_hndPOST, (int)index); this.m_FieldLen.SetValue(Convert.ToInt32(this.m_FieldLenArr[(int)index - 1])); this.m_FieldLen.AddRepeatField(this.m_hndPOST, (int)index); this.m_FieldRangeMin.SetValue(Convert.ToString(this.m_FieldRangeMinArr[(int)index - 1])); this.m_FieldRangeMin.AddRepeatField(this.m_hndPOST, (int)index); this.m_FieldRangeMax.SetValue(Convert.ToString(this.m_FieldRangeMaxArr[(int)index - 1])); this.m_FieldRangeMax.AddRepeatField(this.m_hndPOST, (int)index); } this.m_FieldIDArr.Clear(); while (this.m_FieldIDArr.Count > 0) { this.m_FieldIDArr.RemoveAt(0); } this.m_FieldStatusArr.Clear(); while (this.m_FieldStatusArr.Count > 0) { this.m_FieldStatusArr.RemoveAt(0); } this.m_FieldOrderArr.Clear(); while (this.m_FieldOrderArr.Count > 0) { this.m_FieldOrderArr.RemoveAt(0); } this.m_FieldRequiredArr.Clear(); while (this.m_FieldRequiredArr.Count > 0) { this.m_FieldRequiredArr.RemoveAt(0); } this.m_FieldLabelArr.Clear(); while (this.m_FieldLabelArr.Count > 0) { this.m_FieldLabelArr.RemoveAt(0); } this.m_FieldToolTipArr.Clear(); while (this.m_FieldToolTipArr.Count > 0) { this.m_FieldToolTipArr.RemoveAt(0); } this.m_FieldTypeArr.Clear(); while (this.m_FieldTypeArr.Count > 0) { this.m_FieldTypeArr.RemoveAt(0); } this.m_FieldLenArr.Clear(); while (this.m_FieldLenArr.Count > 0) { this.m_FieldLenArr.RemoveAt(0); } this.m_FieldRangeMinArr.Clear(); while (this.m_FieldRangeMinArr.Count > 0) { this.m_FieldRangeMinArr.RemoveAt(0); } this.m_FieldRangeMaxArr.Clear(); while (this.m_FieldRangeMaxArr.Count > 0) { this.m_FieldRangeMaxArr.RemoveAt(0); } this.m_ExternalID_1.AddField(this.m_hndPOST); this.m_ExternalID_2.AddField(this.m_hndPOST); this.GetLink().TablePOST_AddRecord(this.m_hndPOST); PLCustomTab plCustomTab = this; plCustomTab.m_lCounter = plCustomTab.m_lCounter + 1; if (this.m_lCounter < PLXMLData.m_nMaxCounter) { return; } this.Send(); }