예제 #1
0
        private void UpdateForm(object sender, EventArgs e)
        {
            if (!IsFormLoad)
            {
                return;
            }
            bool isBefore        = rbBefore.Checked;
            bool isAfterFixed    = rbAfterFixed.Checked;
            bool isAfterInterval = rbAfterInterval.Checked;

            gbAfterFixed.Visible    = isAfterFixed;
            gbAfterInterval.Visible = isAfterInterval;
            try
            {
                billing          = Billing.DL.BillingFactory.GetBillingType(GetBilling());
                ResultLabel.Text = "Оплата счета \n" +
                                   " с " + billing.GetFirstDate(dtp.Value).ToShortDateString() + "\n" +
                                   "по " + billing.GetLastDate(dtp.Value).ToShortDateString();
                btnOK.Enabled = true;
            }
            catch (Exception)
            {
                ResultLabel.Text = "";
                btnOK.Enabled    = false;
            }
        }
예제 #2
0
 public BillingEditor(string billingConstructor = "BF", bool isTesting = false)
 {
     InitializeComponent();
     billing   = Billing.DL.BillingFactory.GetBillingType(billingConstructor);
     IsTesting = isTesting;
     if (isTesting)
     {
         Width = gbTesting.Left + gbTesting.Width + panel1.Left;
     }
     else
     {
         Width = gbTesting.Left;
     }
 }