Ejemplo n.º 1
0
 protected void payButton_OnServerClick(object sender, EventArgs e)
 {
     if (amountTextBox.Value.Trim().Length == 0 || dueDateTextBox.Value.Length == 0)
     {
         paymentLabel.Text = "Payment Information is not valid.";
     }
     else
     {
         Patient patient  = (Patient)ViewState["Patient"];
         double  totalFee = patient.TotalFee;
         if (Convert.ToDouble(amountTextBox.Value) == totalFee)
         {
             paymentLabel.Text = billManager.UpdateBillInformation(patient.PhoneNumber);
         }
         else if (Convert.ToDouble(amountTextBox.Value) == 0)
         {
             paymentLabel.Text = "Bill is Unpaid.";
         }
         else
         {
             paymentLabel.Text = "Partial payment is not possible.";
         }
     }
 }