private void RestoreBackups() { _strFirstName = _strFirstName_orig; _strMiddleName = _strMiddleName_orig; _strLastName = _strLastName_orig; _strAKA = _strAKA_orig; _strSSN = _strSSN_orig; _birthDate = _birthDate_orig; _strDriversLicense = _strDriversLicense_orig; _strStreet1 = _strStreet1_orig; _strStreet2 = _strStreet2_orig; _strCity = _strCity_orig; StateID = _intStateId_orig; _strZip = _strZip_orig; _strPhoneHome = _strPhoneHome_orig; _strPhoneMobile = _strPhoneMobile_orig; _HasProbationOfficer = _HasProbationOfficer_orig; _strProbationOfficer = _strProbationOfficer_orig; _BarredUntilDate = _BarredUntilDate_orig; _strNotes = _strNotes_orig; _IsActive = _IsActive_orig; _Employers = (_Employers_orig == null) ? null : _Employers_orig.Clone(); _Plans = (_Plans_orig == null) ? null : _Plans_orig.Clone(); }
private void SaveBackups() { _strFirstName_orig = _strFirstName; _strMiddleName_orig = _strMiddleName; _strLastName_orig = _strLastName; _strAKA_orig = _strAKA; _strSSN_orig = _strSSN; _birthDate_orig = _birthDate; _strDriversLicense_orig = _strDriversLicense; _strStreet1_orig = _strStreet1; _strStreet2_orig = _strStreet2; _strCity_orig = _strCity; _intStateId_orig = _intStateId; _strZip_orig = _strZip; _strPhoneHome_orig = _strPhoneHome; _strPhoneMobile_orig = _strPhoneMobile; _HasProbationOfficer_orig = _HasProbationOfficer; _strProbationOfficer_orig = _strProbationOfficer; _BarredUntilDate_orig = _BarredUntilDate; _strNotes_orig = _strNotes; _IsActive_orig = _IsActive; _Employers_orig = (_Employers == null) ? null : _Employers.Clone(); _Plans_orig = (_Plans == null) ? null : _Plans.Clone(); }
private void InitializeProperties() { _strFirstName_orig = _strFirstName = string.Empty; _strMiddleName_orig = _strMiddleName = string.Empty; _strLastName_orig = _strLastName = string.Empty; _strAKA_orig = _strAKA = string.Empty; _strSSN_orig = _strSSN = string.Empty; _birthDate_orig = _birthDate = null; _strDriversLicense_orig = _strDriversLicense = string.Empty; _strStreet1_orig = _strStreet1 = string.Empty; _strStreet2_orig = _strStreet2 = string.Empty; _strCity_orig = _strCity = "Council Bluffs"; _intStateId_orig = _intStateId = 12; _strStateName = "IA"; _strZip_orig = _strZip = string.Empty; _strPhoneHome_orig = _strPhoneHome = string.Empty; _strPhoneMobile_orig = _strPhoneMobile = string.Empty; _HasProbationOfficer_orig = _HasProbationOfficer = false; _strProbationOfficer_orig = _strProbationOfficer = string.Empty; _BarredUntilDate_orig = _BarredUntilDate = null; _strNotes_orig = _strNotes = string.Empty; _IsActive_orig = _IsActive = true; _Employers_orig = null; _Employers = null; _Plans_orig = null; _Plans = null; }
private void btnOK_Click(object sender, EventArgs e) { FeePayment payment; if (CheckData()) { double dblSplitAmount = 0; foreach (DataRow dr in _dtFeePayments.Rows) { if (Double.TryParse(dr["apply"].ToString(), out dblSplitAmount) && dblSplitAmount > 0) { // adding payment to correct plan Plans plns = ((Defendant)((BindingSource)((BindingSource)bindingPayments.DataSource).DataSource).Current).Plans; var lnq = from s in plns where s.ID == (int)dr["planid"] select s; payment = (FeePayment)lnq.First().Payments.AddNew(); payment.PlanId = (int)dr["planid"]; payment.FeeTypeId = (int)dr["feetypeid"]; payment.ReceivedDate = this.dtpReceivedDate.Value; payment.Amount = dblSplitAmount; } } bindingPayments.ResetBindings(false); this.Close(); } }
public Plans Clone() { Plans plans = new Plans(); plans.IsLoading = true; foreach (Plan plan in this) { plans.Add(plan.Clone()); } plans.IsLoading = false; return(plans); }
public DefendantFeePayments(Plans plans, int defendantId, int planId) : base(defendantId) { _Plans = plans; _intInitialPlanId = planId; }