protected void Button2_Click(object sender, EventArgs e) { var lg = new DlLogins(); var rand = new Random(); var chash = new ClPwdhash(); if (TextBox3.Text != string.Empty && TextBox2.Text != string.Empty) { if (lg.Getjobuser(TextBox2.Text, TextBox3.Text) == TextBox2.Text) { Session["pusername"] = TextBox2.Text; Session["pwelcomename"] = lg.Userwelcomename(TextBox2.Text, 2); string addhash2 = chash.GetMd5Hash(rand.Next(1000, 10000).ToString(CultureInfo.InvariantCulture)); Session["cuserval"] = addhash2; setjobcookie(addhash2); Response.Redirect(cpath + "/Jobseekers/JobSeekerHome.aspx?CRF=2"); } } }
protected void Button2_Click(object sender, EventArgs e) { var lg = new DlLogins(); var rand = new Random(); var chash = new ClPwdhash(); if (TextBox3.Text != string.Empty && TextBox2.Text != string.Empty) { if (lg.Getuser(TextBox2.Text, TextBox3.Text) == TextBox2.Text) { Session["pusername"] = TextBox2.Text; //the below method is overloaded Session["pwelcomename"] = lg.Userwelcomename(TextBox2.Text, 1, 0); string addhash2 = chash.GetMd5Hash(rand.Next(1000, 10000).ToString(CultureInfo.InvariantCulture)); Session["cuserval"] = addhash2; setjobcookie(addhash2); Response.Redirect(cpath + "/Recruiters/Rechome.aspx?Fg=1"); } } }