コード例 #1
0
 private void PaymentDealer_Click(object sender, EventArgs e)
 {
     label11.Text = "Total Amount Paid = " + p1.GetDealer.TotalAMountPaid;
     label12.Text = "Remainig Amount to pay = " + p1.GetDealer.RemainingAmount;
     AmountPaymentMaskedTextBox.Clear();
     AmountPayment.Show();
     AmountPayment.BringToFront();
 }
コード例 #2
0
 private void AddToAccountsButton_Click(object sender, EventArgs e)
 {
     if (double.Parse(AmountPaymentMaskedTextBox.Text) <= p1.GetDealer.RemainingAmount)
     {
         p1.Payamount(double.Parse(AmountPaymentMaskedTextBox.Text));
     }
     else
     {
         MessageBox.Show("You have to pay only " + p1.GetDealer.RemainingAmount);
     }
     label11.Text = "Total Amount Paid = " + p1.GetDealer.TotalAMountPaid;
     label12.Text = "Remainig Amount to pay = " + p1.GetDealer.RemainingAmount;
     AmountPaymentMaskedTextBox.Clear();
 }
コード例 #3
0
 private void Button5_Click(object sender, EventArgs e)
 {
     //amount payment customer...
     if (double.Parse(maskedTextBox1.Text) <= p1.GetCustomer.RemainingAmount)
     {
         p1.CustomerPayamount(double.Parse(maskedTextBox1.Text));
     }
     else
     {
         MessageBox.Show("You have to pay only " + p1.GetCustomer.RemainingAmount);
     }
     label35.Text = "Total Amount Paid = " + p1.GetCustomer.TotalAMountPaid;
     label31.Text = "Remainig Amount to pay = " + p1.GetCustomer.RemainingAmount;
     AmountPaymentMaskedTextBox.Clear();
 }
コード例 #4
0
        private void Button4_Click(object sender, EventArgs e)
        {
            if (double.Parse(maskedTextBox2.Text) >= p1.GetCustomer.RemainingAmount)
            {
                if (double.Parse(maskedTextBox2.Text) <= p1.GetCustomer.TotalAMountPaid)
                {
                    p1.ReturnCustomerPayamount2(double.Parse(maskedTextBox2.Text));
                }
                else
                {
                    MessageBox.Show("Insufficient Balance");
                }
            }
            //  MessageBox.Show("You  only retrun " + p1.GetCustomer.RemainingAmount);

            else
            {
                p1.ReturnCustomerPayamount(double.Parse(maskedTextBox2.Text));
            }
            label37.Text = "Total Amount Paid = " + p1.GetCustomer.TotalAMountPaid;
            label36.Text = "Remainig Amount to pay = " + p1.GetCustomer.RemainingAmount;
            AmountPaymentMaskedTextBox.Clear();
        }