private void PopulateControlsForBill(Bill entry) { this.SuspendLayout(); DescriptionTextBox.Text = entry.Label; PaymentDateTextBox.Text = entry.PaymentDate; BillsProcessor processor = new BillsProcessor(); NextPaymentDateTextBox.Text = processor.GetNextPaymentDate(entry.PaymentDate, entry.Frequency); ValueTextBox.Text = entry.Value.ToString(); FrequencyTextBox.Text = entry.Frequency.ToString(); SetPaidLabel(); this.ResumeLayout(); }
private void PaymentDateButton_Click(object sender, EventArgs e) { string editedValue = CollectEditedValue(EditorType.Date); if (!string.IsNullOrWhiteSpace(editedValue)) { currentlyShownBill.PaymentDate = editedValue; UpdateCurrentlyShownBillFields(); PaymentDateTextBox.Text = currentlyShownBill.PaymentDate; BillsProcessor processor = new BillsProcessor(); NextPaymentDateTextBox.Text = processor.GetNextPaymentDate(currentlyShownBill.PaymentDate, currentlyShownBill.Frequency); } }