protected void Button1_Click(object sender, EventArgs e) { clsregister obj = new clsregister(); clsregistrationprp objprp = new clsregistrationprp(); objprp.email = username.Text; objprp.password = password.Text; Int32 a = obj.logincheck(objprp); if (a == -1) { not_verified.Visible = true; not_verified.Text = "Invalid Email Id or Password"; } else if (a == -2) { not_verified.Visible = true; not_verified.Text = "Your account is Blocked"; } else if (a == -3) { not_verified.Visible = true; not_verified.Text = "Your account is not Verified"; } else { Session["cod"] = a; Response.Redirect("profile/indexprofile.aspx"); } }
protected void button1_OnClick(object sender, EventArgs e) { String u = u_name.Value; String p = p_word.Value; clsregister obj = new clsregister(); clsregistrationprp objprp = new clsregistrationprp(); objprp.email = u; objprp.password = p; Int32 a = obj.logincheck(objprp); if (a == -1) { Label1.Text = "Email ID/Password combination incorrect."; } else { Session["codad"] = a; Response.Redirect("Requests.aspx"); } }
protected void submit_Click(object sender, EventArgs e) { clsregister obj = new clsregister(); clsregistrationprp objprp = new clsregistrationprp(); objprp.email = username.Text; objprp.password = password.Text; Label1.Visible = true; try { Int32 b = obj.logincheck(objprp); Int32 a = obj.logincheck1(objprp); if (b == -4) { Session["cod"] = a; Response.Redirect("next/principal/homepr.aspx"); } else if (b == -3) { Session["cod"] = a; Response.Redirect("next/hod/homeh.aspx"); } else if (b == -2) { Session["cod"] = a; Response.Redirect("next/cc/homecc.aspx"); } else { Label1.Text = "error"; } } catch (Exception exp) { Label1.Text = "INVALID USERNAME PASSWORD"; } }