Beispiel #1
0
    protected void btnLogin_Click(object sender, EventArgs e)
    {
        tbl_MatrimonialMemberProp Objtbl_MatrimonialMemberProp = new tbl_MatrimonialMemberProp();

        Objtbl_MatrimonialMemberProp.EmailID = txtEmailID.Text;

        tbl_MatrimonialMemberBAL Objtbl_MatrimonialMemberBAL = new tbl_MatrimonialMemberBAL();
        DataSet dsData = Objtbl_MatrimonialMemberBAL.CheckLogin(Objtbl_MatrimonialMemberProp);

        if (dsData.Tables[0].Rows.Count > 0)
        {
            Encrypting ObjEncrypting = new Encrypting();
            string     DataPassword  = ObjEncrypting.Encrypt(Convert.ToString(dsData.Tables[0].Rows[0]["Password"]));
            if (txtPassword.Text == DataPassword)
            {
                Session["LoginName"] = Convert.ToString(dsData.Tables[0].Rows[0]["MemberName"]);
                Session["LoginID"]   = Convert.ToString(dsData.Tables[0].Rows[0]["MemberCode"]);

                //memberlist.Visible = true;
                matrimonialmemberlist.Visible = true;

                Welcome.Visible   = true;
                LoginForm.Visible = false;
                lblUserName.Text  = Convert.ToString(dsData.Tables[0].Rows[0]["MemberName"]);
            }
            else
            {
                Response.Redirect("MatrimonialSignUp.aspx?msg=invalidpwd");
            }
        }
        else
        {
            Response.Redirect("MatrimonialSignUp.aspx?msg=invalidid");
        }
    }
    protected void btnLogin_Click(object sender, EventArgs e)
    {
        tbl_MatrimonialMemberProp Objtbl_MatrimonialMemberProp = new tbl_MatrimonialMemberProp();

        Objtbl_MatrimonialMemberProp.EmailID = txtLoginEmailID.Text;

        tbl_MatrimonialMemberBAL Objtbl_MatrimonialMemberBAL = new tbl_MatrimonialMemberBAL();
        DataSet dsData = Objtbl_MatrimonialMemberBAL.CheckLogin(Objtbl_MatrimonialMemberProp);

        if (dsData.Tables[0].Rows.Count > 0)
        {
            Encrypting ObjEncrypting = new Encrypting();
            string     DataPassword  = ObjEncrypting.Encrypt(Convert.ToString(dsData.Tables[0].Rows[0]["Password"]));
            if (txtLoginPassword.Text == DataPassword)
            {
                Session["LoginName"] = Convert.ToString(dsData.Tables[0].Rows[0]["MemberName"]);
                Session["LoginID"]   = Convert.ToString(dsData.Tables[0].Rows[0]["MemberCode"]);

                Master.FindControl("memberlist").Visible            = true;
                Master.FindControl("matrimonialmemberlist").Visible = true;

                Master.FindControl("Welcome").Visible   = true;
                Master.FindControl("LoginForm").Visible = false;

                if (Convert.ToString(Request.QueryString["msg"]) == "MatrimonialList")
                {
                    Response.Redirect("MatrimonialMembersList.aspx");
                }
                else if (Convert.ToString(Request.QueryString["msg"]) == "MemberList")
                {
                    Response.Redirect("MembersList.aspx");
                }
                else
                {
                    Response.Redirect("Default.aspx");
                }
                //memberlist.Visible = true;
                //matrimonialmemberlist.Visible = true;

                //Welcome.Visible = true;
                //LoginForm.Visible = false;
            }
            else
            {
                Response.Redirect("MatrimonialSignUp.aspx?msg=invalidpwd");
            }
        }
        else
        {
            Response.Redirect("MatrimonialSignUp.aspx?msg=invalidid");
        }
    }