protected void btnLogin_Click(object sender, EventArgs e)
        {
            if (!string.IsNullOrEmpty(txtUserName.Text) && !string.IsNullOrEmpty(txtPassword.Text))
            {
                CarPoolingBLL carPoolingBll = new CarPoolingBLL();
                string empId = carPoolingBll.getLoginDetails(txtUserName.Text, txtPassword.Text);
                if (!string.IsNullOrEmpty(empId))
                {
                    Session["EmpId"] = empId;
                    Response.Redirect("Menupage.aspx");
                }
                else
                {
                    ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "Notify", "alert('Notification : Invalid Username Or Password.');", true);

                }
            }
        }
Exemplo n.º 2
0
 public void TestMethod1()
 {
     CarPoolingBLL bll = new CarPoolingBLL();
     string result = bll.getLoginDetails("Arun", "Arun");
     Assert.AreEqual(result, "1234");
 }