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 rcmb_Dept_SelectedIndexChanged(object o, Telerik.Web.UI.RadComboBoxSelectedIndexChangedEventArgs e)
 {
     try
     {
         if (rcmb_Dept.SelectedIndex > 0)
         {
             rcmb_EMP.Items.Clear();
             _obj_Rec_JobRequisition = new RECRUITMENT_JOBREQUISITION();
             _obj_Rec_JobRequisition.JOBREQ_DEPARTMENT = Convert.ToInt32(rcmb_Dept.SelectedItem.Value);
             _obj_Rec_JobRequisition.ORGANISATION_ID   = Convert.ToInt32(Session["ORG_ID"]);
             _obj_Rec_JobRequisition.MODE = 16;
             DataTable dt = Recruitment_BLL.get_JobRequisition(_obj_Rec_JobRequisition);
             if (dt.Rows.Count > 0)
             {
                 rcmb_EMP.DataSource     = dt;
                 rcmb_EMP.DataTextField  = "EMP_NAME";
                 rcmb_EMP.DataValueField = "EMP_ID";
                 rcmb_EMP.DataBind();
                 rcmb_EMP.Items.Insert(0, new Telerik.Web.UI.RadComboBoxItem("Select"));
             }
         }
         else
         {
             rcmb_EMP.ClearSelection();
             rcmb_EMP.Items.Clear();
             rcmb_EMP.Items.Insert(0, new Telerik.Web.UI.RadComboBoxItem("Select", "0"));
         }
     }
     catch (Exception ex)
     {
         SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "AssignEmpRSL", 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 Page_Load(object sender, EventArgs e)
 {
     try
     {
         if (!Page.IsPostBack)
         {
             _obj_Rec_JobRequisition = new RECRUITMENT_JOBREQUISITION();
             if (Request.QueryString["JOBREQ_ID"] != null)
             {
                 _obj_Rec_JobRequisition.JOBREQ_ID = Convert.ToInt32(Convert.ToString(Request.QueryString["JOBREQ_ID"]));
             }
             else
             {
                 _obj_Rec_JobRequisition.JOBREQ_ID = 0;
             }
             _obj_Rec_JobRequisition.ORGANISATION_ID = Convert.ToInt32(Session["ORG_ID"]);
             _obj_Rec_JobRequisition.MODE            = 26;
             DataTable dt = Recruitment_BLL.get_JobRequisition(_obj_Rec_JobRequisition);
             if (dt.Rows.Count > 0)
             {
                 lbl_BU_Value.Text          = Convert.ToString(dt.Rows[0]["BUSINESSUNIT_CODE"]);
                 lbl_Dept_Value.Text        = Convert.ToString(dt.Rows[0]["DEPARTMENT_NAME"]);
                 lbl_Desg_Value.Text        = Convert.ToString(dt.Rows[0]["POSITIONS_CODE"]);
                 lbl_Level_Value.Text       = Convert.ToString(dt.Rows[0]["EMPLOYEEGRADE_CODE"]);
                 lbl_EmpType_Value.Text     = Convert.ToString(dt.Rows[0]["EMPLOYEETYPE_CODE"]);
                 lbl_CTC_Value.Text         = Convert.ToString(dt.Rows[0]["EMPLOYEEGRADE_SLAB_AMOUNT"]);
                 lbl_Directorate_Value.Text = Convert.ToString(dt.Rows[0]["DIRECTORATE_CODE"]);
             }
             else
             {
                 lbl_BU_Value.Text          = string.Empty;
                 lbl_Dept_Value.Text        = string.Empty;
                 lbl_Desg_Value.Text        = string.Empty;
                 lbl_Level_Value.Text       = string.Empty;
                 lbl_EmpType_Value.Text     = string.Empty;
                 lbl_CTC_Value.Text         = string.Empty;
                 lbl_Directorate.Text       = string.Empty;
                 lbl_Directorate_Value.Text = string.Empty;
             }
         }
     }
     catch (Exception ex)
     {
         SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "frm_JobReqDetails", ex.StackTrace, DateTime.Now);
         Response.Redirect("~/Frm_ErrorPage.aspx");
     }
 }
    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;
        }
    }
示例#8
0
    private void LoadJobRequest()
    {
        try
        {
            _obj_Rec_JobRequisition = new RECRUITMENT_JOBREQUISITION();

            _obj_Rec_JobRequisition.MODE = 1;
            Rcb_JobReq.DataSource        = Recruitment_BLL.get_JobRequisition(_obj_Rec_JobRequisition);

            Rcb_JobReq.DataTextField  = "JOBREQ_REQCODE";
            Rcb_JobReq.DataValueField = "JOBREQ_ID";
            Rcb_JobReq.DataBind();
            Rcb_JobReq.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");
        }
    }
 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");
     }
 }
示例#10
0
    protected void LoadJobRequisition()
    {
        try
        {
            _obj_recruitment_jobrequisition      = new RECRUITMENT_JOBREQUISITION();
            _obj_recruitment_jobrequisition.MODE = 12;
            _obj_recruitment_jobrequisition.JOBREQ_ORGANISATION_ID = Convert.ToInt32(Session["ORG_ID"].ToString());
            _obj_recruitment_jobrequisition.JOBREQ_BUSINESSUNIT_ID = Convert.ToInt32(Rcb_BusinessUnit.SelectedItem.Value);

            DataTable dt = Recruitment_BLL.get_JobRequisition(_obj_recruitment_jobrequisition);
            if (dt.Rows.Count > 0)
            {
                rcmb_RscReq.DataSource     = dt;
                rcmb_RscReq.DataValueField = "JOBREQ_ID";
                rcmb_RscReq.DataTextField  = "JOBREQ_REQCODE";
                rcmb_RscReq.DataBind();
            }
            rcmb_RscReq.Items.Insert(0, new RadComboBoxItem("Select", "0"));

            //_obj_recruitment_jobrequisition.MODE = 1;
            //_obj_recruitment_jobrequisition.JOBREQ_ORGANISATION_ID = Convert.ToInt32(Session["ORG_ID"]);

            //DataTable dtJobRec = Recruitment_BLL.Get_Job_Requistion_Dropdown(_obj_recruitment_jobrequisition);

            //if (dtJobRec.Rows.Count > 0)
            //{
            //    rcmb_RscReq.DataSource = dtJobRec;
            //    rcmb_RscReq.DataTextField = "JOBREQ_REQCODE";
            //    rcmb_RscReq.DataValueField = "JOBREQ_ID";
            //    rcmb_RscReq.DataBind();
            //}
            //rcmb_RscReq.Items.Insert(0, new RadComboBoxItem("Select"));
        }
        catch (Exception ex)
        {
            SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "frm_RecruitmentCost", 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;
        }
    }
示例#13
0
    protected void btn_JRReject_Click(object sender, EventArgs e)
    {
        try
        {
            if (RG_JRApproval.Items.Count == 0)
            {
                BLL.ShowMessage(this, "No Records to Reject");
                return;
            }
            CheckBox chkBoxt = new CheckBox();
            Label    lblID   = new Label();
            string   strg    = "";
            for (int index = 0; index <= RG_JRApproval.Items.Count - 1; index++)
            {
                chkBoxt = RG_JRApproval.Items[index].FindControl("chk_Choose") as CheckBox;
                lblID   = RG_JRApproval.Items[index].FindControl("lbljrID") as Label;
                if (chkBoxt.Checked)
                {
                    if (strg == "")
                    {
                        strg = "" + lblID.Text + "";
                    }
                    else
                    {
                        strg = strg + "," + lblID.Text + "";
                    }
                }
            }

            if (string.IsNullOrEmpty(strg))
            {
                BLL.ShowMessage(this, "Please Select Atleast one Record to Reject");
                return;
            }
            CheckBox chkBox    = new CheckBox();
            Label    lblempid  = new Label();
            Label    lblstatus = new Label();
            Label    lblJRID   = new Label();
            bool     status1   = false;
            string   str       = string.Empty;
            for (int index = 0; index <= RG_JRApproval.Items.Count - 1; index++)
            {
                chkBox    = RG_JRApproval.Items[index].FindControl("chk_Choose") as CheckBox;
                lblempid  = RG_JRApproval.Items[index].FindControl("lblempID") as Label;
                lblstatus = RG_JRApproval.Items[index].FindControl("lbljrstatus") as Label;
                lblJRID   = RG_JRApproval.Items[index].FindControl("lbljrID") as Label;
                if (chkBox.Checked)
                {
                    if (Convert.ToString(lblstatus.Text) == "PENDING")
                    {
                        bool status = false;
                        _obj_Rec_JobRequisition = new RECRUITMENT_JOBREQUISITION();
                        _obj_Rec_JobRequisition.JOBREQ_APPROVALSTATUS = 4;
                        _obj_Rec_JobRequisition.JOBREQ_LEVEL          = 1; //Rejection level 1
                        _obj_Rec_JobRequisition.JOBREQ_APPROVEDBY     = Convert.ToInt32(Session["USER_ID"]);
                        _obj_Rec_JobRequisition.JOBREQ_APPROVEDDATE   = Convert.ToDateTime(rdp_JRApprovalDate.SelectedDate.Value);
                        _obj_Rec_JobRequisition.LASTMDFBY             = Convert.ToInt32(Session["USER_ID"]);;
                        _obj_Rec_JobRequisition.LASTMDFDATE           = DateTime.Now;
                        _obj_Rec_JobRequisition.JOBREQ_ID             = Convert.ToInt32(lblJRID.Text);
                        _obj_Rec_JobRequisition.OPERATION             = operation.Check1;

                        status = Recruitment_BLL.set_JobRequisition(_obj_Rec_JobRequisition);
                        if (status == true)
                        {
                            //BLL.ShowMessage(this, " selected Job Requisition Rejected by Approver1");

                            /*
                             * if (Convert.ToString(RG_JRApproval.Items[index]["APPROVAR1_EMAIL"].Text) != string.Empty && Convert.ToString(RG_JRApproval.Items[index]["EMAIL"].Text) != string.Empty)
                             * {
                             *  sendMail(Convert.ToString(RG_JRApproval.Items[index]["APPROVER1_EMAIL"].Text), Convert.ToString(RG_JRApproval.Items[index]["EMAIL"].Text),
                             *      Convert.ToString(RG_JRApproval.Items[index]["EMPNAME_APPROVER1"].Text), Convert.ToString(RG_JRApproval.Items[index]["EMPNAME"].Text),
                             *      Convert.ToString(RG_JRApproval.Items[index]["JOBREQ_REQCODE"].Text), "Rejected");
                             *  status1 = true;
                             *  str = "Approver1";
                             * }
                             */

                            //SMHR_LOGININFO _obj_Smhr_LoginInfo = new SMHR_LOGININFO();
                            //_obj_Smhr_LoginInfo.OPERATION = operation.Empty1;
                            //_obj_Smhr_LoginInfo.LOGIN_USERNAME = Convert.ToString(Session["EMP_ID"]).Trim();
                            //_obj_Smhr_LoginInfo.ORGANISATION_ID = Convert.ToInt32(Session["ORG_ID"]);
                            //_obj_Rec_JobRequisition = new RECRUITMENT_JOBREQUISITION();
                            _obj_Rec_JobRequisition.JOBREQ_ORGANISATION_ID = Convert.ToInt32(Session["ORG_ID"]);
                            _obj_Rec_JobRequisition.JOBREQ_RAISEDBY        = Convert.ToInt32(Session["USER_ID"]);
                            //_obj_Rec_JobRequisition.JOBREQ_ID = Convert.ToInt32(lblJRID.Text);
                            _obj_Rec_JobRequisition.MODE = 1;
                            bool status2 = Recruitment_BLL.get_JobReqAprover(_obj_Rec_JobRequisition);
                            if (status2)
                            {
                                BLL.ShowMessage(this, "A Mail has been sent to the user");
                            }
                            //BLL.ShowMessage(this, "A Mail has been sent to the user");

                            //LoadData();
                            //RG_JRApproval.DataBind();

                            //return;
                        }
                    }
                    else if (Convert.ToString(lblstatus.Text) == "APPROVED1")
                    {
                        bool status = false;
                        _obj_Rec_JobRequisition = new RECRUITMENT_JOBREQUISITION();
                        _obj_Rec_JobRequisition.JOBREQ_APPROVALSTATUS = 4;
                        _obj_Rec_JobRequisition.JOBREQ_LEVEL          = 2; //Rejection level 2
                        _obj_Rec_JobRequisition.JOBREQ_APPROVEDBY     = Convert.ToInt32(Session["USER_ID"]);
                        _obj_Rec_JobRequisition.JOBREQ_APPROVEDDATE   = Convert.ToDateTime(rdp_JRApprovalDate.SelectedDate.Value);
                        _obj_Rec_JobRequisition.LASTMDFBY             = Convert.ToInt32(Session["USER_ID"]);
                        _obj_Rec_JobRequisition.LASTMDFDATE           = DateTime.Now;
                        _obj_Rec_JobRequisition.JOBREQ_ID             = Convert.ToInt32(lblJRID.Text);
                        _obj_Rec_JobRequisition.OPERATION             = operation.Check1;

                        status = Recruitment_BLL.set_JobRequisition(_obj_Rec_JobRequisition);
                        if (status == true)
                        {
                            //BLL.ShowMessage(this, " selected Job Requisition Rejected by Approver2 ");

                            /*
                             * if (Convert.ToString(RG_JRApproval.Items[index]["APPROVAR2_EMAIL"].Text) != string.Empty && Convert.ToString(RG_JRApproval.Items[index]["EMAIL"].Text) != string.Empty)
                             * {
                             *  sendMail(Convert.ToString(RG_JRApproval.Items[index]["APPROVER2_EMAIL"].Text), Convert.ToString(RG_JRApproval.Items[index]["EMAIL"].Text),
                             *      Convert.ToString(RG_JRApproval.Items[index]["EMPNAME_APPROVER2"].Text), Convert.ToString(RG_JRApproval.Items[index]["EMPNAME"].Text),
                             *      Convert.ToString(RG_JRApproval.Items[index]["JOBREQ_REQCODE"].Text), "Rejected");
                             *  status1 = true;
                             *  str = "Approver2";
                             * }
                             */

                            //_obj_Rec_JobRequisition = new RECRUITMENT_JOBREQUISITION();
                            _obj_Rec_JobRequisition.JOBREQ_ORGANISATION_ID = Convert.ToInt32(Session["ORG_ID"]);
                            _obj_Rec_JobRequisition.JOBREQ_RAISEDBY        = Convert.ToInt32(Session["USER_ID"]);
                            _obj_Rec_JobRequisition.MODE = 1;
                            bool status2 = Recruitment_BLL.get_JobReqAprover(_obj_Rec_JobRequisition);
                            if (status2)
                            {
                                BLL.ShowMessage(this, "A Mail has been sent to the user");
                            }
                            //LoadData();
                            //RG_JRApproval.DataBind();

                            //return;
                        }
                    }
                    else if (Convert.ToString(lblstatus.Text) == "APPROVED2")
                    {
                        bool status = false;
                        _obj_Rec_JobRequisition = new RECRUITMENT_JOBREQUISITION();
                        _obj_Rec_JobRequisition.JOBREQ_APPROVALSTATUS = 4;
                        _obj_Rec_JobRequisition.JOBREQ_LEVEL          = 3; //Rejection level 3
                        _obj_Rec_JobRequisition.JOBREQ_APPROVEDBY     = Convert.ToInt32(Session["USER_ID"]);
                        _obj_Rec_JobRequisition.JOBREQ_APPROVEDDATE   = Convert.ToDateTime(rdp_JRApprovalDate.SelectedDate.Value);
                        _obj_Rec_JobRequisition.LASTMDFBY             = Convert.ToInt32(Session["USER_ID"]);;
                        _obj_Rec_JobRequisition.LASTMDFDATE           = DateTime.Now;
                        _obj_Rec_JobRequisition.JOBREQ_ID             = Convert.ToInt32(lblJRID.Text);
                        _obj_Rec_JobRequisition.OPERATION             = operation.Check1;

                        status = Recruitment_BLL.set_JobRequisition(_obj_Rec_JobRequisition);
                        if (status == true)
                        {
                            //BLL.ShowMessage(this, " selected Job Requisition Rejected by Approver3 ");

                            /*
                             * if (Convert.ToString(RG_JRApproval.Items[index]["APPROVER3_EMAIL"].Text) != string.Empty && Convert.ToString(RG_JRApproval.Items[index]["EMAIL"].Text) != string.Empty)
                             * {
                             *  sendMail(Convert.ToString(RG_JRApproval.Items[index]["APPROVER3_EMAIL"].Text), Convert.ToString(RG_JRApproval.Items[index]["EMAIL"].Text),
                             *      Convert.ToString(RG_JRApproval.Items[index]["EMPNAME_APPROVER3"].Text), Convert.ToString(RG_JRApproval.Items[index]["EMPNAME"].Text),
                             *      Convert.ToString(RG_JRApproval.Items[index]["JOBREQ_REQCODE"].Text), "Rejected");
                             *  status1 = true;
                             *  str = "Approver3";
                             * }
                             */

                            //_obj_Rec_JobRequisition = new RECRUITMENT_JOBREQUISITION();
                            _obj_Rec_JobRequisition.JOBREQ_ORGANISATION_ID = Convert.ToInt32(Session["ORG_ID"]);
                            _obj_Rec_JobRequisition.JOBREQ_RAISEDBY        = Convert.ToInt32(Session["USER_ID"]);
                            _obj_Rec_JobRequisition.MODE = 1;
                            bool status2 = Recruitment_BLL.get_JobReqAprover(_obj_Rec_JobRequisition);
                            if (status2)
                            {
                                BLL.ShowMessage(this, "A Mail has been sent to the user");
                            }
                            //LoadData();
                            //RG_JRApproval.DataBind();

                            //return;
                        }
                    }
                }
            }
            LoadData();
            RG_JRApproval.DataBind();
        }
        catch (Exception ex)
        {
            SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "frm_JobRequisitionApproval", ex.StackTrace, DateTime.Now);
            Response.Redirect("~/Frm_ErrorPage.aspx");
        }
    }