예제 #1
0
 protected void GridView1_PageIndexChanging(object sender, GridViewPageEventArgs e)
 {
     var rcl2 = new DlRecruiter();
     GridView1.DataSource = rcl2.Getallrecwithjobs();
     GridView1.PageIndex = e.NewPageIndex;
     GridView1.DataBind();
 }
예제 #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            //read and validate login
            if (Session["cuserval"] != null)
            {
                if (Session["cuserval"].ToString() == Readjobcookie())
                {
                }
                else
                {
                    Response.Redirect("login.aspx");
                }
            }

            else
            {
                Response.Redirect("login.aspx");
            }
            ////////////////////////////////////

            var rcl = new DlRecruiter();

            GridView1.DataSource = rcl.RecUsers(Session["pusername"].ToString());
            GridView1.DataBind();
        }
예제 #3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            //constructor
            var rcl = new DlRecruiter();

            GridView1.DataSource = rcl.Getallrecwithjobs();
            GridView1.DataBind();
        }
예제 #4
0
        protected void GridView1_RowEditing(object sender, GridViewEditEventArgs e)
        {
            var rcl2 = new DlRecruiter();

            GridView1.EditIndex  = e.NewEditIndex;
            GridView1.DataSource = rcl2.RecUsers(Session["pusername"].ToString());
            GridView1.DataBind();
        }
예제 #5
0
        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!";
            }
        }
예제 #6
0
        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!";
            }
        }
예제 #7
0
        protected void Page_Load(object sender, EventArgs e)
        {
            var mpage = new DlMainpagepopulator();

            if (Request.QueryString["JobID"] != null)
            {
                int tempjobid = Convert.ToInt16(Request.QueryString["JobID"]);

                string[] Plc = mpage.Getdetailspage(tempjobid);

                Label11.Text = "Job Description";
                Label32.Text = Plc[0];
                Label26.Text = Plc[1];
                Label18.Text = Plc[2];
                Label30.Text = Plc[5];
                Label31.Text = Plc[6];
                Label21.Text = Plc[4];

                var culinf = new CultureInfo("pt-BR");
                Label23.Text = Convert.ToDateTime(Plc[3]).ToString("d", culinf);

                //get locations
                Label19.Text = mpage.Getdetailspagecats(tempjobid, 1000);

                //get salary
                Label20.Text = mpage.Getdetailspagecats(tempjobid, 1005, 0);

                //get contract type
                Label22.Text = mpage.Getdetailspagecats(tempjobid, 1002);

                //hours
                Labelhrs.Text = mpage.Getdetailspagecats(tempjobid, 1003);

                //industry
                Labelindustry.Text = mpage.Getdetailspagecats(tempjobid, 1001);

                //employer
                Labeletype.Text = mpage.Getdetailspagecats(tempjobid, 1004);

                //get rec logo
                string recid = Plc[7];

                Image7.ImageUrl = mpage.Getcurrrec(recid);

                //get contact person name if any
                var contactpname = string.Empty;

                var rcl2 = new DlRecruiter();

                if (Request.QueryString["JobID"] != null)
                {
                    contactpname = rcl2.Contactperson(Request.QueryString["JobID"]);
                    if (contactpname != "")
                    {
                        Label27.Text = contactpname;
                    }
                }

                //update job views for recruiter graph

                var cljb = new DlJobviewdata();
                cljb.Addview(Convert.ToInt16(recid), DateTime.Now.ToString("yyyy:MM:dd hh:mm:ss"));
            }
        }