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 void AddLawyer(string sNN) //// { // this.m_LawyerID.nValue = // } // public void AddLawyer(int nID) // { // this.m_LawyerID.SetValue(nID); // } public override void AddRecord() { PLDiary.eType entryType = this.EntryType; if ((int)this.m_hndPOST == 0) { this.m_hndPOST = this.GetLink().TablePOST_CreateHandle(this.m_sTableName, 0); } if (this.EntryType == PLDiary.eType.Appointment) { if (this.AllDayEvent) { this.StartTime = 700; this.DurationSeconds = 43200; } else if ((this.StartTime > 700 ? 0 : (this.DurationSeconds > 43200 ? 1 : 0)) != 0) { this.StartTime = 700; this.DurationSeconds = 43200; } this.AllDayEvent = false; if (this.DurationSeconds < 360) { this.DurationSeconds = 360; } } if (this.EntryType == PLDiary.eType.TODO && this.DurationSeconds < 360) { this.DurationSeconds = 360; } if (this.IsRecurringEntry) { this.RecurringType = this.EntryType; this.RecurringDescription = this.Description; this.RecurringStartTime = this.StartTime; this.RecurringDuration = this.Duration; if (this.RecurringRepeatUnit != PLDiary.eRepeatUnit.Year || (this.RecurringMonthOfYear == 0 || this.RecurringWeekOfMonth == 0 ? 0 : (this.RecurringDayOfWeek == (PLDiary.eDay) 0 ? 1 : 0)) == 0) { ; } if (this.RecurringRepeatUnit != PLDiary.eRepeatUnit.Month || (this.RecurringWeekOfMonth == 0 ? 0 : (this.RecurringDayOfWeek == (PLDiary.eDay) 0 ? 1 : 0)) == 0) { ; } } if (this.EntryType == PLDiary.eType.Call) { this.ReminderDate = this.DueDate; this.EnteredDate = this.DueDate; } if (this.ReminderDate == 0) { this.ReminderDate = this.DueDate; } if (this.EntryType == PLDiary.eType.Holiday) { //this.ArrLawyers.Clear(); this.ArrMSGRead.Clear(); this.ArrContacts.Clear(); this.m_StartTime.Clear(); this.m_DurationSeconds.Clear(); this.m_ReminderDate.Clear(); } this.Completed = this.m_CompletionDate.m_bIsSet; if ((m_LawyerID != null && m_MsgUserID != null) && (m_LawyerID.nValue > 0 && m_MsgUserID.nValue > 0)) { this.m_LawyerID.AddField(this.m_hndPOST); //this.m_MsgUserID.SetValue(m_MsgUserID.nValue); this.m_MsgUserID.AddField(this.m_hndPOST); this.ArrMSGRead.Clear(); } else { this.m_LawyerID.SetValue(PLLawyer.GetIDFromNN("~IT")); this.m_LawyerID.AddField(this.m_hndPOST); this.m_MsgUserID.SetValue(PLLawyer.GetIDFromNN("~IT")); this.m_MsgUserID.AddField(this.m_hndPOST); } base.AddRecord(); this.m_EntryType.AddField(this.m_hndPOST); if (this.ArrContacts.Count > 0) { for (int nRepeat = 1; nRepeat <= this.ArrContacts.Count; ++nRepeat) { this.m_ContactID.SetValue(Convert.ToInt32(this.ArrContacts[nRepeat - 1])); this.m_ContactID.AddRepeatField(this.m_hndPOST, nRepeat); } this.ArrContacts.Clear(); } this.GetLink().TablePOST_AddRecord(this.m_hndPOST); PLDiary plDiary = this; plDiary.m_lCounter = plDiary.m_lCounter + 1; if (this.m_lCounter < PLXMLData.m_nMaxCounter) { return; } this.Send(); }