Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

Online job portal project code in asp net c# free download or Online Job Recruitment System Free Source Code Download


          This project is a web application helps to  allows users to register and log-in. It then allows users to post daily jobs available, and for job seekers to place a bid on the job. Essentially a job website for contracts (done by the day), for a very specific industry, and makes the job seeker do the bidding as opposed to the job poster. All bids need to be seen by the poster when they re-login, but the computer program needs to make no decisions on which bid is better or organize the bids.

The Following are the functionalities implemented

1. Provided Login.
2. Registration.
3. Job poster Registration
4. Job Seeker Registration
5. Forgot password
6. Post a new Job
7. Search jobs
7.a   Bid on job
7.b   Contact us
8. Change password
9. Update User Details.
10. Job Seeker Applied Jobs
11. Job Seeker Applied Job Details
12. List of Posted Jobs
13. Posted Job Details
14. Search jobs
15. Bid on Job.
16. Submit Bid
1. Provided Login.

Dal info = new Dal();
    protected void Page_Load(objectsender, EventArgs e)
    {
        txt_pwd.Attributes.Add("OnFocus", "javascript:readCookie('"+ this.Request.Cookies + "');");
        lbl_message.Text = "";

    }
    protected void btn_login_Click(objectsender, ImageClickEventArgs e)
    {
        Session["UserName"] = txt_user.Text;

        if(ChkBxRemMe.Checked)
        {
            HttpCookiecookie = new HttpCookie(txt_user.Text);
            Response.Cookies.Add(cookie);
            cookie.Values.Add("", txt_pwd.Text + ";");
            Response.Cookies[txt_user.Text].Expires = DateTime.Now.AddDays(15);
        }

        stringuname = info.Login(txt_user.Text, txt_pwd.Text);

        if(uname == "Poster")
        {
          
            Response.Redirect("UserHome.aspx");
        }
        else if (uname == "Seeker")
        {
          
            Response.Redirect("UserHome.aspx");
        }
        else
        {
            lbl_message.Text = "Invalid EmailId/Password";

        }

    }
    protected void lbtn_pwd_Click(objectsender, EventArgs e)
    {
        Response.Redirect("Forgotpassword.aspx");

    }
    protected void lbtnsignup_Click(objectsender, EventArgs e)
    {
        Response.Redirect("Registration.aspx");
    }
=================================================================================
3. Job poster Registration 


Dal info = new Dal();

    protected void Page_Load(objectsender, EventArgs e)
    {
      

    }
    protected void btn_submit_Click(objectsender, EventArgs e)
    {
        try
        {

            if(checkbox_term.Checked == true)
            {
                intcount = Convert.ToInt32(info.JobEmailCount(txt_email.Text));
                if(count == 1)
                {
                   
                    lbl_mes.Visible = true;
                    lbl_mes.Text = "Email Already Exists";

                }
                else
                {
                    stringType = Request.QueryString["RegType"];
                    info.InsertJobRegistration(txt_dname.Text, txt_email.Text, txt_pwd.Text, txt_fname.Text, txt_lname.Text, txt_add.Text, txt_city.Text, txt_State.Text, ddl_state.SelectedValue, Type);

                    stringstrbody = "<table align=center style=width: 710px; height: 143px><tr><td colspan=3>";
                    strbody += "<h1 align=center>Welcome To Job Website </h1></td></tr><tr><td colspan=3>";
                    strbody += "<tr><td align=center>“You have Registered Succesfully…”</td></tr>";
                    strbody += "<tr><td>Thanks for registering your account. The Job Web Website Adminisrtator will verfity and approve your account.  You will recevie a confrimation email within 24-72hrs.</td></tr>";
                    strbody += "</td></tr><tr><td style=font-weight:bolder; font-family:Verdana; colspan=3>Your Registration Details:";
                    strbody += "</td></tr><tr><td colspan=3 style=font-family:Tahoma;font-weight:bold;font-size:small;>Emailid:&nbsp;"+ txt_email.Text;
                    strbody += "</td></tr><tr><td colspan=3 style=font-family:Tahoma;font-weight:bold;font-size:small;>Password:&nbsp;"+ txt_pwd.Text + "</td>";
                    strbody += "<tr> <td > To activate your Job website account, please click this link:<a href='>Click here</a></td></tr><br/>";
                    strbody += "</tr><tr><td colspan=3>Have a Good Day.</td></tr>";
                    strbody += "<tr><td align='left'>Sincerely,</td></tr>";
                    strbody += "<tr><td align='left'> Website Adminisrtator</td></tr></table>";
                    conststring server = "relay-hosting.secureserver.net";
                    MailMessageomail = new System.Web.Mail.MailMessage();
                    omail.From = "";
                    omail.To = txt_email.Text;
                    omail.Subject = "WelCome to Job Website";                  
                    omail.BodyFormat = MailFormat.Html; // enumeration
                    omail.Priority = MailPriority.High; // enumeration
                    omail.Body = strbody;
                    SmtpMail.SmtpServer = server;
                    SmtpMail.Send(omail);



                    Page.RegisterStartupScript("err1", "<script language='javascript'>alert('Registration Successfull');</script>");
                    txt_dname.Text = "";
                    txt_email.Text = "";
                    txt_fname.Text = "";
                    txt_lname.Text = "";
                    txt_add.Text = "";
                    txt_city.Text = "";
                    txt_State.Text = "";
                    ddl_state.ClearSelection();
                    checkbox_term.Checked = false;
                    mess.Visible = true;
                    lblmesg.Text = "Your Account will be activated within 24 hours";
                }

            }
            else
            {
                lblmesg.Visible = true;
                lblmesg.Text = "Please check the terms and conditions check box";

            }
        }
        catch (Exception ex)
        {
            Response.Write(ex.Message);
        }
      
    }
    protected void btn_cancel_Click(objectsender, EventArgs e)
    {

        txt_dname.Text = "";
        txt_email.Text = "";
        txt_fname.Text = "";
        txt_lname.Text = "";
        txt_add.Text = "";
        txt_city.Text = "";
        txt_State.Text = "";
        ddl_state.ClearSelection();
        checkbox_term.Checked = false;
        lblmesg.Text = "";
        lbl_mes.Text = "";
    }
    protected void ImageButton1_Click(objectsender, ImageClickEventArgs e)
    {
        Response.Redirect("Registration.aspx");
    }
=================================================================================
5. Forgot password 


click here This is the code for forgot password

6. Post a new Job

Dal info = new Dal();

    protected void Page_Load(objectsender, EventArgs e)
    {
        if(Session["UserName"].ToString() == "")
        {
            Response.Redirect("Home1.aspx");
        }
        HyperLink1.Visible = false;

    }
    protected void btn_sub_Click(objectsender, EventArgs e)
    {
        info.InsertJobDetails(txt_email.Text, txt_CompanyName.Text, Convert.ToDateTime(txt_liendate.Text), txt_city.Text, ddl_Country.SelectedValue, ddl_JobType.SelectedValue, txt_description.Text);
        lblmesg.Text = "Your Job Details Posted Succesfully";
        HyperLink1.Visible = true;
        txt_email.Text = "";
        txt_CompanyName.Text = "";
        txt_liendate.Text = "";
        txt_city.Text = "";
        ddl_Country.ClearSelection();
        ddl_JobType.ClearSelection();
        txt_description.Text = "";

    }
    protected void Button1_Click(objectsender, EventArgs e)
    {
        txt_email.Text="";
        txt_CompanyName.Text="";
        txt_liendate.Text = "";
        txt_city.Text="";
        ddl_Country.ClearSelection();
        ddl_JobType.ClearSelection();
        txt_description.Text = "";
        HyperLink1.Visible = false;
    }

7. Search jobs 
Dal info = new Dal();
    protected void Page_Load(objectsender, EventArgs e)
    {
        if(Session["UserName"].ToString() == "")
        {
            Response.Redirect("Home1.aspx");
        }
        if (!IsPostBack)
        {
            PostedJobs();
        }
    }
    private void PostedJobs()
    {
        DataSetPostedJob = info.BindPostedJobs();
      
        ddl_PostedJobs.DataSource = PostedJob;
        ddl_PostedJobs.DataBind();

   
    }
    protected void ddl_PostedJobs_ItemCommand(object source, DataListCommandEventArgse)
    {

        if(e.CommandName == "test")
        {
       
            Labellab1 = (Label)ddl_PostedJobs.Items[e.Item.ItemIndex].FindControl("JobPostedID");
            stringid = lab1.Text;
            Response.Redirect("BidJob.aspx?SelectedJob=" + id);
        }
    }

=================================================================================
8. Change password 

 click here This is code for change password

9. Update User Details.
AdminDal AdmDal = new AdminDal();

    protected void Page_Load(objectsender, EventArgs e)
    {
        if(Session["UserName"].ToString() == "")
        {
            Response.Redirect("Home1.aspx");
        }
        if(!IsPostBack)
        {
            BindData();

        }

    }
    private void BindData()
    {
        AdmDal.JobSeekerId = Session["UserName"].ToString();
        DataSetds = new DataSet();
        ds = AdmDal.GetAdminRegisteredUser();
        if(ds.Tables[0].Rows.Count > 0)
        {
            txtDName.Text = ds.Tables[0].Rows[0]["JR_DisplayName"].ToString();
            txteMail.Text = ds.Tables[0].Rows[0]["JR_Email"].ToString();
            txtFname.Text = ds.Tables[0].Rows[0]["JR_FirstName"].ToString();
            txtLname.Text = ds.Tables[0].Rows[0]["JR_LastName"].ToString();
            txtAddress.Text = ds.Tables[0].Rows[0]["JR_Address"].ToString();
            txtCity.Text = ds.Tables[0].Rows[0]["JR_City"].ToString();
            txtState.Text = ds.Tables[0].Rows[0]["JR_State"].ToString();
            txtCountry.Text = ds.Tables[0].Rows[0]["JR_Country"].ToString();
          

        }
    }
    protected void btnUpdate_Click(objectsender, EventArgs e)
    {
        if(Session["UserName"].ToString() == txteMail.Text)
        {
            AdmDal.UpdateUser(txtDName.Text, txteMail.Text, txtFname.Text, txtLname.Text, txtAddress.Text, txtCity.Text, txtState.Text, txtCountry.Text);
            txtDName.Text = "";
            txteMail.Text = "";
            txtFname.Text = "";
            txtLname.Text = "";
            txtAddress.Text = "";
            txtCity.Text = "";
            txtState.Text = "";
            txtCountry.Text = "";
            lblMsg.Text = "Your Account Updated Succesfully";
       
        }
        else{
            intcount = Convert.ToInt32(AdmDal.JobEmailCount(txteMail.Text));
            if(count == 1)
            {

                lblMsg.Text = "Email Already Exists";
            }
            else
            {
                AdmDal.UpdateUser(txtDName.Text, txteMail.Text, txtFname.Text, txtLname.Text, txtAddress.Text, txtCity.Text, txtState.Text, txtCountry.Text);
                txtDName.Text = "";
                txteMail.Text = "";
                txtFname.Text = "";
                txtLname.Text = "";
                txtAddress.Text = "";
                txtCity.Text = "";
                txtState.Text = "";
                txtCountry.Text = "";
                lblMsg.Text = "Your Account Updated Succesfully";
       
            }
        }

    }
    protected void btnBack_Click(objectsender, EventArgs e)
    {
        Response.Redirect("UserHome.aspx");
    }
=================================================================================
10. Bid on job:
  Dal info = new Dal();
    protected void Page_Load(objectsender, EventArgs e)
    {
        if( Session["UserName"].ToString() =="")
        {
            Response.Redirect("Home1.aspx");
        }
        if(Request.QueryString["SelectedJob"] != null)
        {

            if(!IsPostBack)
            {
                BindSelectedJob();
            }
        }
        else
        {
            Response.Redirect("SearchJob.aspx");
        }
    }
    private void BindSelectedJob()
    {
        stringJid = Request.QueryString["SelectedJob"];
      
            DataSetSelectedJob = info.SelectedBidJob(Jid);

            DtlBidJob.DataSource = SelectedJob;
            DtlBidJob.DataBind();
       


    }
    protected void btn_submit_Click(objectsender, EventArgs e)
    {
        stringJid = Request.QueryString["SelectedJob"];
        stringUserEmail = Session["UserName"].ToString();
        info.JobBidInsertion(Jid, UserEmail, Convert.ToDateTime(txt_liendate.Text), txt_BidRate.Text + " " + ddl_Rate.SelectedValue, Txt_Description.Text);
        lblmesg.Text="Your bid Details Posted Succesfully";
        txt_liendate.Text = "";
        txt_BidRate.Text="";
        ddl_Rate.ClearSelection();
        Txt_Description.Text = "";

    }
    protected void btn_cancel_Click(objectsender, EventArgs e)
    {
        lblmesg.Text = "";
        txt_liendate.Text = "";
        txt_BidRate.Text = "";
        ddl_Rate.ClearSelection();
        Txt_Description.Text = "";

    }
=================================================================================
7.b   Contact us

Dal info = new Dal();
    protected void Page_Load(objectsender, EventArgs e)
    {

    }
    protected void btnsubmit_Click(objectsender, EventArgs e)
    {
      
        try
        {     
            info.InsertContactUsDetails(ddltopic.SelectedValue, txtname.Text,txtemail.Text, txtmsg.Text);
            stringstrbody = "<table align=center style=width: 710px; height: 143px><tr><td colspan=3>";
            strbody += "<h1 align=center>Welcome To Job Website </h1></td></tr><tr><td colspan=3>";
            strbody += "<tr><td align=center>“Thanks for sending…”</td></tr>";
            strbody += "</td></tr><tr><td colspan=3 style=font-family:Tahoma;font-size:small;><b>Topic:</b>&nbsp;"+ ddltopic.SelectedValue;
            strbody += "</td></tr><tr><td colspan=3 style=font-family:Tahoma;font-size:small;><b>Name:</b>&nbsp;"+ txtname.Text + "</td>";
            strbody += "</td></tr><tr><td colspan=3 style=font-family:Tahoma;font-size:small;><b>Message:</b>&nbsp;"+ txtmsg.Text + "</td>";
            strbody += "</td></tr><tr><td colspan=3 style=font-family:Tahoma;font-size:small;>We will Contact you soon ! ! ! </td>";

                    conststring server = "relay-hosting.secureserver.net";
                    MailMessageomail = new System.Web.Mail.MailMessage();
                    omail.From = "[email protected]";
                    omail.To = txtemail.Text;
                    omail.Subject = "WelCome to Job Website";
                    omail.BodyFormat = MailFormat.Html; // enumeration
                    omail.Priority = MailPriority.High; // enumeration
                    omail.Body = strbody;
                    SmtpMail.SmtpServer = server;
                    SmtpMail.Send(omail);

            txtmsg.Text = "";
            txtname.Text = "";
            txtemail.Text = "";
            ddltopic.SelectedValue = "I have a general question or inquiry";
            lblmsg.Text = "Your Query has been sent ";
        }
        catch
        {
            txtmsg.Text = "";
            txtname.Text = "";
            txtemail.Text = "";
            ddltopic.SelectedValue = "I have a general question or inquiry";
            lblmsg.Text = "Your Query has not sent ";
        }

    }
================================================================================
code for dal.cs :

public static stringusername;
    public static stringpassword;
  

    #region Global Declaration
    SqlConnectioncon = new SqlConnection(ConfigurationManager.ConnectionStrings["sqlcon"].ConnectionString);
    SqlCommandcmd, cmd1, cmd2;
    SqlCommandcmdlogin, cmdlogin1;
    DataTabledt = new DataTable();
    SqlDataAdapterda;
    #endregion

    public string Login(stringEmail, string Password)
    {
        if(con.State == ConnectionState.Open)
        {
            con.Close();
        }
        con.Open();
        SqlCommandcmdlogin1 = new SqlCommand("JB_loginuser", con);
        cmdlogin1.CommandType = CommandType.StoredProcedure;
        cmdlogin1.Parameters.AddWithValue("@P_userid", Email);
        cmdlogin1.Parameters.AddWithValue("@P_password", Password);
       SqlDataReaderdr = cmdlogin1.ExecuteReader();

       if (dr.HasRows)
       {
           dr.Read();
           Email = dr[0].ToString();
           dr.Close();

           SqlCommandcmd1 = new SqlCommand("select JR_Type from JobRegistration where JR_Email='" + Email + "'", con);
           SqlDataAdapterda1 = new SqlDataAdapter(cmd1);
           DataSetds1 = new DataSet();
           da1.Fill(ds1);
           stringstr = ds1.Tables[0].Rows[0]["JR_Type"].ToString();
           if(str == "Poster")
           {
               return"Poster";
           }
           else
           {
               return"Seeker";
           }

       }

       else
       {
           return"Invalid Username/Password.....";
       }
    }

    public void InsertJobRegistration(stringDisplayName, string Email, string Password, stringFirstName, string LastName, string Address, stringCity, string State, stringCountry, string Type)
    {
        if(con.State == ConnectionState.Open)
        {
            con.Close();
        }
        con.Open();
        cmd = newSqlCommand("Job_Registration_Insertion", con);
        cmd.CommandType = CommandType.StoredProcedure;
        cmd.Parameters.AddWithValue("@P_DisplayName", DisplayName);
        cmd.Parameters.AddWithValue("@P_Email", Email);
        cmd.Parameters.AddWithValue("@P_Password", Password);
        cmd.Parameters.AddWithValue("@P_FirstName", FirstName);
        cmd.Parameters.AddWithValue("@P_LastName", LastName);
        cmd.Parameters.AddWithValue("@P_Address", Address);
        cmd.Parameters.AddWithValue("@P_City", City);
        cmd.Parameters.AddWithValue("@P_State", State);
        cmd.Parameters.AddWithValue("@P_Country",  Country);
        cmd.Parameters.AddWithValue("@P_Type", Type);
        cmd.ExecuteNonQuery();
        con.Close();
    }
    public void InsertJobDetails(stringEmail, string CompanyName, DateTime Date, stringCity, string Country, stringTypeOfJob, string Description)
    {

        if(con.State == ConnectionState.Open)
        {
            con.Close();
        }
        con.Open();
        cmd = newSqlCommand("PostedJobs_Insertion", con);
        cmd.CommandType = CommandType.StoredProcedure;
        cmd.Parameters.AddWithValue("@P_Email", Email);
        cmd.Parameters.AddWithValue("@P_Company", CompanyName);
        cmd.Parameters.AddWithValue("@P_DatePosted", Date);
        cmd.Parameters.AddWithValue("@P_City", City);
        cmd.Parameters.AddWithValue("@P_Country", Country);
        cmd.Parameters.AddWithValue("@P_JobType", TypeOfJob);
        cmd.Parameters.AddWithValue("@P_Description", Description);
        cmd.ExecuteNonQuery();
        con.Close();
    }
    public void JobBidInsertion(stringJid, string Email, DateTimeDate,string  BidRate, string Description)
    {

        if(con.State == ConnectionState.Open)
        {
            con.Close();
        }
        con.Open();
        cmd = newSqlCommand("BiddedJob_Insertion", con);
        cmd.CommandType = CommandType.StoredProcedure;
        cmd.Parameters.AddWithValue("@P_JobId", Jid);
        cmd.Parameters.AddWithValue("@P_UserEmail", Email);
        cmd.Parameters.AddWithValue("@P_BiddedDate", Date);
        cmd.Parameters.AddWithValue("@P_BidRate", BidRate);
        cmd.Parameters.AddWithValue("@P_Description", Description);
        cmd.ExecuteNonQuery();
        con.Close();
    }


    public DataSet BindPostedJobs()
    {
        if(con.State == ConnectionState.Open)
        {
            con.Close();
        }
        con.Open();
        cmd1 = newSqlCommand("Get_PostedJobs", con);
        cmd1.CommandType = CommandType.StoredProcedure;
        SqlDataAdapterda = new SqlDataAdapter(cmd1);
        DataSetds = new DataSet();
            da.Fill(ds);
        returnds;

    }
    public DataSet SelectedBidJob(stringJobId)
    {
       


This post first appeared on Asp.netSourceCodes, please read the originial post: here

Share the post

Online job portal project code in asp net c# free download or Online Job Recruitment System Free Source Code Download

×

Subscribe to Asp.netsourcecodes

Get updates delivered right to your inbox!

Thank you for your subscription

×