Пример #1
0
        public void WithdrawTestingFunction()
        {
            Withdraw_Business With_bus = new Withdraw_Business();
            double            result   = With_bus.WithdrawTaka(501.0, "*****@*****.**");

            Assert.AreEqual(500.0, result);
        }
Пример #2
0
        public void Confirm_Click(object sender, EventArgs e)
        {
            string name   = Session["username"].ToString();
            double amount = Convert.ToDouble(Amount.Text);

            if (amount > 0.0)
            {
                with_res         = With_Bus.WithdrawTaka(amount, name);
                Label2.Text      = "TK Withdraw Successful";
                Label2.ForeColor = System.Drawing.Color.Blue;
            }
            if (with_res == 0)
            {
                Label2.Text      = "Sorry! You have to have atleast 1000 TK in your account";
                Label2.ForeColor = System.Drawing.Color.Red;
            }
            if (amount < 0.0)
            {
                Label2.Text = "Amount cannot be negative";
            }
        }