Esempio n. 1
0
        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();
        }
Esempio n. 2
0
        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);
            }
        }