protected void dueAmountPayButton_Click(object sender, EventArgs e) { BillManager billManager = new BillManager(); string amount = amountTextBox.Value.ToString().Trim(); if (amount != "") { string billNo = ViewState["BillNo"].ToString(); bool isPaid = billManager.IsBillPaid(billNo); if (isPaid == true) { testTypeSuccessfullAlartLabel.Text = "Bill already Paid."; testTypeSuccessfullDiv.Visible = true; } else { int rowAffected = billManager.UpdateBillStatus(billNo); if (rowAffected > 0) { testTypeSuccessfullAlartLabel.Text = "Bill Successfully paid."; testTypeSuccessfullDiv.Visible = true; } } } }