Exemplo n.º 1
0
        public override void AddRecord()
        {
            if ((int)this.m_hndPOST == 0)
            {
                this.m_hndPOST = this.GetLink().TablePOST_CreateHandle(this.m_sTableName, 0);
            }
            foreach (CPostItem postItem in this.PostItems)
            {
                postItem.AddField(this.m_hndPOST);
            }
            for (int nRepeat = 1; nRepeat <= this.ArrMatterID.Count; ++nRepeat)
            {
                this.m_MatterID.SetValue(Convert.ToInt32(this.ArrMatterID[nRepeat - 1]));
                this.m_MatterID.AddRepeatField(this.m_hndPOST, nRepeat);
            }
            for (int nRepeat = 1; nRepeat <= this.ArrContactID.Count; ++nRepeat)
            {
                this.m_ContactID.SetValue(Convert.ToInt32(this.ArrContactID[nRepeat - 1]));
                this.m_ContactID.AddRepeatField(this.m_hndPOST, nRepeat);
                if (Convert.ToInt32(this.ArrContactRoleID[nRepeat - 1]) != 0)
                {
                    this.m_ContactRoleID.SetValue(Convert.ToInt32(this.ArrContactID[nRepeat - 1]));
                    this.m_ContactRoleID.AddRepeatField(this.m_hndPOST, nRepeat);
                }
            }
            this.GetLink().TablePOST_AddRecord(this.m_hndPOST);
            PLSafeCustEntry plSafeCustEntry = this;

            plSafeCustEntry.m_lCounter = plSafeCustEntry.m_lCounter + 1;
            if (this.m_lCounter >= PLXMLData.m_nMaxCounter)
            {
                this.Send();
            }
            this.Clear();
        }
Exemplo n.º 2
0
 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);
     }
 }
Exemplo n.º 3
0
        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 empty1 = string.Empty;
            string empty2 = string.Empty;

            this.m_lSendErrorCount = 0L;
            string str1;
            string str2;
            string str3;
            string message;
            string str4;
            string str5;
            string str6;

            try
            {
                this.GetLink().TablePOST_Send(this.m_hndPOST, ref nProcessed, ref nExceptions);
            }
            catch (NullReferenceException ex)
            {
                str1    = ex.Data == null ? string.Empty : ex.Data.ToString();
                str2    = ex.HelpLink == null ? string.Empty : ex.HelpLink.ToString();
                str3    = ex.InnerException == null ? string.Empty : ex.InnerException.ToString();
                message = ex.Message;
                str4    = ex.Source == null ? string.Empty : ex.Source.ToString();
                str5    = ex.StackTrace == null ? string.Empty : ex.StackTrace.ToString();
                str6    = ex.TargetSite == (MethodBase)null ? string.Empty : ex.TargetSite.ToString();
                this.GetLink().TablePOST_Reset(this.m_hndPOST);
                return;
            }
            catch (AccessViolationException ex)
            {
                str1    = ex.Data == null ? string.Empty : ex.Data.ToString();
                str2    = ex.HelpLink == null ? string.Empty : ex.HelpLink.ToString();
                str3    = ex.InnerException == null ? "" : ex.InnerException.ToString();
                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().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();
                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().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();
                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().TablePOST_Reset(this.m_hndPOST);
                this.m_lCounter = 0;
                return;
            }
            try
            {
                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_ExternalID_1.sLinkName, empty2, ref szValue);
                        PLSafeCustEntry.AddMapExtID1toPLID(szValue.ToString(), int32);
                        this.GetLink().TablePOST_ResultDataField_String(this.m_hndPOST, this.m_ExternalID_2.sLinkName, empty2, ref szValue);
                        PLSafeCustEntry.AddMapExtID2toPLID(szValue.ToString(), int32);
                    }
                }
                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);
                    PLSafeCustEntry plSafeCustEntry = this;
                    plSafeCustEntry.m_lSendErrorCount = plSafeCustEntry.m_lSendErrorCount + 1L;
                }
                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();
                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().TablePOST_Reset(this.m_hndPOST);
                this.m_lCounter = 0;
            }
        }