protected void btnLoginn_Click(object sender, ImageClickEventArgs e)
 {
     try
     {
         _objUserAuth = new clsUserAuthentication();
         //_objUserAuth.strEmailID = txtUserName.Text.Trim().ToString().ToLower();
        // _objUserAuth.strPassword = txtPasswordd.Text.Trim().ToString().ToLower();
         if (_objUserAuth.fnCheckAPRUser() == true)
         {
             Response.Redirect("Masters/HomePage.aspx", false);
         }
         else
         {
             txtEmailID.Focus();
             lblMessage.Text = "Please recheck your UserName and Password";
             Mpe1.Show();
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
    protected void Login(string emailid, string password)
    {
        try
        {
            _objUserAuth = new clsUserAuthentication();
            _objUserAuth.strEmailID = emailid.Trim().ToString();
            _objUserAuth.strPassword = password.Trim().ToString();

            if (_objUserAuth.fnCheckAPRUser() == true)
            {
                Response.Redirect("~/Masters/HomePage.aspx", false);
            }

        }
        catch (Exception ex)
        {
            throw ex;
        }
    }
    protected void btnLogin_Click(object sender, EventArgs e)
    {
        try
        {
            _objUserAuth = new clsUserAuthentication();

            //string strEncryptPwd = string.Empty;
            //string strPassword = "******";
            //strPassword += txtPassword.Text.Trim().ToString().ToLower();
            //strPassword += "¶¾±";
            //strPassword += txtEmailID.Text.Trim().ToString().ToLower();
            //strPassword += "¶¾±";
            //strEncryptPwd = FormsAuthentication.HashPasswordForStoringInConfigFile(strPassword, "md5");

            _objUserAuth.strEmailID = txtEmailID.Text.Trim().ToString().ToLower();

            _objUserAuth.strPassword = txtPassword.Text.Trim().ToString().ToLower();

            if (_objUserAuth.fnCheckAPRUser() == true)
            {
                Response.Redirect("Masters/HomePage.aspx", false);
            }
            else
            {
                txtEmailID.Focus();
                lbl1.Text = "Please recheck your UserName and Password";
                lbl1.ForeColor = Color.Red;
                MpeSignIn.Show();
            }
        }
        catch (Exception ex)
        {
            //LogError("BusSearchPage", "btnLogin_Click", DateTime.Now, ex.Message.ToString());
            //Response.Redirect("Error.aspx", false);
        }
    }
    protected void btnSubmit_Click(object sender, EventArgs e)
    {
        try
        {
            _objUserAuth = new clsUserAuthentication();
            _objUserAuth.strEmailID = txtEmailID.Text.Trim().ToString().ToLower();
            _objUserAuth.strPassword = txtPassword.Text.Trim().ToString();

            if (_objUserAuth.fnCheckAgent() == true)
            {
                if (Session["RechargeUserType"].ToString() == "AG")
                {
                    if (Session["Status"].ToString() == "1")
                    {
                        Response.Redirect("~/Masters/HomePage.aspx", false);
                        // clearFields();
                    }
                    else
                    {
                        lblMessage.Visible = true;
                        lblMessage.ForeColor = Color.Red;
                        lblMessage.Text = "Your Request has not been approved";
                    }
                }

                else if (Session["RechargeUserType"].ToString() == "AD")
                {
                    Session["Password"] = txtPassword.Text;
                    Response.Redirect("~/Masters/HomePage.aspx", false);

                }
                else if (Session["RechargeUserType"].ToString() == "DB")
                {
                    if (Session["Status"].ToString() == "1")
                    {
                        Session["Password"] = txtPassword.Text;
                        Response.Redirect("~/Masters/HomePage.aspx", false);
                        // clearFields();

                    }
                    else
                    {
                        lblMessage.Visible = true;
                        lblMessage.ForeColor = Color.Red;
                        lblMessage.Text = "Your Request has not been approved";
                    }

                }

            }
            else
            {
                lblMessage.ForeColor = Color.Red;
                lblMessage.Text = " Enter Correct EmailId and Password";
            }
        }
        catch (Exception ex)
        {
            LogError("AgentLogin", "btnRegister_Click", DateTime.Now, ex.Message.ToString());
            Response.Redirect("Error.aspx", false);
        }
    }
    protected void Login(string emailid, string password)
    {
        try
        {
            _objUserAuth = new clsUserAuthentication();
            _objUserAuth.strEmailID = emailid.Trim().ToString();
            _objUserAuth.strPassword = password.Trim().ToString();

            if (_objUserAuth.fnCheckAPRUser() == true)
            {
                Response.Redirect("~/Masters/HomePage.aspx", false);
            }

        }
        catch (Exception ex)
        {
            LogError("Default.aspx", "Login", DateTime.Now, ex.Message.ToString());
            Response.Redirect("Error.aspx", false);
        }
    }
    protected void btnLogin11_Click1(object sender, EventArgs e)
    {
        try
        {
            _objUserAuth = new clsUserAuthentication();
            _objUserAuth.strEmailID = txtEmailID11.Text.Trim().ToString().ToLower();
            _objUserAuth.strPassword = txtpassword11.Text.Trim().ToString().ToLower();

            if (_objUserAuth.fnCheckAPRUser() == true)
            {
                if (ViewState["type"].ToString() == "Mobile")
                {
                    mobileguests();

                    Response.Redirect("User/PaymentMethod.aspx", false);
                    //imgbtnGuest.Click+-new ImageClickEventHandler(imgbtnGuest_Click);
                    //Buttonname.click + -new ImageClickEventHandler(Buttonname_click);
                }
                else if (ViewState["type"].ToString() == "DTH")
                {
                    DThGuests();
                    //ImgbtnDTHguests_Click(sender, e);
                    Response.Redirect("User/PaymentMethod1.aspx", false);
                }
                else if (ViewState["type"].ToString() == "DataCard")
                {
                    DataCardguests();
                    // ImgbtnNetguests_Click(sender, e);
                    Response.Redirect("User/PaymentMethod2.aspx", false);
                }
            }
            else
            {
               // txtEmailID.Focus();
                lblErrormesg.Text = "Please recheck your UserName and Password";
                MpeSignIn1.Show();
            }
        }
        catch (Exception ex)
        {
            LogError("Default.aspx", "btnLogin11_Click1", DateTime.Now, ex.Message.ToString());
            Response.Redirect("Error.aspx", false);
        }
    }