Ejemplo n.º 1
0
        private void BillInformation()
        {
            int billNo = Convert.ToInt32(searchTextBox.Text);


            Payments payments = new Payments();

            payments             = billManager.GetBillByBillNo(billNo);
            dateLabel.Text       = payments.TestDate.ToString();
            totalFeeLabel.Text   = payments.TotalFee.ToString();
            paidAmountLabel.Text = payments.PaidAmount.ToString();
            dueLabel.Text        = payments.DueAmount.ToString();
        }
        protected void amountSearchButton_Click(object sender, EventArgs e)
        {
            string billNo   = billNoTextBox.Value.Trim();
            string mobileNo = mobileNoTextBox.Value.Trim();

            if (billNo != "" || mobileNo != "")
            {
                BillManager billManager = new BillManager();
                Bill        bill;
                if (billNo != String.Empty)
                {
                    bill = billManager.GetBillByBillNo(billNo);
                }
                else
                {
                    bill = billManager.GetBillByMobileNo(mobileNo);
                }

                if (bill == null)
                {
                    testTypeDangerAlartLabel.Text = "Not Found!!";
                    testTypeDangerDiv.Visible     = true;
                }
                else
                {
                    amountTextBox.Value  = bill.Amount.ToString();
                    dueDateTextBox.Value = bill.Date.Date.ToString("dd/MM/yyyy");

                    ViewState["BillNo"] = bill.BillNo;
                }
            }
            else
            {
                testTypeDangerAlartLabel.Text = "Please enter either Bill No or Mobile No!!";
                testTypeDangerDiv.Visible     = true;
            }
        }