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"); } } }
protected void Button2_Click(object sender, EventArgs e) { //set culture to british //modify here in future if this needs to be set to us formats var cinf = new CultureInfo("en-GB"); DateTime dobsdate = Convert.ToDateTime(TextBox17.Text, cinf); string dobdate1 = dobsdate.ToString("MM/dd/yyyy"); var clog = new DlLogins(); if (Request.QueryString["CRF"] == "1") { if (clog.Checkcanusern(TextBox11.Text) != TextBox11.Text) { //add users var mpg = new DlMainpagepopulator(); var phash = new ClPwdhash(); int mxuserid = mpg.Maxuserid(); int mxcandidateid = mpg.Maxcandidateid(); string hashpwd = phash.GetMd5Hash(TextBox12.Text); //add activation id and send it in email var rands1 = new Random(); string makehashp = phash.GetMd5Hash(rands1.Next(10000, 100000).ToString(CultureInfo.InvariantCulture)); //add users mpg.Insertusers(TextBox11.Text, TextBox2.Text, 1, TextBox3.Text, hashpwd, 2, mxuserid, TextBox13.Text, mxcandidateid, makehashp); //add candidates mpg.Insertcandidates(mxcandidateid, TextBox2.Text + " " + TextBox3.Text, TextBox2.Text, TextBox3.Text, TextBox4.Text, TextBox5.Text, TextBox6.Text, TextBox7.Text, TextBox8.Text, TextBox16.Text, TextBox9.Text, "", TextBox14.Text, TextBox15.Text, DateTime.Now.ToString("yyyy:MM:dd hh:mm:ss"), dobdate1); //send email. var emproc = new DlEmailprocessor(); //make email body string emailbod = emproc.Emailactivateusr( "https://ahrcloud.com/ActivateAccount.aspx?activationid=" + makehashp + "&usertype=2&username="******"AHRCLOUD: Account Activation!", emailbod, 3); //logg it as the entry for email emproc.Sendappemaildbupdate(TextBox11.Text, 2); Session["reasons"] = "Thank your for signing up, you are awsome! <br /> Please check your email to activate your account. <br /> "; //redirect to confirmation page Response.Redirect("~/confirm.aspx"); } else { Label26.Visible = true; } } else { //update candidates for required id //update users table var ccan = new DlCandidates(); //update candidates table ccan.Runcandidateupdate(TextBox2.Text, TextBox3.Text, TextBox4.Text, TextBox5.Text, TextBox6.Text, TextBox7.Text, TextBox8.Text, TextBox16.Text, dobdate1, TextBox9.Text, TextBox14.Text, TextBox15.Text, Session["pusername"].ToString()); } }
protected void Button2_Click(object sender, EventArgs e) { if (capts.Text == Session["capts"].ToString()) { //check if the current user exists in the database var lgeins = new DlLogins(); _fg = Convert.ToInt16(Request.QueryString["Fg"]); if (_fg == 1) { //update //update user rec information var yohrecl = new DlRecruiter(); yohrecl.Runrecuserupdate(TextBox2.Text, TextBox3.Text, Session["pusername"].ToString()); //update logo if (FileUpload1.PostedFile.FileName.Length > 1) { //get current article id for the logo. int tmpartid = yohrecl.Getarticleids(Session["pusername"].ToString()); //save to hlogo string hlogo = ConfigurationManager.AppSettings["filepth"] + tmpartid + FileUpload1.PostedFile.FileName; //update articles FileUpload1.PostedFile.SaveAs(hlogo); //update articles in db yohrecl.Runreclogoupdate(hlogo, "Recruiter Logo", Session["pusername"].ToString()); } //update recruiters own information yohrecl.Runrectableupdate(TextBox4.Text, TextBox5.Text, TextBox6.Text, TextBox7.Text, TextBox8.Text, TextBox9.Text, TextBox10.Text, TextBox15.Text, TextBox16.Text, TextBox14.Text, Session["pusername"].ToString()); } else { if (lgeins.Checkrecusern(TextBox11.Text) != TextBox11.Text) { //insert var mps = new DlMainpagepopulator(); var pwds = new ClPwdhash(); var arc = new DlArticles(); int getmaxrec = mps.RecHasRows() + 1; int getmaxrecarticles = getmaxrec + 10000000; int getmaxrecuserid = getmaxrec + 20000000; var rnd23 = new Random(); string shahsp = pwds.GetMd5Hash(rnd23.Next(10000, 100000).ToString(CultureInfo.InvariantCulture)); //set email body var emaps = new DlEmailprocessor(); string ebod1 = emaps.Emailactivateusr( "https://ahrcloud.com/ActivateAccount.aspx?activationid=" + shahsp + "&usertype=1&username="******"GB", TextBox9.Text, TextBox11.Text, TextBox15.Text, TextBox16.Text, TextBox14.Text, DateTime.Now.ToString("yyyy:MM:dd hh:mm:ss"), 1, getmaxrecarticles); //users and pwds string md5h = pwds.GetMd5Hash(TextBox12.Text); mps.Insertusers(TextBox11.Text, TextBox2.Text, 1, TextBox3.Text, md5h, 1, getmaxrecuserid, "hint", -1, shahsp); //employee logo string holdlogo = Path.GetFileName(FileUpload1.PostedFile.FileName); arc.AddArticle(getmaxrecarticles, holdlogo, ConfigurationManager.AppSettings["filepth"] + getmaxrecarticles + holdlogo); //real upload FileUpload1.PostedFile.SaveAs(ConfigurationManager.AppSettings["filepth"] + getmaxrecarticles + holdlogo); //user recruiter assignments mps.Insertrecusermapping(getmaxrecuserid, getmaxrec); //finally send out the email emaps.Clemail.Sendmailproc(TextBox11.Text, "AHRCLOUD: Account Activation!", ebod1, 4); //logg it as the entry for email emaps.Sendappemaildbupdate(TextBox11.Text, 1); } else { //user already exists Label24.Visible = true; } } } else { Label31.Text = "please retype the captcha as shown in grey box!"; } }