Ejemplo n.º 1
0
    protected void rcmb_BU_SelectedIndexChanged(object o, Telerik.Web.UI.RadComboBoxSelectedIndexChangedEventArgs e)
    {
        try
        {
            if (rcmb_BU.SelectedIndex > 0)
            {
                rcmb_Dept.Items.Clear();
                rcmb_JobReq.Items.Clear();
                _obj_SMHR_Department                 = new SMHR_DEPARTMENT();
                _obj_SMHR_Department.MODE            = 9;
                _obj_SMHR_Department.ORGANISATION_ID = Convert.ToInt32(Session["ORG_ID"].ToString());
                _obj_SMHR_Department.BUID            = Convert.ToInt32(rcmb_BU.SelectedItem.Value);
                DataTable dt_Details = BLL.get_Department(_obj_SMHR_Department);
                if (dt_Details.Rows.Count != 0)
                {
                    rcmb_Dept.DataSource     = dt_Details;
                    rcmb_Dept.DataTextField  = "DEPARTMENT_NAME";
                    rcmb_Dept.DataValueField = "DEPARTMENT_ID";
                    rcmb_Dept.DataBind();
                    rcmb_Dept.Items.Insert(0, new Telerik.Web.UI.RadComboBoxItem("Select"));
                }
                //TO LOAD JOB REQUISITION
                _obj_Rec_AssignEmptoRSL = new RECRUITMENT_ASSIGNEMPTORSL();
                _obj_Rec_AssignEmptoRSL.ASSIGNEMP_BUID  = Convert.ToInt32(rcmb_BU.SelectedItem.Value);
                _obj_Rec_AssignEmptoRSL.ORGANISATION_ID = Convert.ToInt32(Session["ORG_ID"]);
                _obj_Rec_AssignEmptoRSL.MODE            = 4;
                DataTable DT = Recruitment_BLL.get_AssigmEMPtoRSL(_obj_Rec_AssignEmptoRSL);
                if (DT.Rows.Count > 0)
                {
                    rcmb_JobReq.DataSource     = DT;
                    rcmb_JobReq.DataTextField  = "JOBREQ_REQCODE";
                    rcmb_JobReq.DataValueField = "JOBREQ_ID";
                    rcmb_JobReq.DataBind();
                    rcmb_JobReq.Items.Insert(0, new Telerik.Web.UI.RadComboBoxItem("Select"));
                }
            }
            else
            {
                rcmb_Dept.ClearSelection();
                rcmb_Dept.Items.Clear();
                rcmb_Dept.Items.Insert(0, new Telerik.Web.UI.RadComboBoxItem("Select", "0"));

                rcmb_JobReq.ClearSelection();
                rcmb_JobReq.Items.Clear();
                rcmb_JobReq.Items.Insert(0, new Telerik.Web.UI.RadComboBoxItem("Select", "0"));
            }
            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");
        }
    }
Ejemplo n.º 2
0
 protected void lnk_Edit_Command(object sender, CommandEventArgs e)
 {
     try
     {
         RMP_AssignEmpRSL.SelectedIndex = 1;
         btn_Save.Visible    = false;
         btn_Update.Visible  = true;
         rcmb_BU.Enabled     = false;
         rcmb_JobReq.Enabled = false;
         LoadBU();
         _obj_Rec_AssignEmptoRSL = new RECRUITMENT_ASSIGNEMPTORSL();
         _obj_Rec_AssignEmptoRSL.ORGANISATION_ID = Convert.ToInt32(Session["ORG_ID"]);
         _obj_Rec_AssignEmptoRSL.ASSIGNEMP_ID    = Convert.ToInt32(Convert.ToString(e.CommandArgument));
         lbl_id.Text = Convert.ToString(Convert.ToString(e.CommandArgument));
         _obj_Rec_AssignEmptoRSL.MODE = 5;
         DataTable dt = Recruitment_BLL.get_AssigmEMPtoRSL(_obj_Rec_AssignEmptoRSL);
         if (dt.Rows.Count > 0)
         {
             rcmb_BU.SelectedIndex = rcmb_BU.Items.FindItemIndexByValue(Convert.ToString(dt.Rows[0]["BUSINESSUNIT_ID"]));
             rcmb_BU_SelectedIndexChanged(null, null);
             rcmb_Dept.SelectedIndex = rcmb_Dept.Items.FindItemIndexByValue(Convert.ToString(dt.Rows[0]["DEPARTMENT_ID"]));
             //TO LOAD JOB REQUISITION
             rcmb_JobReq.Items.Clear();
             _obj_Rec_AssignEmptoRSL = new RECRUITMENT_ASSIGNEMPTORSL();
             _obj_Rec_AssignEmptoRSL.ASSIGNEMP_BUID  = Convert.ToInt32(rcmb_BU.SelectedItem.Value);
             _obj_Rec_AssignEmptoRSL.ORGANISATION_ID = Convert.ToInt32(Session["ORG_ID"]);
             _obj_Rec_AssignEmptoRSL.MODE            = 6;
             DataTable DT = Recruitment_BLL.get_AssigmEMPtoRSL(_obj_Rec_AssignEmptoRSL);
             if (DT.Rows.Count > 0)
             {
                 rcmb_JobReq.DataSource     = DT;
                 rcmb_JobReq.DataTextField  = "JOBREQ_REQCODE";
                 rcmb_JobReq.DataValueField = "JOBREQ_ID";
                 rcmb_JobReq.DataBind();
                 rcmb_JobReq.Items.Insert(0, new Telerik.Web.UI.RadComboBoxItem("Select"));
             }
             rcmb_JobReq.SelectedIndex = rcmb_JobReq.Items.FindItemIndexByValue(Convert.ToString(dt.Rows[0]["JOBREQ_ID"]));
             rcmb_Dept_SelectedIndexChanged(null, null);
             rcmb_EMP.SelectedIndex = rcmb_EMP.Items.FindItemIndexByValue(Convert.ToString(dt.Rows[0]["EMP_ID"]));
         }
         ViewState["EMP_ID"] = Convert.ToInt32(rcmb_EMP.SelectedItem.Value);
     }
     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");
     }
 }
Ejemplo n.º 3
0
 protected void LoadGrid()
 {
     try
     {
         _obj_Rec_AssignEmptoRSL = new RECRUITMENT_ASSIGNEMPTORSL();
         _obj_Rec_AssignEmptoRSL.ORGANISATION_ID = Convert.ToInt32(Session["ORG_ID"]);
         _obj_Rec_AssignEmptoRSL.LOGIN_ID        = Convert.ToInt32(Session["USER_ID"]);
         _obj_Rec_AssignEmptoRSL.MODE            = 1;
         DataTable dt = Recruitment_BLL.get_AssigmEMPtoRSL(_obj_Rec_AssignEmptoRSL);
         RG_AssignEmpRSL.DataSource = dt;
     }
     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");
     }
 }
    private void LoadJobRequisition()
    {
        try
        {
            ddlJobReqCode.Items.Clear();
            //DataTable dt = new DataTable();
            //_obj_Rec_JobRequisition = new RECRUITMENT_JOBREQUISITION();
            //_obj_Rec_JobRequisition.OPERATION = operation.Empty;
            //_obj_Rec_JobRequisition.ORGANISATION_ID = Convert.ToInt32(Session["ORG_ID"].ToString());
            //dt = Recruitment_BLL.get_JobReqDetails(_obj_Rec_JobRequisition);
            //ddlJobReqCode.DataSource = dt;
            //ddlJobReqCode.DataTextField = "JOBREQ_REQCODE";
            //ddlJobReqCode.DataValueField = "JOBREQ_ID";
            //ddlJobReqCode.DataBind();
            //ddlJobReqCode.Items.Insert(0, new Telerik.Web.UI.RadComboBoxItem("Select", "-1"));

            //TO LOAD JOB REQUISITION, 31.07.2012
            _obj_Rec_AssignEmptoRSL = new RECRUITMENT_ASSIGNEMPTORSL();
            _obj_Rec_AssignEmptoRSL.ASSIGNEMP_EMP_ID = Convert.ToInt32(Session["EMP_ID"]);
            _obj_Rec_AssignEmptoRSL.ORGANISATION_ID  = Convert.ToInt32(Session["ORG_ID"]);
            _obj_Rec_AssignEmptoRSL.MODE             = 7;
            DataTable DT = Recruitment_BLL.get_AssigmEMPtoRSL(_obj_Rec_AssignEmptoRSL);
            if (DT.Rows.Count > 0)
            {
                ddlJobReqCode.DataSource     = DT;
                ddlJobReqCode.DataTextField  = "JOBREQ_REQCODE";
                ddlJobReqCode.DataValueField = "JOBREQ_ID";
                ddlJobReqCode.DataBind();
                ddlJobReqCode.Items.Insert(0, new Telerik.Web.UI.RadComboBoxItem("Select"));
            }
        }
        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;
        }
    }