Пример #1
0
 public static string GetNNFromID(int nID)
 {
     if (!PLSafeCustType.bRead)
     {
         PLSafeCustType.ReadTable();
     }
     return(PLSafeCustType.m_MapIDtoNN.ContainsKey(nID) ? PLSafeCustType.m_MapIDtoNN[nID].ToString() : "");
 }
Пример #2
0
 public static int GetIDFromNN(string Key)
 {
     if (!PLSafeCustType.bRead)
     {
         PLSafeCustType.ReadTable();
     }
     Key = Key.ToUpper();
     return(PLSafeCustType.m_MapNNtoID.ContainsKey(Key) ? Convert.ToInt32(PLSafeCustType.m_MapNNtoID[Key]) : 0);
 }
Пример #3
0
        public string MakeNN(List <string> ListNNs, bool bSetNickName)
        {
            if (!PLSafeCustType.bRead)
            {
                PLSafeCustType.ReadTable();
            }
            string str = this.MakeListNN(this.Description, ListNNs, (short)6);

            if (bSetNickName)
            {
                this.NickName = str;
            }
            return(str);
        }
Пример #4
0
        public override string MakeNN(bool bSetNickName)
        {
            if (!PLSafeCustType.bRead)
            {
                PLSafeCustType.ReadTable();
            }
            string str = this.MakeListNN(this.Description, StaticData.m_NNs, (short)6);

            if (bSetNickName)
            {
                this.NickName = str;
            }
            return(str);
        }
Пример #5
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);
     }
 }
Пример #6
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 szDefault           = "";

            this.GetLink().TablePOST_Send(this.m_hndPOST, ref nProcessed, ref nExceptions);
            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);
            }
            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);
                    PLSafeCustType.AddMapIDtoNN(int32, szValue.ToString().ToUpper());
                    PLSafeCustType.AddMapNNtoID(szValue.ToString().ToUpper(), int32);
                    this.GetLink().TablePOST_ResultDataField_String(this.m_hndPOST, this.m_ExternalID_1.sLinkName, szDefault, ref szValue);
                    if (!szValue.ToString().Equals(""))
                    {
                        PLSafeCustType.AddMapExtID1toPLID(szValue.ToString(), int32);
                    }
                    this.GetLink().TablePOST_ResultDataField_String(this.m_hndPOST, this.m_ExternalID_2.sLinkName, szDefault, ref szValue);
                    if (!szValue.ToString().Equals(""))
                    {
                        PLSafeCustType.AddMapExtID2toPLID(szValue.ToString(), int32);
                    }
                }
            }
            this.GetLink().TablePOST_Reset(this.m_hndPOST);
            this.m_lCounter = 0;
        }
Пример #7
0
        private static void ReadTable()
        {
            if (PLSafeCustType.bRead)
            {
                return;
            }
            uint   num          = 0;
            object szValue      = new object();
            uint   createHandle = PLLink.GetLink().TableGET_CreateHandle("SafeCustType", 0, 0, 0U);

            PLLink.GetLink().TableGET_AddFilter(createHandle, "SCTypeStatus", "EQ", "0", 1);
            while (PLLink.GetLink().TableGET_GetNextRecord(createHandle) == 0)
            {
                PLLink.GetLink().TableGET_RecordField_ValueString(createHandle, "SCTypeNickName", "", ref szValue);
                string Key = szValue.ToString().ToUpper().Trim();
                int    recordFieldValueI32 = PLLink.GetLink().TableGET_RecordField_ValueI32(createHandle, "SCTypeID");
                PLSafeCustType.AddMapNNtoID(Key, recordFieldValueI32);
                PLSafeCustType.AddMapIDtoNN(recordFieldValueI32, Key);
            }
            PLLink.GetLink().TableGET_CloseHandle(createHandle);
            num = 0U;
            PLSafeCustType.bRead = true;
        }
Пример #8
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.NickName = this.MakeNN(true);
            }
            else if ((this.m_ID.m_bIsSet && this.m_ID.nValue.Equals(0) || !this.m_ID.m_bIsSet) && PLSafeCustType.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);
            }
            this.m_Status.AddField(this.m_hndPOST);
            this.m_ID.AddField(this.m_hndPOST);
            this.m_NickName.AddField(this.m_hndPOST);
            this.m_Description.AddField(this.m_hndPOST);
            this.m_StageGroup.AddField(this.m_hndPOST);
            this.m_ReminderDays.AddField(this.m_hndPOST);
            this.m_ExternalID_1.AddField(this.m_hndPOST);
            this.m_ExternalID_2.AddField(this.m_hndPOST);
            this.GetLink().TablePOST_AddRecord(this.m_hndPOST);
            PLSafeCustType plSafeCustType = this;

            plSafeCustType.m_lCounter = plSafeCustType.m_lCounter + 1;
            if (this.m_lCounter < PLXMLData.m_nMaxCounter)
            {
                return;
            }
            this.Send();
        }