private void LoadApplicants(string JOBREQ_REQCODE, int Mode)
 {
     try
     {
         DataTable dtApp = new DataTable();
         _obj_Rec_ResumeShortList = new RECRUITMENT_RESUMESHORTLIST();
         _obj_Rec_ResumeShortList.JOBREQ_REQCODE         = JOBREQ_REQCODE;
         _obj_Rec_ResumeShortList.Mode                   = Mode;
         _obj_Rec_ResumeShortList.RESSHT_ORGANISATION_ID = Convert.ToInt32(Session["ORG_ID"]);
         dtApp = Recruitment_BLL.getApplicants(_obj_Rec_ResumeShortList);
         if (dtApp.Rows.Count != 0)
         {
             GApplicants.DataSource = dtApp;
         }
         else
         {
             GApplicants.DataSource = dtApp;
         }
     }
     catch (Exception ex)
     {
         SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "frm_ResumeShortList", ex.StackTrace, DateTime.Now);
         Response.Redirect("~/Frm_ErrorPage.aspx");
         return;
     }
 }
    protected void RTS_ResumeShortList_TabClick(object sender, RadTabStripEventArgs e)
    {
        try
        {
            if (RTS_ResumeShortList.SelectedTab.Text == "Applicant")
            {
                btnShortList.Visible = true;
            }
            else
            {
                DataTable dt_ShortListed = new DataTable();
                _obj_Rec_ResumeShortList                 = new RECRUITMENT_RESUMESHORTLIST();
                _obj_Rec_ResumeShortList.Mode            = 10;
                _obj_Rec_ResumeShortList.RESSHT_JOBREQID = Convert.ToInt32(ddlJobReqCode.SelectedItem.Value);
                _obj_Rec_ResumeShortList.ORGANISATION_ID = Convert.ToInt32(Session["ORG_ID"].ToString());
                dt_ShortListed            = Recruitment_BLL.getApplicants(_obj_Rec_ResumeShortList);
                rg_ShortListed.DataSource = dt_ShortListed;
                rg_ShortListed.DataBind();
                rg_ShortListed.Visible      = true;
                RTS_ResumeShortList.Visible = true;
                btnShortList.Enabled        = true;

                //  RTS_ResumeShortList.SelectedIndex = 1;
                //LoadShortListed();
                btnShortList.Visible = false;
            }
        }
        catch (Exception ex)
        {
            SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "frm_ResumeShortList", ex.StackTrace, DateTime.Now);
            Response.Redirect("~/Frm_ErrorPage.aspx");
            return;
        }
    }
    private bool chkExisting()
    {
        try
        {
            int      index;
            CheckBox chkBox = new CheckBox();
            Label    lblApp = new Label();
            bool     result = false;
            for (index = 0; index <= GApplicants.Items.Count - 1; index++)
            {
                chkBox = GApplicants.Items[index].FindControl("chkChoose") as CheckBox;
                lblApp = GApplicants.Items[index].FindControl("lblAppID") as Label;
                if (chkBox.Checked)
                {
                    DataTable dtDetails = new DataTable();
                    _obj_Rec_ResumeShortList = new RECRUITMENT_RESUMESHORTLIST();
                    //_obj_Rec_ResumeShortList.RESSHT_JOBREQID = Convert.ToInt32(ddlJobReqCode.SelectedItem.Value);
                    _obj_Rec_ResumeShortList.RESSHT_APPLID = Convert.ToInt32(lblApp.Text);
                    _obj_Rec_ResumeShortList.Mode          = 8;
                    dtDetails = Recruitment_BLL.getApplicants(_obj_Rec_ResumeShortList);
                    if (dtDetails.Rows.Count != 0)
                    {
                        result           = true;
                        chkBox.BackColor = System.Drawing.Color.Yellow;
                    }
                    else
                    {
                        result           = false;
                        chkBox.BackColor = System.Drawing.Color.White;
                    }
                }
            }
            return(result);
        }
        catch (Exception ex)
        {
            SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "frm_ResumeShortList", ex.StackTrace, DateTime.Now);
            Response.Redirect("~/Frm_ErrorPage.aspx");

            return(false);
        }
    }
Esempio n. 4
0
    private void Applicants()
    {
        try
        {
            _obj_Rec_ResumeShortList = new RECRUITMENT_RESUMESHORTLIST();

            _obj_Rec_ResumeShortList.Mode            = 9;
            _obj_Rec_ResumeShortList.RESSHT_JOBREQID = Convert.ToInt32(Rcb_JobReq.SelectedItem.Value);

            Rcb_ApplicantID.DataSource     = Recruitment_BLL.getApplicants(_obj_Rec_ResumeShortList);
            Rcb_ApplicantID.DataValueField = "RESSHT_APPLID";
            Rcb_ApplicantID.DataTextField  = "APPLICANT_CODE";
            Rcb_ApplicantID.DataBind();
            Rcb_ApplicantID.Items.Insert(0, new RadComboBoxItem("Select", "0"));
        }
        catch (Exception ex)
        {
            SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "frm_InterviewAssesment", ex.StackTrace, DateTime.Now);
            Response.Redirect("~/Frm_ErrorPage.aspx");
        }
    }
    protected void btnShortList_Click(object sender, EventArgs e)
    {
        try
        {
            int      index1;
            bool     res1;
            int      i       = 0;
            CheckBox chk_Box = new CheckBox();
            for (index1 = 0; index1 <= GApplicants.Items.Count - 1; index1++)
            {
                chk_Box = GApplicants.Items[index1].FindControl("chkChoose") as CheckBox;
                if (chk_Box.Checked)
                {
                    chk_Box.Enabled = false;
                }
                else
                {
                    i = i + 1;
                }
            }
            if (i == GApplicants.Items.Count)
            {
                BLL.ShowMessage(this, "Please Select atleast one Applicant for shortlisting");
                return;
            }
            res1 = chkExisting();
            if (res1 == true)
            {
                BLL.ShowMessage(this, "Applicant(s) have already been shortlisted");
                return;
            }
            int      index;
            CheckBox chkBox = new CheckBox();
            Label    lblApp = new Label();
            Label    lblJR  = new Label();
            bool     res2   = false;
            for (index = 0; index <= GApplicants.Items.Count - 1; index++)
            {
                chkBox = GApplicants.Items[index].FindControl("chkChoose") as CheckBox;
                lblApp = GApplicants.Items[index].FindControl("lblAppID") as Label;
                lblJR  = GApplicants.Items[index].FindControl("JOBREQ_ID") as Label;
                if (chkBox.Checked)
                {
                    _obj_Rec_ResumeShortList = new RECRUITMENT_RESUMESHORTLIST();
                    _obj_Rec_ResumeShortList.RESSHT_JOBREQID    = Convert.ToInt32(ddlJobReqCode.SelectedItem.Value);
                    _obj_Rec_ResumeShortList.RESSHT_APPLID      = Convert.ToInt32(lblApp.Text);
                    _obj_Rec_ResumeShortList.RESSHT_ISSHORTLIST = true;
                    _obj_Rec_ResumeShortList.ORGANISATION_ID    = Convert.ToInt32(Session["ORG_ID"].ToString());
                    _obj_Rec_ResumeShortList.CREATEDBY          = 0;
                    _obj_Rec_ResumeShortList.CREATEDDATE        = DateTime.Now;
                    _obj_Rec_ResumeShortList.LASTMDFBY          = 1;
                    _obj_Rec_ResumeShortList.LASTMDFDATE        = DateTime.Now;
                    _obj_Rec_ResumeShortList.OPERATION          = operation.Insert;
                    res2 = Recruitment_BLL.set_ResumeShortList(_obj_Rec_ResumeShortList);
                }
            }
            if (res2 == true)
            {
                BLL.ShowMessage(this, "Selected Applicants are Short Listed");
                try
                {
                    Session["REFRESH_JOBREQ_ID"] = null;
                    DataTable dt_Details = new DataTable();
                    _obj_Rec_JobRequisition           = new RECRUITMENT_JOBREQUISITION();
                    _obj_Rec_JobRequisition.OPERATION = operation.Empty;

                    string STR_TEST3 = Convert.ToString(Session["REFRESH_JOBREQ_ID"]);
                    _obj_Rec_JobRequisition.JOBREQ_ID = Convert.ToInt32(ddlJobReqCode.SelectedItem.Value);
                    dt_Details = Recruitment_BLL.get_JobReqDetails(_obj_Rec_JobRequisition);
                    if (dt_Details.Rows.Count != 0)
                    {
                        GApplicants.Enabled = true;
                        //lbl_JR.Text = Convert.ToString(dt_Details.Rows[0]["JOBREQ_ID"]);
                        //txtDesc.Text = Convert.ToString(dt_Details.Rows[0]["JOBREQ_REQCODE"]);
                        txtDOC.Text         = Convert.ToString(dt_Details.Rows[0]["JOBREQ_REQDATE"]);
                        txtDOE.Text         = Convert.ToString(dt_Details.Rows[0]["JOBREQ_REQEXPIRY"]);
                        txtBU.Text          = Convert.ToString(dt_Details.Rows[0]["BUSINESSUNIT_CODE"]);
                        txtRaisedBy.Text    = Convert.ToString(dt_Details.Rows[0]["Empname"]);
                        txtDesignation.Text = Convert.ToString(dt_Details.Rows[0]["JOBREQ_DESIGNATION"]);
                        txtPositions.Text   = Convert.ToString(dt_Details.Rows[0]["JOBREQ_POSITIONS"]) + "Members";
                        txtExp.Text         = Convert.ToString(dt_Details.Rows[0]["JOBREQ_EXPYEARS"]);
                        LoadList(Convert.ToString(dt_Details.Rows[0]["JOBREQ_REQCODE"]), Convert.ToString(dt_Details.Rows[0]["JOBREQ_ISYEARSREQ"]), Convert.ToString(dt_Details.Rows[0]["JOBREQ_ISQUALREQ"]), Convert.ToString(dt_Details.Rows[0]["JOBREQ_ISSKILLREQ"]));
                        GApplicants.DataBind();
                        RMP_Applinat.Visible        = true;
                        RTS_ResumeShortList.Visible = true;
                        //var tabNewYork1 = RTS_ResumeShortList.FindTabByText("Applicant");
                        //tabNewYork1.Enabled = false ;
                        RMP_Applinat.SelectedIndex = 0;
                        GApplicants.Visible        = true;
                        btnShortList.Visible       = true;
                    }
                    else
                    {
                        LoadList(Convert.ToString(dt_Details.Rows[0]["JOBREQ_REQCODE"]), Convert.ToString(dt_Details.Rows[0]["JOBREQ_ISYEARSREQ"]), Convert.ToString(dt_Details.Rows[0]["JOBREQ_ISQUALREQ"]), Convert.ToString(dt_Details.Rows[0]["JOBREQ_ISSKILLREQ"]));
                        GApplicants.DataBind();
                        RMP_Applinat.SelectedIndex = 0;
                        GApplicants.Visible        = true;
                        GApplicants.Enabled        = true;
                    }
                    DataTable dt_ShortListed = new DataTable();
                    _obj_Rec_ResumeShortList      = new RECRUITMENT_RESUMESHORTLIST();
                    _obj_Rec_ResumeShortList.Mode = 10;

                    _obj_Rec_ResumeShortList.RESSHT_JOBREQID = Convert.ToInt32(ddlJobReqCode.SelectedItem.Value);
                    dt_ShortListed            = Recruitment_BLL.getApplicants(_obj_Rec_ResumeShortList);
                    rg_ShortListed.DataSource = dt_ShortListed;
                    rg_ShortListed.DataBind();
                    rg_ShortListed.Visible      = true;
                    RTS_ResumeShortList.Visible = true;
                    // btnShortList.Enabled = false;
                }
                catch (Exception ex)
                {
                    SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "frm_ResumeShortList", ex.StackTrace, DateTime.Now);
                    Response.Redirect("~/Frm_ErrorPage.aspx");
                    return;
                }
                return;
            }
            else
            {
                BLL.ShowMessage(this, "An Error Occured While doing the process");
                return;
            }
        }
        catch (Exception ex)
        {
            SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "frm_ResumeShortList", ex.StackTrace, DateTime.Now);
            Response.Redirect("~/Frm_ErrorPage.aspx");
            return;
        }
    }
    protected void ddlJobReqCode_SelectedIndexChanged(object o, Telerik.Web.UI.RadComboBoxSelectedIndexChangedEventArgs e)
    {
        try
        {
            if (ddlJobReqCode.SelectedValue != "-1")
            {
                RTS_ResumeShortList.SelectedIndex = 0;
                //RTS_ResumeShortList.SelectedTab.Text = "Applicant";

                Session["REFRESH_JOBREQ_ID"] = null;
                DataTable dt_Details = new DataTable();
                _obj_Rec_JobRequisition           = new RECRUITMENT_JOBREQUISITION();
                _obj_Rec_JobRequisition.OPERATION = operation.Empty;
                string STR_TEST3 = Convert.ToString(Session["REFRESH_JOBREQ_ID"]);
                _obj_Rec_JobRequisition.JOBREQ_ID = Convert.ToInt32(ddlJobReqCode.SelectedItem.Value);
                dt_Details = Recruitment_BLL.get_JobReqDetails(_obj_Rec_JobRequisition);
                if (dt_Details.Rows.Count != 0)
                {
                    GApplicants.Enabled = true;
                    //lbl_JR.Text = Convert.ToString(dt_Details.Rows[0]["JOBREQ_ID"]);
                    //txtDesc.Text = Convert.ToString(dt_Details.Rows[0]["JOBREQ_REQCODE"]);
                    txtDOC.Text         = Convert.ToString(dt_Details.Rows[0]["JOBREQ_REQDATE"]);
                    txtDOE.Text         = Convert.ToString(dt_Details.Rows[0]["JOBREQ_REQEXPIRY"]);
                    txtBU.Text          = Convert.ToString(dt_Details.Rows[0]["BUSINESSUNIT_CODE"]);
                    txtRaisedBy.Text    = Convert.ToString(dt_Details.Rows[0]["Empname"]);
                    txtDesignation.Text = Convert.ToString(dt_Details.Rows[0]["JOBREQ_DESIGNATION"]);
                    txtPositions.Text   = Convert.ToString(dt_Details.Rows[0]["JOBREQ_POSITIONS"]) + "Members";
                    txtExp.Text         = Convert.ToString(dt_Details.Rows[0]["JOBREQ_EXPYEARS"]);
                    LoadList(Convert.ToString(dt_Details.Rows[0]["JOBREQ_REQCODE"]), Convert.ToString(dt_Details.Rows[0]["JOBREQ_ISYEARSREQ"]), Convert.ToString(dt_Details.Rows[0]["JOBREQ_ISQUALREQ"]), Convert.ToString(dt_Details.Rows[0]["JOBREQ_ISSKILLREQ"]));
                    GApplicants.DataBind();
                    RMP_Applinat.Visible        = true;
                    RTS_ResumeShortList.Visible = true;
                    //var tabNewYork1 = RTS_ResumeShortList.FindTabByText("Applicant");
                    //tabNewYork1.Enabled = false ;
                    RMP_Applinat.SelectedIndex = 0;
                    GApplicants.Visible        = true;
                    btnShortList.Visible       = true;
                }
                else
                {
                    LoadList(Convert.ToString(dt_Details.Rows[0]["JOBREQ_REQCODE"]), Convert.ToString(dt_Details.Rows[0]["JOBREQ_ISYEARSREQ"]), Convert.ToString(dt_Details.Rows[0]["JOBREQ_ISQUALREQ"]), Convert.ToString(dt_Details.Rows[0]["JOBREQ_ISSKILLREQ"]));
                    DataTable dt = new DataTable();
                    GApplicants.DataSource = dt;
                    GApplicants.DataBind();
                    RMP_Applinat.SelectedIndex = 0;
                    GApplicants.Visible        = true;
                    GApplicants.Enabled        = true;
                    clearfields();
                }
                DataTable dt_ShortListed = new DataTable();
                _obj_Rec_ResumeShortList      = new RECRUITMENT_RESUMESHORTLIST();
                _obj_Rec_ResumeShortList.Mode = 10;

                _obj_Rec_ResumeShortList.RESSHT_JOBREQID = Convert.ToInt32(ddlJobReqCode.SelectedItem.Value);
                _obj_Rec_ResumeShortList.ORGANISATION_ID = Convert.ToInt32(Session["ORG_ID"].ToString());
                dt_ShortListed            = Recruitment_BLL.getApplicants(_obj_Rec_ResumeShortList);
                rg_ShortListed.DataSource = dt_ShortListed;
                rg_ShortListed.DataBind();
                rg_ShortListed.Visible      = true;
                RTS_ResumeShortList.Visible = true;
                // btnShortList.Enabled = false;
            }
            else
            {
                RMP_Applinat.Visible        = false;
                RTS_ResumeShortList.Visible = false;
                //txtDesc.Text = "";
                txtDOC.Text          = "";
                txtDOE.Text          = "";
                txtRaisedBy.Text     = "";
                txtBU.Text           = "";
                txtDesignation.Text  = "";
                txtPositions.Text    = "";
                txtExp.Text          = "";
                btnShortList.Visible = false;
            }
        }
        catch (Exception ex)
        {
            SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "frm_ResumeShortList", ex.StackTrace, DateTime.Now);
            Response.Redirect("~/Frm_ErrorPage.aspx");
            return;
        }
    }
    protected void LoadShortListed()
    {
        try
        {
            //    Session["REFRESH_JOBREQ_ID"] = null;
            //    DataTable dt_Details = new DataTable();
            //    _obj_Rec_JobRequisition.OPERATION = operation.Empty;
            //    Session["REFRESH_JOBREQ_ID"] = Convert.ToInt32(ddlJobReqCode.SelectedItem.Value);
            //    string STR_TEST3 = Convert.ToString(Session["REFRESH_JOBREQ_ID"]);
            //    _obj_Rec_JobRequisition.JOBREQ_ID = Convert.ToInt32(ddlJobReqCode.SelectedItem.Value);
            //    dt_Details = BLL.get_JobReqDetails(_obj_Rec_JobRequisition);
            //    if (dt_Details.Rows.Count != 0)
            //    {

            //        GApplicants.Enabled = true;
            //        //lbl_JR.Text = Convert.ToString(dt_Details.Rows[0]["JOBREQ_ID"]);
            //        txtDesc.Text = Convert.ToString(dt_Details.Rows[0]["JOBREQ_REQCODE"]);
            //        txtDOC.Text = Convert.ToString(dt_Details.Rows[0]["JOBREQ_REQDATE"]);
            //        txtDOE.Text = Convert.ToString(dt_Details.Rows[0]["JOBREQ_REQEXPIRY"]);
            //        txtBU.Text = Convert.ToString(dt_Details.Rows[0]["JOBREQ_REQEXPIRY"]);
            //        txtRaisedBy.Text = Convert.ToString(dt_Details.Rows[0]["Empname"]);
            //        txtDesignation.Text = Convert.ToString(dt_Details.Rows[0]["JOBREQ_DESIGNATION"]);
            //        txtPositions.Text = Convert.ToString(dt_Details.Rows[0]["JOBREQ_POSITIONS"]) + "Members";
            //        txtExp.Text = Convert.ToString(dt_Details.Rows[0]["JOBREQ_EXPYEARS"]);
            //        LoadList(Convert.ToString(dt_Details.Rows[0]["JOBREQ_REQCODE"]), Convert.ToString(dt_Details.Rows[0]["JOBREQ_ISYEARSREQ"]), Convert.ToString(dt_Details.Rows[0]["JOBREQ_ISQUALREQ"]), Convert.ToString(dt_Details.Rows[0]["JOBREQ_ISSKILLREQ"]));
            //       // GApplicants.DataBind();
            //        RMP_Applinat.Visible = true;
            //        RTS_ResumeShortList.Visible = true;
            //        //var tabNewYork1 = RTS_ResumeShortList.FindTabByText("Applicant");
            //        //tabNewYork1.Enabled = false ;
            //        RMP_Applinat.SelectedIndex = 0;
            //        GApplicants.Visible = true;
            //        btnShortList.Enabled = true;
            //    }
            //    else
            //    {
            //        LoadList(Convert.ToString(dt_Details.Rows[0]["JOBREQ_REQCODE"]), Convert.ToString(dt_Details.Rows[0]["JOBREQ_ISYEARSREQ"]), Convert.ToString(dt_Details.Rows[0]["JOBREQ_ISQUALREQ"]), Convert.ToString(dt_Details.Rows[0]["JOBREQ_ISSKILLREQ"]));
            //     //   GApplicants.DataBind();
            //        RMP_Applinat.SelectedIndex = 0;
            //        GApplicants.Visible = true;
            //        GApplicants.Enabled = true;
            //    }
            DataTable dt_ShortListed = new DataTable();
            _obj_Rec_ResumeShortList                 = new RECRUITMENT_RESUMESHORTLIST();
            _obj_Rec_ResumeShortList.Mode            = 10;
            _obj_Rec_ResumeShortList.RESSHT_JOBREQID = Convert.ToInt32(ddlJobReqCode.SelectedItem.Value);
            _obj_Rec_ResumeShortList.ORGANISATION_ID = Convert.ToInt32(Session["ORG_ID"].ToString());
            dt_ShortListed            = Recruitment_BLL.getApplicants(_obj_Rec_ResumeShortList);
            rg_ShortListed.DataSource = dt_ShortListed;
            // rg_ShortListed.DataBind();
            rg_ShortListed.Visible      = true;
            RTS_ResumeShortList.Visible = true;
            btnShortList.Enabled        = true;
        }
        catch (Exception ex)
        {
            SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "frm_ResumeShortList", ex.StackTrace, DateTime.Now);
            Response.Redirect("~/Frm_ErrorPage.aspx");
            return;
        }
    }