protected void job_applicant()
 {
     try
     {
         DataTable dt_Details1 = new DataTable();
         _obj_Rec_JobRequisition           = new RECRUITMENT_JOBREQUISITION();
         _obj_Rec_JobRequisition.OPERATION = operation.loadapplicant;
         _obj_Rec_JobRequisition.APPLICANT = Convert.ToInt32(RCMB_Applicant.SelectedItem.Value);
         dt_Details1 = Recruitment_BLL.get_JobReqDetails(_obj_Rec_JobRequisition);
         //lblApcode.Text = Convert.ToString(dt_Details1.Rows[0]["APPLICANT_ID"]);
         if (dt_Details1.Rows.Count != 0)
         {
             RTB_ApplicantName.Text = Convert.ToString(dt_Details1.Rows[0]["EMPNAME"]);
             lblApcode.Text         = RCMB_Applicant.SelectedItem.Value;
             Session["Applicant"]   = lblApcode.Text.ToString();
         }
         else
         {
             RTB_ApplicantName.Text = string.Empty;
             lblApcode.Text         = string.Empty;
             Session["Applicant"]   = "";
         }
         RTB_ApplicantName.Enabled = false;
     }
     catch (Exception ex)
     {
         SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "frm_JobOffers", ex.StackTrace, DateTime.Now);
         Response.Redirect("~/Frm_ErrorPage.aspx");
     }
 }
 protected void Loadgridpaging()
 {
     try
     {
         Session["REFRESH_JOBREQ_ID"] = null;
         DataTable dt_Details = new DataTable();
         _obj_Rec_JobRequisition           = new RECRUITMENT_JOBREQUISITION();
         _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 = 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.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.Mode = 10;
         //_obj_Rec_ResumeShortList.RESSHT_JOBREQID = Convert.ToInt32(ddlJobReqCode.SelectedItem.Value);
         //dt_ShortListed = 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;
     }
 }
    protected void RCMB_Applicant_SelectedIndexChanged(object o, Telerik.Web.UI.RadComboBoxSelectedIndexChangedEventArgs e)
    {
        try
        {
            DataTable dt_Details1 = new DataTable();
            _obj_Rec_JobRequisition           = new RECRUITMENT_JOBREQUISITION();
            _obj_Rec_JobRequisition.OPERATION = operation.loadapplicant;
            _obj_Rec_JobRequisition.APPLICANT = Convert.ToInt32(RCMB_Applicant.SelectedItem.Value);
            dt_Details1 = Recruitment_BLL.get_JobReqDetails(_obj_Rec_JobRequisition);
            //lblApcode.Text = Convert.ToString(dt_Details1.Rows[0]["APPLICANT_ID"]);
            if (dt_Details1.Rows.Count != 0)
            {
                RTB_ApplicantName.Text = Convert.ToString(dt_Details1.Rows[0]["EMPNAME"]);
                lblApcode.Text         = RCMB_Applicant.SelectedItem.Value;
                Session["Applicant"]   = lblApcode.Text.ToString();
                CultureInfo newCulture = (CultureInfo)System.Threading.Thread.CurrentThread.CurrentCulture.Clone();
                newCulture.DateTimeFormat.ShortDatePattern = "dd/MM/yyyy";
                newCulture.DateTimeFormat.DateSeparator    = "/";
                Thread.CurrentThread.CurrentCulture        = newCulture;
                RDP_Offerdate.SelectedDate = Convert.ToDateTime(dt_Details1.Rows[0]["INTREM_JOININGDATE"]);

                //RTB_OfferSalary.Text = string.Empty;
                RCB_SalaryStructure.ClearSelection();
                RCMB_leavestructure.ClearSelection();
                RDP_JoinDate.SelectedDate = null;
            }
            else
            {
                RTB_ApplicantName.Text     = string.Empty;
                lblApcode.Text             = string.Empty;
                Session["Applicant"]       = "";
                RDP_Offerdate.SelectedDate = null;
                //RTB_OfferSalary.Text = string.Empty;
                RCB_SalaryStructure.ClearSelection();
                RCMB_leavestructure.ClearSelection();
                RDP_JoinDate.SelectedDate = null;
            }

            RTB_ApplicantName.Enabled = false;
        }
        catch (Exception ex)
        {
            SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "frm_JobOffers", ex.StackTrace, DateTime.Now);
            Response.Redirect("~/Frm_ErrorPage.aspx");
            return;
        }
    }
 protected void Load_data(string str_jobreq)
 {
     try
     {
         //DataTable dt_Details = new DataTable();
         //_obj_Rec_JobRequisition = new RECRUITMENT_JOBREQUISITION();
         //_obj_Rec_JobRequisition.OPERATION = operation.load;
         //_obj_Rec_JobRequisition.JOBREQ_REQCODE = str_jobreq;
         //dt_Details = Recruitment_BLL.get_JobReqDetails(_obj_Rec_JobRequisition);
         //if (dt_Details.Rows.Count > 0)
         //{
         //    //lbl_id.Text = Convert.ToString(dt_Details.Rows[0]["JOBREQ_ID"]);
         //    RTB_JobRequistionDescription.Text = Convert.ToString(dt_Details.Rows[0]["JOBREQ_REQNAME"]);
         //    RTB_Businessunit.Text = Convert.ToString(dt_Details.Rows[0]["JOBREQ_BUSINESSUNIT_ID"]);
         //    RTB_RasiedBy.Text = Convert.ToString(dt_Details.Rows[0]["JOBREQ_RAISEDBY"]);
         //    RTB_Designation.Text = Convert.ToString(dt_Details.Rows[0]["JOBREQ_DESIGNATION"]);
         //    RTB_Department.Text = Convert.ToString(dt_Details.Rows[0]["JOBREQ_DEPARTMENT"]);
         //    RTB_Dateofcreation.Text = Convert.ToString(dt_Details.Rows[0]["JOBREQ_REQDATE"]);
         //}
         DataTable dt_Details = new DataTable();
         _obj_Rec_JobRequisition           = new RECRUITMENT_JOBREQUISITION();
         _obj_Rec_JobRequisition.OPERATION = operation.load;
         _obj_Rec_JobRequisition.JOBREQ_ID = Convert.ToInt32(str_jobreq);
         dt_Details = Recruitment_BLL.get_JobReqDetails(_obj_Rec_JobRequisition);
         if (dt_Details.Rows.Count > 0)
         {
             //lbl_id.Text = Convert.ToString(dt_Details.Rows[0]["JOBREQ_ID"]);
             RTB_JobRequistionDescription.Text = Convert.ToString(dt_Details.Rows[0]["JOBREQ_REQNAME"]);
             RTB_Businessunit.Text             = Convert.ToString(dt_Details.Rows[0]["JOBREQ_BUSINESSUNIT_ID"]);
             RTB_RasiedBy.Text       = Convert.ToString(dt_Details.Rows[0]["RASIEDBY"]);
             RTB_Designation.Text    = Convert.ToString(dt_Details.Rows[0]["JOBREQ_DESIGNATION"]);
             RTB_Department.Text     = Convert.ToString(dt_Details.Rows[0]["JOBREQ_DEPARTMENT"]);
             RTB_Dateofcreation.Text = Convert.ToString(dt_Details.Rows[0]["JOBREQ_CREATEDDATE"]);
             RTB_Scale.Text          = Convert.ToString(dt_Details.Rows[0]["EMPLOYEEGRADE_CODE"]);
             RTB_Directorate.Text    = Convert.ToString(dt_Details.Rows[0]["DIRECTORATE_CODE"]);
         }
     }
     catch (Exception ex)
     {
         SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "frm_JobOffers", ex.StackTrace, DateTime.Now);
         Response.Redirect("~/Frm_ErrorPage.aspx");
     }
 }
    protected void load_Requistion()
    {
        try
        {
            DataTable dt_Details = new DataTable();
            _obj_Rec_JobRequisition           = new RECRUITMENT_JOBREQUISITION();
            _obj_Rec_JobRequisition.OPERATION = operation.load;
            _obj_Rec_JobRequisition.JOBREQ_ID = Convert.ToInt32(RCMB_JobRequistion.SelectedItem.Value);
            if (dt_Details != null)            //Inserted by Apoorva Dec 3
            {
                if (dt_Details.Rows.Count > 0) //Inserted by Apoorva Dec 3
                {
                    dt_Details = Recruitment_BLL.get_JobReqDetails(_obj_Rec_JobRequisition);
                    //lbl_id.Text = Convert.ToString(dt_Details.Rows[0]["JOBREQ_ID"]);
                    RTB_JobRequistionDescription.Text = Convert.ToString(dt_Details.Rows[0]["JOBREQ_REQNAME"]);
                    RTB_Businessunit.Text             = Convert.ToString(dt_Details.Rows[0]["JOBREQ_BUSINESSUNIT_ID"]);
                    RTB_RasiedBy.Text       = Convert.ToString(dt_Details.Rows[0]["RASIEDBY"]);
                    RTB_Designation.Text    = Convert.ToString(dt_Details.Rows[0]["JOBREQ_DESIGNATION"]);
                    RTB_Department.Text     = Convert.ToString(dt_Details.Rows[0]["JOBREQ_DEPARTMENT"]);
                    RTB_Directorate.Text    = Convert.ToString(dt_Details.Rows[0]["DIRECTORATE_CODE"]);
                    RTB_Scale.Text          = Convert.ToString(dt_Details.Rows[0]["EMPLOYEEGRADE_CODE"]);
                    RTB_OfferSalary.Text    = Convert.ToString(dt_Details.Rows[0]["EMPLOYEEGRADE_SLAB_AMOUNT"]);
                    RTB_Dateofcreation.Text = Convert.ToString(dt_Details.Rows[0]["JOBREQ_CREATEDDATE"]);
                    JOBREQ_ID = Convert.ToInt32(dt_Details.Rows[0]["JOBREQ_ID"]);
                }
            }
            LoadApplicant(JOBREQ_ID);
            RTB_JobRequistionDescription.Enabled = false;
            RTB_Businessunit.Enabled             = false;
            RTB_RasiedBy.Enabled       = false;
            RTB_Designation.Enabled    = false;
            RTB_Department.Enabled     = false;
            RTB_Dateofcreation.Enabled = false;
        }

        catch (Exception ex)
        {
            SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "frm_JobOffers", ex.StackTrace, DateTime.Now);
            Response.Redirect("~/Frm_ErrorPage.aspx");
            return;
        }
    }
 private void LoadJobRequsitionCode_Edit()
 {
     try
     {
         RCMB_JobRequistion.Items.Clear();
         DataTable DT = new DataTable();
         _obj_Rec_JobRequisition                 = new RECRUITMENT_JOBREQUISITION();
         _obj_Rec_JobRequisition.OPERATION       = operation.Empty1;
         _obj_Rec_JobRequisition.ORGANISATION_ID = Convert.ToInt32(Session["ORG_ID"]);
         DT = Recruitment_BLL.get_JobReqDetails(_obj_Rec_JobRequisition);
         RCMB_JobRequistion.DataSource     = DT;
         RCMB_JobRequistion.DataTextField  = "JOBREQ_REQCODE";
         RCMB_JobRequistion.DataValueField = "JOBREQ_ID";
         RCMB_JobRequistion.DataBind();
         RCMB_JobRequistion.Items.Insert(0, new Telerik.Web.UI.RadComboBoxItem("Select", "-1"));
     }
     catch (Exception ex)
     {
         SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "frm_JobOffers", 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 RCMB_JobRequistion_SelectedIndexChanged(object o, Telerik.Web.UI.RadComboBoxSelectedIndexChangedEventArgs e)
    {
        //_obj_Rec_JobOffers = new RECRUITMENT_JOBOFFERS();
        //_obj_Rec_JobOffers.MODE = 1;
        //_obj_Rec_JobOffers.JOBOFFRS_REQCODE = Convert.ToInt32(RCMB_JobRequistion.SelectedItem.Value);
        //DataTable dt_joboffer = BLL.get_OfferLetterCheck(_obj_Rec_JobOffers);
        //if (Convert.ToInt32(dt_joboffer.Rows[0]["count"]) == 0)
        //{
        try
        {
            RTB_RasiedBy.Text       = string.Empty;
            RTB_Designation.Text    = string.Empty;
            RTB_Dateofcreation.Text = string.Empty;
            RTB_Businessunit.Text   = string.Empty;
            RTB_ApplicantName.Text  = string.Empty;
            RTB_Department.Text     = string.Empty;
            RTB_Directorate.Text    = string.Empty;
            RTB_Scale.Text          = string.Empty;
            // RCMB_Applicant.ClearSelection();
            RTB_JobRequistionDescription.Text = string.Empty;
            //RCMB_JobRequistion.ClearSelection();
            RCB_SalaryStructure.ClearSelection();
            RCMB_leavestructure.ClearSelection();
            RDP_JoinDate.SelectedDate  = null;
            RDP_Offerdate.SelectedDate = null;
            RTB_OfferSalary.Text       = string.Empty;
            RCMB_Applicant.ClearSelection();
            RCMB_Applicant.Items.Clear();
            RCMB_Applicant.Items.Insert(0, new Telerik.Web.UI.RadComboBoxItem("Select", "-1"));

            DataTable dt_Details = new DataTable();
            _obj_Rec_JobRequisition           = new RECRUITMENT_JOBREQUISITION();
            _obj_Rec_JobRequisition.OPERATION = operation.load;
            _obj_Rec_JobRequisition.JOBREQ_ID = Convert.ToInt32(RCMB_JobRequistion.SelectedItem.Value);
            dt_Details = Recruitment_BLL.get_JobReqDetails(_obj_Rec_JobRequisition);
            if (dt_Details.Rows.Count != 0)
            {
                //lbl_id.Text = Convert.ToString(dt_Details.Rows[0]["JOBREQ_ID"]);
                RTB_JobRequistionDescription.Text = Convert.ToString(dt_Details.Rows[0]["JOBREQ_REQNAME"]);
                RTB_Businessunit.Text             = Convert.ToString(dt_Details.Rows[0]["JOBREQ_BUSINESSUNIT_ID"]);
                RTB_RasiedBy.Text       = Convert.ToString(dt_Details.Rows[0]["RASIEDBY"]);
                RTB_Designation.Text    = Convert.ToString(dt_Details.Rows[0]["JOBREQ_DESIGNATION"]);
                RTB_Department.Text     = Convert.ToString(dt_Details.Rows[0]["JOBREQ_DEPARTMENT"]);
                RTB_Dateofcreation.Text = Convert.ToString(dt_Details.Rows[0]["JOBREQ_REQEXPIRY"]);
                RTB_Directorate.Text    = Convert.ToString(dt_Details.Rows[0]["DIRECTORATE_CODE"]);
                RTB_Scale.Text          = Convert.ToString(dt_Details.Rows[0]["EMPLOYEEGRADE_CODE"]);
                RTB_OfferSalary.Text    = Convert.ToString(dt_Details.Rows[0]["EMPLOYEEGRADE_SLAB_AMOUNT"]);
                //RDP_Offerdate.SelectedDate = Convert.ToDateTime(Convert.ToString(dt_Details.Rows[0]["INTREM_JOININGDATE"]));

                JOBREQ_ID = Convert.ToInt32(dt_Details.Rows[0]["JOBREQ_ID"]);
                LoadApplicant(JOBREQ_ID);
            }
            else
            {
                LoadApplicant(JOBREQ_ID);
                job_applicant();
            }
            //}
            //else
            //{

            //    BLL.ShowMessage(this, "Offer Letter already generated");
            //    return;
            //}
        }
        catch (Exception ex)
        {
            SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "frm_JobOffers", ex.StackTrace, DateTime.Now);
            Response.Redirect("~/Frm_ErrorPage.aspx");
            return;
        }
    }