Example #1
0
        protected void lbtnSignIn_Click(object sender, EventArgs e)
        {
            string email       = txtEmail.Text;
            string enteredpass = txtPass.Text;

            DataSet accountinfo = procedure.getaccountidfromemail(email);
            int     account     = int.Parse(accountinfo.Tables[0].Rows[0]["Account_ID"].ToString());

            DataSet passinfo = procedure.getpassword(account);
            string  password = passinfo.Tables[0].Rows[0]["Password"].ToString();

            DataSet type    = procedure.getaccounttype(account);
            string  accType = type.Tables[0].Rows[0]["AccountType"].ToString();

            DataSet verification    = procedure.getverification(account);
            int     verifactionCode = int.Parse(verification.Tables[0].Rows[0]["Verification"].ToString());

            if (accType == "artist" && verifactionCode == 1 && password == enteredpass)
            {
                Response.Redirect("ArtistLandingPage.aspx?ID=" + account);
            }
            else if (accType == "customer" && verifactionCode == 1 && password == enteredpass)
            {
                Response.Redirect("CustomerLandingPage.aspx?ID=" + account);
            }
            else
            {
                Response.Write("<script>alert('Your account has not been verified. Please check your email for verification details.')</script>");
            }
        }