/// <summary> /// Date_TextChanged(sender: System.Object; e: System.EventArgs); /// </summary> /// <returns>void</returns> private void OnDateChanged(TPetraDateChangedEventArgs e) { if (DateChanged != null) { DateChanged(this, e); } }
/// <summary> /// Event Handler for the TtxtPetraDate Control. Simply calls <see cref="MultiEventHandler" /> /// so we get an Event that the Control's value has changed. /// </summary> /// <param name="Sender">Sending Object.</param> /// <param name="e">Event Arguments (not used).</param> protected void TFrmPetraEditUtils_DateChanged(object Sender, TPetraDateChangedEventArgs e) { MultiEventHandler(Sender, null); }
private void UpdateCreditTerms(object sender, TPetraDateChangedEventArgs e) { if (sender == dtpDateDue) { if ((dtpDateDue.Date.HasValue) && (dtpDateIssued.Date.HasValue)) { int diffDays = (dtpDateDue.Date.Value - dtpDateIssued.Date.Value).Days; if (diffDays < 0) { diffDays = 0; dtpDateDue.Date = dtpDateIssued.Date.Value; } nudCreditTerms.Value = diffDays; } } else if ((sender == dtpDateIssued) || (sender == nudCreditTerms)) { if ((dtpDateIssued.Date.HasValue)) { dtpDateDue.Date = dtpDateIssued.Date.Value.AddDays((double)nudCreditTerms.Value); } } }
private void DateChanged(object sender, TPetraDateChangedEventArgs e) { TLogging.Log("DateChanged"); DateChangedCalled++; }