protected void rtp_endtime_SelectedDateChanged(object sender, Telerik.Web.UI.Calendar.SelectedDateChangedEventArgs e)
    {
        try
        {
            DateTime strttime = new DateTime();
            DateTime endtime  = new DateTime();

            if (rtp_starttime.SelectedDate.HasValue)
            {
                strttime = rtp_starttime.SelectedDate.Value;
                endtime  = rtp_endtime.SelectedDate.Value;
                if (endtime >= strttime)
                {
                    TimeSpan dur = endtime.Subtract(strttime);
                    rtxt_duration.Text = Convert.ToString(dur.TotalHours);
                }
                else
                {
                    Pms_Bll.ShowMessage(this, "End Time Should Be Greater Start Time");
                    rtp_endtime.SelectedDate = null;
                }
            }
            else
            {
                Pms_Bll.ShowMessage(this, "Please Select Start Time");
            }
        }
        catch (Exception ex)
        {
            SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "frm_TrainingSchedule", ex.StackTrace, DateTime.Now);
            Response.Redirect("~/Frm_ErrorPage.aspx");
        }
    }
    //protected void btn_ok_id_Click(object sender, EventArgs e)
    //{
    //    DateTime strt = rdtp_strtdate.SelectedDate.Value;
    //    string s = strt.Day.ToString();

    //    lbl_StartDate.Text = s;

    //    DateTime strt1 = rdtp_strtdate.SelectedDate.Value;
    // string i=   strt1.Month.ToString();

    //}
    protected void rdtp_enddate_SelectedDateChanged(object sender, Telerik.Web.UI.Calendar.SelectedDateChangedEventArgs e)
    {
        try
        {
            if (rdtp_strtdate.SelectedDate.HasValue)
            {
                DateTime strtdate = rdtp_strtdate.SelectedDate.Value;

                DateTime enddate = rdtp_enddate.SelectedDate.Value;
                if (enddate < strtdate)
                {
                    Pms_Bll.ShowMessage(this, "End Date Should Be Greater Start Date");
                    rdtp_enddate.SelectedDate = null;
                }
            }
            else
            {
                Pms_Bll.ShowMessage(this, "Please Enter Start Date");
                rdtp_enddate.SelectedDate = null;
            }
        }
        catch (Exception ex)
        {
            SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "frm_TrainingSchedule", ex.StackTrace, DateTime.Now);
            Response.Redirect("~/Frm_ErrorPage.aspx");
        }
    }
    protected void loadAppCycleGoal()
    {
        try
        {
            _obj_Pms_Appraisalcycle                  = new PMS_Appraisalcycle();
            _obj_Pms_Appraisalcycle.OPERATION        = operation.Empty;
            _obj_Pms_Appraisalcycle.MODE             = 8;
            _obj_Pms_Appraisalcycle.APPRCYCLE_BU_ID  = Convert.ToInt32(rcmb_BusinessUnitGoal.SelectedItem.Value);
            _obj_Pms_Appraisalcycle.APPRCYCLE_ORG_ID = Convert.ToInt32(Session["org_id"]);
            DataTable DT_AppraisalCycle = new DataTable();
            DT_AppraisalCycle = Pms_Bll.get_Appraisalcycle(_obj_Pms_Appraisalcycle);
            if (DT_AppraisalCycle.Rows.Count != 0)
            {
                RCB_AppraisalCycleGoal.DataSource     = DT_AppraisalCycle;
                RCB_AppraisalCycleGoal.DataTextField  = "APPRCYCLE_NAME";
                RCB_AppraisalCycleGoal.DataValueField = "APPRCYCLE_ID";
                RCB_AppraisalCycleGoal.DataBind();
                RCB_AppraisalCycleGoal.Items.Insert(0, new Telerik.Web.UI.RadComboBoxItem("Select", "0"));
            }
            else
            {
                DataTable dt1 = new DataTable();
                RCB_AppraisalCycleGoal.DataSource = dt1;

                RCB_AppraisalCycleGoal.DataBind();
                RCB_AppraisalCycleGoal.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("'", "''"), "frm_Pms_Reports", ex.StackTrace, DateTime.Now);
            Response.Redirect("~/Frm_ErrorPage.aspx");
        }
    }
Example #4
0
    protected void LoadGrid()
    {
        try
        {
            _obj_Pms_EmpSetup      = new PMS_EMPSETUP();
            _obj_Pms_EmpSetup.Mode = 1;

            DataTable dt = Pms_Bll.get_EmpSetup(_obj_Pms_EmpSetup);
            if (dt.Rows.Count != 0)
            {
                Rg_EmpSetup.DataSource = dt;

                Rg_EmpSetup.DataBind();
            }
            else
            {
                DataTable dt1 = new DataTable();

                Rg_EmpSetup.DataSource = dt1;

                Rg_EmpSetup.DataBind();
            }
        }
        catch (Exception ex)
        {
            SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "frm_Pms_EmpSetup", ex.StackTrace, DateTime.Now);
            Response.Redirect("~/Frm_ErrorPage.aspx");
            Pms_Bll.ShowMessage(this, ex.Message.ToString());
            return;
        }
    }
    /// <summary>
    ///In This Data Binding From Database To Datatable Binding to Radgrid
    /// </summary>
    /// <param name="source"></param>
    /// <param name="e"></param>

    protected void LoadGrid()
    {
        try
        {
            _obj_Pms_Task             = new SPMS_TASK();
            _obj_Pms_Task.Mode        = 1;
            _obj_Pms_Task.TASK_ORG_ID = Convert.ToInt32(Session["ORG_ID"]);
            DataTable dt = Pms_Bll.get_Task(_obj_Pms_Task);
            if (dt.Rows.Count != 0)
            {
                Rg_Task.DataSource = dt;
                Rg_Task.DataBind();
            }
            else
            {
                DataTable dt1 = new DataTable();
                Rg_Task.DataSource = dt1;
                Rg_Task.DataBind();
            }
        }
        catch (Exception ex)
        {
            //Pms_Bll.ShowMessage(this, ex.Message.ToString());
            //return;
            SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "frm_PmsTask", ex.StackTrace, DateTime.Now);
            Response.Redirect("~/Frm_ErrorPage.aspx");
        }
    }
    protected void loadgrid()
    {
        try
        {
            _obj_idp                     = new pms_IDPSCREEN();
            _obj_idp.IDP_MODE            = 11;
            _obj_idp.IDP_ORGANISATION_ID = Convert.ToInt32(Session["ORG_ID"]);
            _obj_idp.LOGIN_ID            = Convert.ToInt32(Session["USER_ID"]);
            DataTable dt = Pms_Bll.get_idp(_obj_idp);
            if (dt.Rows.Count != 0)
            {
                RG_VALUESform.DataSource = dt;
                RG_VALUESform.DataBind();
            }
            else
            {
                DataTable dt1 = new DataTable();
                RG_VALUESform.DataSource = dt1;
            }
        }

        catch (Exception ex)
        {
            SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "frm_Valuesform", ex.StackTrace, DateTime.Now);
            Response.Redirect("~/Frm_ErrorPage.aspx");
        }
    }
    protected void RG_Appraisalcycle_NeedDataSource(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
    {
        try
        {
            _obj_Pms_Appraisalcycle                  = new PMS_Appraisalcycle();
            _obj_Pms_Appraisalcycle.MODE             = 1;
            _obj_Pms_Appraisalcycle.APPRCYCLE_ORG_ID = Convert.ToInt32(Session["org_id"]);
            DataTable dt = Pms_Bll.get_Appraisalcycle(_obj_Pms_Appraisalcycle);
            if (dt.Rows.Count != 0)
            {
                RG_Appraisalcycle.DataSource = dt;
            }

            else
            {
                DataTable dt_Details = new DataTable();
                RG_Appraisalcycle.DataSource = dt_Details;
            }
        }

        catch (Exception ex)
        {
            SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "frm_PmsAppraisalCycle", ex.StackTrace, DateTime.Now);
            Response.Redirect("~/Frm_ErrorPage.aspx");
        }
    }
    protected void loadgrid()
    {
        try
        {
            _obj_cmp            = new PMS_CMP();
            _obj_cmp.OPERATION  = operation.Select;
            _obj_cmp.CMP_ORG_ID = Convert.ToInt32(Session["ORG_ID"]);
            _obj_cmp.LOGIN_ID   = Convert.ToInt32(Session["USER_ID"]);

            DataTable dt = Pms_Bll.get_cmp(_obj_cmp);
            if (dt.Rows.Count != 0)
            {
                RG_CMPform.DataSource = dt;
                RG_CMPform.DataBind();
            }
            else
            {
                DataTable dt1 = new DataTable();

                RG_CMPform.DataSource = dt1;
            }
        }

        catch (Exception ex)
        {
            SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "frm_CMPform", ex.StackTrace, DateTime.Now);
            Response.Redirect("~/Frm_ErrorPage.aspx");
        }
    }
Example #9
0
    protected void loadgrid()
    {
        try
        {
            _obj_kra            = new pms_kraform();
            _obj_kra.KRA_MODE   = 1;
            _obj_kra.KRA_ORG_ID = Convert.ToInt32(Session["ORG_ID"]);
            _obj_kra.LOGIN_ID   = Convert.ToInt32(Session["USER_ID"]);
            DataTable dt = Pms_Bll.get_kra(_obj_kra);
            if (dt.Rows.Count != 0)
            {
                RG_kraform.DataSource = dt;
                RG_kraform.DataBind();
            }
            else
            {
                DataTable dt1 = new DataTable();

                RG_kraform.DataSource = dt1;

                RG_kraform.DataBind();
            }
        }

        catch (Exception ex)
        {
            SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "frm_Mgr_Kra", ex.StackTrace, DateTime.Now);
            Response.Redirect("~/Frm_ErrorPage.aspx");
        }
    }
Example #10
0
    private void LoadAppraisalCycle()
    {
        try
        {
            rtxt_AppraisalCycle.ClearSelection();
            rtxt_AppraisalCycle.Items.Clear();
            rtxt_AppraisalCycle.Items.Insert(0, new Telerik.Web.UI.RadComboBoxItem("Select", "0"));

            _obj_Pms_Appraisalcycle                  = new PMS_Appraisalcycle();
            _obj_Pms_Appraisalcycle.MODE             = 9;
            _obj_Pms_Appraisalcycle.APPRCYCLE_BU_ID  = Convert.ToInt32(rcmb_BU.SelectedItem.Value);
            _obj_Pms_Appraisalcycle.APPRCYCLE_ORG_ID = Convert.ToInt32(Session["org_id"]);
            DataTable DT_AppraisalCycle = new DataTable();
            DT_AppraisalCycle = Pms_Bll.get_Appraisalcycle(_obj_Pms_Appraisalcycle);
            if (DT_AppraisalCycle.Rows.Count != 0)
            {
                rtxt_AppraisalCycle.Items.Clear();
                rtxt_AppraisalCycle.DataSource     = DT_AppraisalCycle;
                rtxt_AppraisalCycle.DataTextField  = "APPRCYCLE_NAME";
                rtxt_AppraisalCycle.DataValueField = "APPRCYCLE_ID";
                rtxt_AppraisalCycle.DataBind();
                rtxt_AppraisalCycle.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("'", "''"), "frm_PmsAppraisalnew", ex.StackTrace, DateTime.Now);
            Response.Redirect("~/Frm_ErrorPage.aspx");
        }
    }
    protected void LoadGrid()
    {
        try
        {
            _obj_Pms_Project                = new SPMS_PROJECT();
            _obj_Pms_Project.Mode           = 1;
            _obj_Pms_Project.PROJECT_ORG_ID = Convert.ToInt32(Session["ORG_ID"]);
            DataTable dt = Pms_Bll.get_Project(_obj_Pms_Project);
            if (dt.Rows.Count != 0)
            {
                Rg_Project.DataSource = dt;

                Rg_Project.DataBind();
            }
            else
            {
                DataTable dt1 = new DataTable();

                Rg_Project.DataSource = dt1;

                Rg_Project.DataBind();
            }
        }

        catch (Exception ex)
        {
            SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "frm_Project", ex.StackTrace, DateTime.Now);
            Response.Redirect("~/Frm_ErrorPage.aspx");
        }
    }
    protected void rcmb_BUI_SelectedIndexChanged(object o, RadComboBoxSelectedIndexChangedEventArgs e)
    {
        try
        {
            if (rcmb_BUI.SelectedItem.Text.Trim() != "Select")
            {
                LoadEmployees();
            }
            else
            {
                Pms_Bll.ShowMessage(this, "Please Select Businessunit");
                DataTable dt_Details = new DataTable();
                rcm_employee.DataSource = dt_Details;

                rcm_employee.DataBind();
                rcm_employee.Items.Insert(0, new RadComboBoxItem("Select"));

                return;
            }
        }

        catch (Exception ex)
        {
            SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "DOWNLOADESI", ex.StackTrace, DateTime.Now);
            Response.Redirect("~/Frm_ErrorPage.aspx");
        }
    }
Example #13
0
    protected void btn_update_Click(object sender, EventArgs e)
    {
        try
        {
            _obj_Pms_EmpSetup = new PMS_EMPSETUP();

            _obj_Pms_EmpSetup.EMP_SETUP_ID          = Convert.ToInt32(lbl_Emp_Setup_Id.Text);
            _obj_Pms_EmpSetup.BU_ID                 = Convert.ToInt32(rcmb_BusinessUnitType.SelectedItem.Value);
            _obj_Pms_EmpSetup.EMP_ID                = Convert.ToInt32(rcmb_EmployeeType.SelectedItem.Value);
            _obj_Pms_EmpSetup.REPORTINGMGR_ID       = Convert.ToInt32(rcmb_ReportingMgrType.SelectedItem.Value);
            _obj_Pms_EmpSetup.GENERALMGR_ID         = Convert.ToInt32(rcmb_GeneralMgrType.SelectedItem.Value);
            _obj_Pms_EmpSetup.EMP_SETUP_LASTMDFBY   = 1; // ### Need to Get the Session
            _obj_Pms_EmpSetup.EMP_SETUP_LASTMDFDATE = DateTime.Now;
            _obj_Pms_EmpSetup.Mode = 20;
            bool status = Pms_Bll.set_EmpSetup(_obj_Pms_EmpSetup);
            if (status == true)
            {
                Pms_Bll.ShowMessage(this, "Record Updated Successfully");
                LoadGrid();
                btn_Save.Visible = true;
                Rm_EMPSETUP_PAGE.SelectedIndex = 0;
                return;
            }
        }
        catch (Exception ex)
        {
            SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "frm_Pms_EmpSetup", ex.StackTrace, DateTime.Now);
            Response.Redirect("~/Frm_ErrorPage.aspx");
        }
    }
Example #14
0
    protected void LoadGrid()
    {
        try
        {
            _obj_Smhr_Ax.Mode           = 1;
            _obj_Smhr_Ax.SMHR_AX_ORG_ID = Convert.ToInt32(Session["ORG_ID"]);
            _obj_Smhr_Ax.LOGIN_ID       = Convert.ToInt32(Session["USER_ID"]);
            DataTable dt = Pms_Bll.get_Smhr_Ax(_obj_Smhr_Ax);
            if (dt.Rows.Count != 0)
            {
                Rg_AXINTEGRATION.DataSource = dt;

                Rg_AXINTEGRATION.DataBind();
            }
            else
            {
                DataTable dt1 = new DataTable();

                Rg_AXINTEGRATION.DataSource = dt1;

                Rg_AXINTEGRATION.DataBind();
            }
        }
        catch (Exception ex)
        {
            SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "SMHR_AX", ex.StackTrace, DateTime.Now);
            Response.Redirect("~/Frm_ErrorPage.aspx");
            Pms_Bll.ShowMessage(this, ex.Message.ToString());
            return;
        }
    }
Example #15
0
 private void LoadReportManager()
 {
     try
     {
         rcmb_RptEmp.Items.Clear();
         _obj_Spms_Appraisal      = new SPMS_APPRAISAL();
         _obj_Spms_Appraisal.Mode = 1;
         _obj_Spms_Appraisal.BUID = Convert.ToInt32(rcmb_BusinessUnit.SelectedItem.Value);
         _obj_Spms_Appraisal.APPRAISAL_ORGANISATION_ID = Convert.ToInt32(Session["ORG_ID"]);
         DataTable dt_manager = Pms_Bll.get_EmpRatingDetails(_obj_Spms_Appraisal);
         if (dt_manager.Rows.Count != 0)
         {
             rcmb_RptEmp.DataSource     = dt_manager;
             rcmb_RptEmp.DataTextField  = "MANAGER";
             rcmb_RptEmp.DataValueField = "REPORTINGMGR_ID";
             rcmb_RptEmp.DataBind();
             rcmb_RptEmp.Items.Insert(0, new RadComboBoxItem("All"));
         }
         else
         {
             DataTable dt5 = new DataTable();
             rcmb_RptEmp.DataSource = dt5;
             rcmb_RptEmp.DataBind();
             rcmb_RptEmp.Items.Insert(0, new RadComboBoxItem("All"));
         }
     }
     catch (Exception ex)
     {
         SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "Pms_AppraisalDone", ex.StackTrace, DateTime.Now);
         Response.Redirect("~/Frm_ErrorPage.aspx");
     }
 }
    protected void rcmb_EmployeeType_SelectedIndexChanged(object o, Telerik.Web.UI.RadComboBoxSelectedIndexChangedEventArgs e)
    {
        try
        {
            if (rcmb_EmployeeType.SelectedItem.Text != "Select")
            {
                LoadGoal();
                //LoadAppraisalCycle();
            }

            else
            {
                Pms_Bll.ShowMessage(this, "Please Select Employee");
                DataTable dt33 = new DataTable();
                rcmb_GoalType.DataSource = dt33;
                rcmb_GoalType.DataBind();
                rcmb_GoalType.Items.Insert(0, new Telerik.Web.UI.RadComboBoxItem("Select", "0"));
                //rcm_apprcycle.DataSource = dt33;
                //rcm_apprcycle.DataBind();
                //rcm_apprcycle.Items.Insert(0, new Telerik.Web.UI.RadComboBoxItem("Select", "0"));
            }
        }
        catch (Exception ex)
        {
            //Pms_Bll.ShowMessage(this, ex.Message.ToString());
            //return;
            SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "frm_PmsTask", ex.StackTrace, DateTime.Now);
            Response.Redirect("~/Frm_ErrorPage.aspx");
        }
    }
Example #17
0
 private void LoadGeneralManager()
 {
     try
     {
         PMS_GETEMPLOYEE _obj_Pms_GetEmployee = new PMS_GETEMPLOYEE();
         _obj_Pms_GetEmployee.Mode = 3;
         DataTable DT_Details = new DataTable();
         if (rcmb_EmployeeType.SelectedItem.Value != "")
         {
             _obj_Pms_GetEmployee.BU_ID           = Convert.ToInt32(rcmb_BusinessUnitType.SelectedItem.Value);
             _obj_Pms_GetEmployee.EMP_ID          = Convert.ToInt32(rcmb_EmployeeType.SelectedItem.Value);
             _obj_Pms_GetEmployee.REPORTINGMGR_ID = Convert.ToInt32(rcmb_ReportingMgrType.SelectedItem.Value);
             DT_Details = Pms_Bll.get_Employee(_obj_Pms_GetEmployee);
             if (DT_Details.Rows.Count != 0)
             {
                 BindGeneralManager(DT_Details);
             }
             else
             {
                 BindGeneralManager(DT_Details);
             }
         }
         else
         {
             BindGeneralManager(DT_Details);
         }
     }
     catch (Exception ex)
     {
         SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "frm_Pms_EmpSetup", ex.StackTrace, DateTime.Now);
         Response.Redirect("~/Frm_ErrorPage.aspx");
     }
 }
    protected void rcm_bunitAppDisc_SelectedIndexChanged(object o, RadComboBoxSelectedIndexChangedEventArgs e)
    {
        try
        {
            if (rcm_bunitAppDisc.SelectedItem.Text != "Select")
            {
                loadAppCyclAppDisc();
            }
            else
            {
                Pms_Bll.ShowMessage(this, "Please Select Business Unit");
                DataTable dt = new DataTable();
                rcm_app_cycleAppDisc.DataSource = dt;
                rcm_app_cycleAppDisc.DataBind();

                return;
            }
        }

        catch (Exception ex)
        {
            SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "frm_Pms_Reports", ex.StackTrace, DateTime.Now);
            Response.Redirect("~/Frm_ErrorPage.aspx");
        }
    }
    protected void LoadGrid()
    {
        try
        {

            //string type = Convert.ToString(RG_All.Items[index]["A"].Text).Trim();
            //Label lblid = new Label();
            //lblid = RG_All.Items[index].FindControl("lbl_type") as Label;
            SPMS_PERIODICFEEDBACK _obj_Pms_PeriodicFeedback = new SPMS_PERIODICFEEDBACK();
            _obj_Pms_PeriodicFeedback.PF_PM_ID = Convert.ToInt32(Session["TYPE"]);
            _obj_Pms_PeriodicFeedback.Mode = 5;
            //_obj_Pms_PeriodicFeedback.PF_PM_ID = Convert.ToInt32(rcmb_feedback.SelectedItem.Value);
            _obj_Pms_PeriodicFeedback.PF_EMP_ID = Convert.ToInt32( Session["empid1"]);
            _obj_Pms_PeriodicFeedback.PF_TASK_ID = Convert.ToInt32(Session["rolekarid"]);
            _obj_Pms_PeriodicFeedback.PF_ORGANISATION_ID = Convert.ToInt32(Session["ORG_ID"]);
            _obj_Pms_PeriodicFeedback.GSLIFECYCLE = Convert.ToInt32(Session["APPCYCLE_ID"]);
            DataTable dttask = Pms_Bll.get_PeriodicFeedback(_obj_Pms_PeriodicFeedback);
            RG_ViewFeedBack.DataSource = dttask;
            RG_ViewFeedBack.DataBind();

            Session.Remove("rolekarid");
            Session.Remove("empid1");
            Session.Remove("APPCYCLE_ID");
        }
        catch (Exception ex)
        {
            SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "frm_Pms_ViewFeedBack", ex.StackTrace, DateTime.Now);
            Response.Redirect("~/Frm_ErrorPage.aspx");
        }
    }
 private void LoadGrid()
 {
     try
     {
         _obj_kra            = new pms_kraform();
         _obj_kra.KRA_MODE   = 9;
         _obj_kra.KRA_ORG_ID = Convert.ToInt32(Session["ORG_ID"]);
         _obj_kra.LOGIN_ID   = Convert.ToInt32(Session["USER_ID"]);
         DataTable dt = Pms_Bll.get_kra(_obj_kra);
         RG_kraform.DataSource = dt;
         RG_kraform.DataBind();
         if (RG_kraform.Items.Count > 0)
         {
             if (Convert.ToInt32(Session["WRITEFACILITY"]) == 1)
             {
                 tr_btns.Visible = true;
             }
             else
             {
                 tr_btns.Visible = false;
             }
         }
         else
         {
             tr_btns.Visible = false;
         }
     }
     catch (Exception ex)
     {
         SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "frm_KRAApprove", ex.StackTrace, DateTime.Now);
         Response.Redirect("~/Frm_ErrorPage.aspx");
     }
 }
Example #21
0
    /// <summary>
    /// Here loadgrid() method for load a grid...
    /// </summary>
    protected void loadgrid()
    {
        try
        {
            _obj_Pms_Appraisalcycle                  = new PMS_Appraisalcycle();
            _obj_Pms_Appraisalcycle.MODE             = 11;
            _obj_Pms_Appraisalcycle.APPRCYCLE_ID     = Convert.ToInt32(Session["EMP_ID"]);//where i am passing employee to get bunit
            _obj_Pms_Appraisalcycle.APPRCYCLE_ORG_ID = Convert.ToInt32(Session["ORG_ID"]);
            DataTable dtemzz = Pms_Bll.get_Appraisalcycle(_obj_Pms_Appraisalcycle);

            _obj_Pms_Appraisalcycle.MODE = 8;
            if (dtemzz.Rows.Count != 0)
            {
                _obj_Pms_Appraisalcycle.APPRCYCLE_ORG_ID = Convert.ToInt32(Session["ORG_ID"]);
                _obj_Pms_Appraisalcycle.APPRCYCLE_BU_ID  = Convert.ToInt32(dtemzz.Rows[0]["EMP_BUSINESSUNIT_ID"]);
                DataTable dtappidzz = Pms_Bll.get_Appraisalcycle(_obj_Pms_Appraisalcycle);
                if (dtappidzz.Rows.Count != 0)
                {
                    _obj_Pms_AppStatus                   = new SPMS_APRAISALSTATUS();
                    _obj_Pms_AppStatus.APP_EMP_ID        = Convert.ToInt32(Session["EMP_ID"]);
                    _obj_Pms_AppStatus.APP_LASTMDFBY     = Convert.ToInt32(rcmb_appcycle.SelectedItem.Value);//Convert.ToInt32(dtappidzz.Rows[0]["APPRCYCLE_ID"]);
                    _obj_Pms_AppStatus.Mode              = 6;
                    _obj_Pms_AppStatus.APP_STATUS_ORG_ID = Convert.ToInt32(Session["ORG_ID"]);
                    DataTable dt = Pms_Bll.get_AppStatus(_obj_Pms_AppStatus);
                    if (dt.Rows.Count != 0)
                    {
                        RG_Employeertg.DataSource = dt;
                        RG_Employeertg.DataBind();
                    }
                    else
                    {
                        DataTable dt1 = new DataTable();
                        RG_Employeertg.DataSource = dt1;
                        RG_Employeertg.DataBind();
                    }
                }
                else
                {
                    DataTable dt1 = new DataTable();
                    RG_Employeertg.DataSource = dt1;
                    RG_Employeertg.DataBind();
                }
            }

            else
            {
                DataTable dt1 = new DataTable();
                RG_Employeertg.DataSource = dt1;
                RG_Employeertg.DataBind();
            }
        }

        catch (Exception ex)
        {
            SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "FrmEmployeeRating", ex.StackTrace, DateTime.Now);
            Response.Redirect("~/Frm_ErrorPage.aspx");
        }
    }
    protected void btn_Update_Click(object sender, EventArgs e)
    {
        try
        {
            bool result = true;
            validateInputs(out result);
            if (result)
            {
                _obj_smhr_workshops = new SMHR_EMPWORKSHOPSATTENDED();
                _obj_smhr_workshops.EMPWRKSHOPS_ID            = Convert.ToInt32(lbl_id.Text);
                _obj_smhr_workshops.EMPWRKSHOPS_BUSINESSUNIT  = Convert.ToInt32(BUFilter1.BusinessUnitID);
                _obj_smhr_workshops.EMPWRKSHOPS_DIRECTORATEID = Convert.ToInt32(BUFilter1.DirectorateID);
                _obj_smhr_workshops.EMPWRKSHOPS_DEPARTMENTID  = Convert.ToInt32(BUFilter1.DepartmentID);
                _obj_smhr_workshops.EMPWRKSHOPS_EMPID         = Convert.ToInt32(BUFilter1.EmployeeID);
                _obj_smhr_workshops.EMPWRKSHOPS_ORGID         = Convert.ToInt32(Session["ORG_ID"].ToString());
                _obj_smhr_workshops.EMPWRKSHOPS_NAME          = BLL.ReplaceQuote(Convert.ToString(txtbx_WrkshpName.Text));
                _obj_smhr_workshops.EMPWRKSHOPS_ORGBY         = BLL.ReplaceQuote(Convert.ToString(txtbx_Orgby.Text));
                _obj_smhr_workshops.EMPWRKSHOPS_SPNOSDBY      = BLL.ReplaceQuote(Convert.ToString(txtbx_SpnsBy.Text));
                _obj_smhr_workshops.EMPWRKSHOPS_OUTCOME       = BLL.ReplaceQuote(Convert.ToString(txtbx_Outcome.Text));
                _obj_smhr_workshops.EMPWRKSHOPS_FROMDATE      = Convert.ToDateTime(rdtp_fromdate.SelectedDate);
                _obj_smhr_workshops.EMPWRKSHOPS_TODATE        = Convert.ToDateTime(rdtp_todate.SelectedDate);
                if (FUpload.HasFile)
                {
                    string filename = Convert.ToString(FUpload.FileName.Trim().Replace("'", "''"));
                    if (!string.IsNullOrEmpty(filename))
                    {
                        FUpload.PostedFile.SaveAs(System.IO.Path.Combine(Server.MapPath("~/EmpUploads/DocUploads/"), "WorkShop" + "_" + BUFilter1.EmployeeID + "_" + filename));
                    }
                    _obj_smhr_workshops.EMPWRKSHOPS_PARTCERTDOCNAME   = filename;
                    _obj_smhr_workshops.EMPWRKSHOPS_PARTCERTDOCUPLOAD = "~/EmpUploads/DocUploads/" + "WorkShop" + "_" + BUFilter1.EmployeeID + "_" + filename;
                }
                _obj_smhr_workshops.LASTMDFBY   = Convert.ToInt32(Session["USER_ID"]); // ### Need to Get the Session
                _obj_smhr_workshops.LASTMDFDATE = DateTime.Now;
                _obj_smhr_workshops.OPERATION   = operation.Update;


                bool status = BLL.set_workshops(_obj_smhr_workshops);
                if (status == true)
                {
                    Pms_Bll.ShowMessage(this, "Workshop Updated Succesfully");
                    loadgrid();
                    btn_Update.Visible = true;
                    RM_EmpWorkshopform.SelectedIndex = 0;
                }
                else
                {
                    Pms_Bll.ShowMessage(this, "Unable to Update the record,Execption Occured");
                    return;
                }
            }
        }

        catch (Exception ex)
        {
            SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "frm_EmpWorkshops", ex.StackTrace, DateTime.Now);
            Response.Redirect("~/Frm_ErrorPage.aspx");
        }
    }
Example #23
0
    protected void lnk_Edit_Commnad(object sender, CommandEventArgs e)
    {
        try
        {
            i++;
            clearfields();
            chkActive.Checked = false;
            divActive.Visible = true;
            LoadCombos();
            _obj_kra               = new pms_kraform();
            _obj_kra.KRA_MODE      = 2;
            _obj_kra.KRA_ID        = Convert.ToInt32(e.CommandArgument);
            ViewState["EditKraID"] = Convert.ToInt32(e.CommandArgument);
            txt_Objectives.Text    = "";
            DataTable DT = Pms_Bll.get_kra(_obj_kra);
            if (DT.Rows.Count != 0)
            {
                lbl_id.Text          = Convert.ToString(DT.Rows[0]["KRA_ID"]);
                txt_kraname.Text     = Pms_Bll.ReplaceQuote(Convert.ToString(DT.Rows[0]["KRA_NAME"]));
                txt_description.Text = Pms_Bll.ReplaceQuote(Convert.ToString(DT.Rows[0]["KRA_DESCRIPTION"]));
                //txt_Measure.Text = Convert.ToString(DT.Rows[0]["KRA_MEASURE"]);
                rcmb_BUI.SelectedIndex = rcmb_BUI.Items.FindItemIndexByValue(Convert.ToString(DT.Rows[0]["KRA_BU_ID"]));
                //rtxt_KRAID.Text = Pms_Bll.ReplaceQuote(Convert.ToString(DT.Rows[0]["KRA_KRAID"]));

                chkActive.Checked = (!Convert.ToBoolean(DT.Rows[0]["KRA_STATUS"]));

                pnlAddObj.Visible = true;
                rpKraObj.Selected = true;
                LoadKraObjDatabyKraID(Convert.ToInt32(e.CommandArgument));

                RM_kraform.SelectedIndex = 1;
                btn_SAVE.Visible         = true;
                btn_SAVE.Visible         = false;
                btn_Update.Visible       = true;
                txt_description.Enabled  = true;
                txt_kraname.Enabled      = false;
                //rtxt_KRAID.Enabled = false;
                //txt_Measure.Enabled = true;
                rcmb_BUI.Enabled = false;

                if (Convert.ToInt32(Session["WRITEFACILITY"]) == 2)
                {
                    btn_Update.Visible = false;
                }

                else
                {
                    btn_Update.Visible = true;
                }
            }
        }
        catch (Exception ex)
        {
            SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "frm_Kraform", ex.StackTrace, DateTime.Now);
            Response.Redirect("~/Frm_ErrorPage.aspx");
        }
    }
    protected void lnk_Edit_Commnad(object sender, CommandEventArgs e)
    {
        try
        {
            clearfields();

            _obj_smhr_workshops                = new SMHR_EMPWORKSHOPSATTENDED();
            _obj_smhr_workshops.OPERATION      = operation.Update;
            _obj_smhr_workshops.EMPWRKSHOPS_ID = Convert.ToInt32(e.CommandArgument);

            DataTable DT = BLL.get_workshops(_obj_smhr_workshops);
            if (DT.Rows.Count != 0)
            {
                lbl_id.Text = Convert.ToString(DT.Rows[0]["EMPWRKSHOPS_ID"]);
                BUFilter1.BusinessUnitID         = Convert.ToInt32(DT.Rows[0]["EMPWRKSHOPS_BUSINESSUNIT"]);
                BUFilter1.DirectorateID          = Convert.ToInt32(DT.Rows[0]["EMPWRKSHOPS_DIRECTORATEID"]);
                BUFilter1.DepartmentID           = Convert.ToInt32(DT.Rows[0]["EMPWRKSHOPS_DEPARTMENTID"]);
                BUFilter1.EmployeeID             = Convert.ToInt32(DT.Rows[0]["EMPWRKSHOPS_EMPID"]);
                txtbx_WrkshpName.Text            = Pms_Bll.ReplaceQuote(Convert.ToString(DT.Rows[0]["EMPWRKSHOPS_NAME"]));
                txtbx_Orgby.Text                 = Pms_Bll.ReplaceQuote(Convert.ToString(DT.Rows[0]["EMPWRKSHOPS_ORGBY"]));
                txtbx_SpnsBy.Text                = Pms_Bll.ReplaceQuote(Convert.ToString(DT.Rows[0]["EMPWRKSHOPS_SPNOSDBY"]));
                txtbx_Outcome.Text               = Pms_Bll.ReplaceQuote(Convert.ToString(DT.Rows[0]["EMPWRKSHOPS_OUTCOME"]));
                rdtp_fromdate.SelectedDate       = Convert.ToDateTime(DT.Rows[0]["EMPWRKSHOPS_FROMDATE"]);
                rdtp_todate.SelectedDate         = Convert.ToDateTime(DT.Rows[0]["EMPWRKSHOPS_TODATE"]);
                RM_EmpWorkshopform.SelectedIndex = 1;
                btn_SAVE.Visible                 = true;
                btn_SAVE.Visible                 = false;
                btn_Update.Visible               = true;
                txtbx_Orgby.Enabled              = true;
                txtbx_SpnsBy.Enabled             = true;
                txtbx_Outcome.Enabled            = true;
                txtbx_WrkshpName.Enabled         = true;
                BUFilter1.DisableBusinessUnit    = false;
                BUFilter1.DisableDirectorate     = false;
                BUFilter1.DisableDepartment      = false;
                BUFilter1.DisableEmployee        = false;


                if (Convert.ToInt32(Session["WRITEFACILITY"]) == 2)
                {
                    btn_Update.Visible = false;
                }

                else
                {
                    btn_Update.Visible = true;
                }
            }
        }

        catch (Exception ex)
        {
            SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "frm_EmpWorkshops", ex.StackTrace, DateTime.Now);
            Response.Redirect("~/Frm_ErrorPage.aspx");
        }
    }
    protected void lnk_Edit_Commnad(object sender, CommandEventArgs e)
    {
        try
        {
            clearfields();
            LoadCombos();
            _obj_idp                     = new pms_IDPSCREEN();
            _obj_idp.IDP_MODE            = 5;
            _obj_idp.IDP_ID              = Convert.ToInt32(e.CommandArgument);
            _obj_idp.IDP_ORGANISATION_ID = Convert.ToInt32(Session["ORG_ID"]);
            DataTable DT = Pms_Bll.get_idp(_obj_idp);
            if (DT.Rows.Count != 0)
            {
                lbl_id.Text            = Convert.ToString(DT.Rows[0]["IDP_ID"]);
                txt_valname.Text       = Pms_Bll.ReplaceQuote(Convert.ToString(DT.Rows[0]["IDP_NAME"]));
                txt_description.Text   = Pms_Bll.ReplaceQuote(Convert.ToString(DT.Rows[0]["IDP_DESCRIPTION"]));
                rcmb_BUI.SelectedIndex = rcmb_BUI.Items.FindItemIndexByValue(Convert.ToString(DT.Rows[0]["IDP_BU_ID"]));
                if (Convert.ToInt32(DT.Rows[0]["IDP_STATUS"]) == 0)
                {
                    chkbx_status.Checked = true;
                }
                else if (Convert.ToInt32(DT.Rows[0]["IDP_STATUS"]) == 1)
                {
                    chkbx_status.Checked = false;
                }
                RM_VALUESform.SelectedIndex = 1;
                btn_SAVE.Visible            = true;
                btn_SAVE.Visible            = false;
                btn_Update.Visible          = true;
                txt_description.Enabled     = true;
                txt_valname.Enabled         = false;
                //rtxt_KRAID.Enabled = false;
                //txt_Measure.Enabled = true;
                rcmb_BUI.Enabled     = false;
                lbl_status.Visible   = true;
                cln_status.Visible   = true;
                chkbx_status.Visible = true;

                if (Convert.ToInt32(Session["WRITEFACILITY"]) == 2)
                {
                    btn_Update.Visible = false;
                }

                else
                {
                    btn_Update.Visible = true;
                }
            }
        }

        catch (Exception ex)
        {
            SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "frm_Valuesform", ex.StackTrace, DateTime.Now);
            Response.Redirect("~/Frm_ErrorPage.aspx");
        }
    }
Example #26
0
    /// <summary>
    /// Here Update the Record..
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void btn_UPDATE_Click(object sender, EventArgs e)
    {
        try
        {
            if (txt_Comments.Text.Length > 1000)
            {
                BLL.ShowMessage(this, "Comments length should be Less Than 1000.");
                return;
            }
            if (txt_Description.Text.Length > 1000)
            {
                BLL.ShowMessage(this, "Description length should be Less Than 1000.");
                return;
            }
            _obj_idp                 = new pms_IDPSCREEN();
            _obj_idp.IDP_ID          = Convert.ToInt32(lbl_id.Text);
            _obj_idp.IDP_EMP_ID      = Convert.ToInt32(RCB_EmployeeName.SelectedValue);
            _obj_idp.IDP_NAME        = Pms_Bll.ReplaceQuote(Convert.ToString(txt_IDP.Text));
            _obj_idp.IDP_DESCRIPTION = Pms_Bll.ReplaceQuote(Convert.ToString(txt_Description.Text));

            //_obj_idp.IDP_EMP_ID = 6;
            _obj_idp.IDP_STARTDATE = RDP_StartDate.SelectedDate.Value;
            //_obj_idp.IDP_ENDDATE = RDP_EndDate.SelectedDate.Value;
            _obj_idp.IDP_COMMENTS = Convert.ToString(txt_Comments.Text.Replace("'", "''"));
            _obj_idp.LASTMDFBY    = Convert.ToInt32(Session["user_id"]);
            _obj_idp.LASTMDFDATE  = DateTime.Now;
            _obj_idp.IDP_MODE     = 5;
            //_obj_idp.IDP_APPRAISALCYCLE = Convert.ToInt32(rcm_apprcycle.SelectedItem.Value);

            bool status = Pms_Bll.set_idp(_obj_idp);
            if (status == true)
            {
                Pms_Bll.ShowMessage(this, "IDP Updated Succesfully");
                loadgrid();

                RG_Idpform.DataBind();
                btn_SAVE.Visible         = false;
                RM_Idpform.SelectedIndex = 0;
                RP_Idpform.Visible       = true;
                RP_Idpform2.Visible      = false;
            }
            else
            {
                Pms_Bll.ShowMessage(this, "Unable to Update the record,Execption Occured");
                return;
            }
        }

        catch (Exception ex)
        {
            SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "frm_idp", ex.StackTrace, DateTime.Now);
            Response.Redirect("~/Frm_ErrorPage.aspx");
        }
    }
    protected void rcmb_BusinessUnit_SelectedIndexChanged(object o, RadComboBoxSelectedIndexChangedEventArgs e)
    {
        try
        {
            if (rcmb_BusinessUnit.SelectedItem.Text != "Select")
            {
                _obj_Pms_Appraisalcycle                  = new PMS_Appraisalcycle();
                _obj_Pms_Appraisalcycle.OPERATION        = operation.Empty;
                _obj_Pms_Appraisalcycle.MODE             = 8;
                _obj_Pms_Appraisalcycle.APPRCYCLE_BU_ID  = Convert.ToInt32(rcmb_BusinessUnit.SelectedItem.Value);
                _obj_Pms_Appraisalcycle.APPRCYCLE_ORG_ID = Convert.ToInt32(Session["ORG_ID"]);
                DataTable DT_AppraisalCycle = new DataTable();
                DT_AppraisalCycle = Pms_Bll.get_Appraisalcycle(_obj_Pms_Appraisalcycle);
                if (DT_AppraisalCycle.Rows.Count != 0)
                {
                    rcmb_AppCycle.DataSource     = DT_AppraisalCycle;
                    rcmb_AppCycle.DataTextField  = "APPRCYCLE_NAME";
                    rcmb_AppCycle.DataValueField = "APPRCYCLE_ID";
                    rcmb_AppCycle.DataBind();
                    rcmb_AppCycle.Items.Insert(0, new Telerik.Web.UI.RadComboBoxItem("Select", "0"));
                }
                else
                {
                    DataTable dt4 = new DataTable();
                    rcmb_AppCycle.DataSource = dt4;

                    rcmb_AppCycle.DataBind();
                    rcmb_AppCycle.Items.Insert(0, new Telerik.Web.UI.RadComboBoxItem("Select", "0"));
                    return;
                }
            }

            else
            {
                Pms_Bll.ShowMessage(this, "Please Select Business Unit");
                DataTable dt5 = new DataTable();
                rcmb_AppCycle.DataSource = dt5;
                rcmb_AppCycle.DataBind();
                //rcmb_RManager.Visible = false;
                //lbl_RM.Visible = false;
                rcmb_RManager.DataSource = dt5;
                rcmb_RManager.DataBind();
                Rg_Ratings.Visible = false;
                return;
            }
        }

        catch (Exception ex)
        {
            SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "frm_Pms_Reports", ex.StackTrace, DateTime.Now);
            Response.Redirect("~/Frm_ErrorPage.aspx");
        }
    }
    protected void rcmb_AppCycle_SelectedIndexChanged(object o, RadComboBoxSelectedIndexChangedEventArgs e)
    {
        try
        {
            if (rcmb_AppCycle.SelectedItem.Text != "Select")
            {
                //yyyy
                _obj_Spms_Appraisal      = new SPMS_APPRAISAL();
                _obj_Spms_Appraisal.Mode = 1;
                _obj_Spms_Appraisal.BUID = Convert.ToInt32(rcmb_BusinessUnit.SelectedItem.Value);
                _obj_Spms_Appraisal.APPRAISAL_ORGANISATION_ID = Convert.ToInt32(Session["ORG_ID"]);
                DataTable dt_manager = Pms_Bll.get_EmpRatingDetails(_obj_Spms_Appraisal);
                if (dt_manager.Rows.Count != 0)
                {
                    rcmb_RManager.DataSource     = dt_manager;
                    rcmb_RManager.DataTextField  = "MANAGER";
                    rcmb_RManager.DataValueField = "REPORTINGMGR_ID";
                    rcmb_RManager.DataBind();
                    rcmb_RManager.Items.Insert(0, new Telerik.Web.UI.RadComboBoxItem("Select", "0"));
                }

                else
                {
                    DataTable dt5 = new DataTable();
                    rcmb_RManager.DataSource = dt5;

                    rcmb_RManager.DataBind();
                    rcmb_RManager.Items.Insert(0, new Telerik.Web.UI.RadComboBoxItem("Select", "0"));
                }
            }
            else
            {
                Pms_Bll.ShowMessage(this, "Please Select Appraisal Cycle");
                DataTable dt5 = new DataTable();

                //rcmb_RManager.Visible = false;
                //lbl_RM.Visible = false;
                rcmb_RManager.DataSource = dt5;
                rcmb_RManager.DataBind();
                //rcmb_RManager.Visible = false;
                //lbl_RM.Visible = false;
                Rg_Ratings.Visible = false;
                return;
            }
        }

        catch (Exception ex)
        {
            SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "frm_Pms_Reports", ex.StackTrace, DateTime.Now);
            Response.Redirect("~/Frm_ErrorPage.aspx");
        }
    }
    protected void rcm_app_cycleAppDisc_SelectedIndexChanged(object o, RadComboBoxSelectedIndexChangedEventArgs e)
    {
        try
        {
            if (rcm_app_cycleAppDisc.SelectedItem.Text != "Select")
            {
                _obj_Pms_Appraisalcycle                  = new PMS_Appraisalcycle();
                _obj_Pms_Appraisalcycle.MODE             = 8;
                _obj_Pms_Appraisalcycle.APPRCYCLE_BU_ID  = Convert.ToInt32(rcm_bunitAppDisc.SelectedValue);
                _obj_Pms_Appraisalcycle.APPRCYCLE_ORG_ID = Convert.ToInt32(Session["org_id"]);
                DataTable dtappidzz1 = Pms_Bll.get_Appraisalcycle(_obj_Pms_Appraisalcycle);
                if (dtappidzz1.Rows.Count != 0)
                {
                    _obj_Spms_Appraisal      = new SPMS_APPRAISAL();
                    _obj_Spms_Appraisal.Mode = 26;
                    _obj_Spms_Appraisal.APPRAISAL_BUSSINESS_UNIT  = Convert.ToInt32(rcm_bunitAppDisc.SelectedItem.Value);
                    _obj_Spms_Appraisal.APPRAISAL_APPRAISALCYCLE  = Convert.ToInt32(rcm_app_cycleAppDisc.SelectedItem.Value);//Convert.ToInt32(dtappidzz1.Rows[0]["APPRCYCLE_ID"]);
                    _obj_Spms_Appraisal.APPRAISAL_ORGANISATION_ID = Convert.ToInt32(Session["org_id"]);
                    DataTable DT = Pms_Bll.get_Appraisal(_obj_Spms_Appraisal);
                    if (DT.Rows.Count != 0)
                    {
                        Rg_appdisc.DataSource = DT;
                        Rg_appdisc.DataBind();
                        Rm_App_Disc.SelectedIndex = 1;
                    }

                    else
                    {
                        DataTable dt2 = new DataTable();

                        Rg_appdisc.DataSource = dt2;
                        Rg_appdisc.DataBind();
                        Rm_App_Disc.SelectedIndex = 1;
                    }
                }
            }
            else
            {
                Pms_Bll.ShowMessage(this, "No Active Appraisal Cycle Under Business Unit");
                DataTable dt1 = new DataTable();
                Rg_appdisc.DataSource = dt1;
                Rg_appdisc.DataBind();
                Rm_Goal_Reports.SelectedIndex = 1;
            }
        }

        catch (Exception ex)
        {
            SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "frm_Pms_Reports", ex.StackTrace, DateTime.Now);
            Response.Redirect("~/Frm_ErrorPage.aspx");
        }
    }
    /// <summary>
    /// HERE I AM LOADING Goals DETAILS FROM PREVIOUS GOAL SETTING DETAILS TABLE
    /// </summary>

    protected void LoadAppraisalCycle1()
    {
        try
        {
            _obj_Pms_Appraisalcycle                  = new PMS_Appraisalcycle();
            _obj_Pms_Appraisalcycle.MODE             = 11;
            _obj_Pms_Appraisalcycle.APPRCYCLE_ORG_ID = Convert.ToInt32(Session["ORG_ID"]);
            _obj_Pms_Appraisalcycle.APPRCYCLE_ID     = Convert.ToInt32(Session["empid1"]);//where i am passing employee to get bunit
            DataTable dtem = Pms_Bll.get_Appraisalcycle(_obj_Pms_Appraisalcycle);

            if (dtem.Rows.Count != 0)
            {
                _obj_Pms_Appraisalcycle.MODE            = 7;
                _obj_Pms_Appraisalcycle.APPRCYCLE_BU_ID = Convert.ToInt32(dtem.Rows[0]["EMP_BUSINESSUNIT_ID"]);

                _obj_Pms_Appraisalcycle.APPRCYCLE_ORG_ID = Convert.ToInt32(Session["ORG_ID"]);


                DataTable dt = Pms_Bll.get_Appraisalcycle(_obj_Pms_Appraisalcycle);
                if (dt.Rows.Count != 0)
                {
                    rcm_apprcycle.DataSource     = dt;
                    rcm_apprcycle.DataTextField  = "APPRCYCLE_NAME";
                    rcm_apprcycle.DataValueField = "APPRCYCLE_ID";
                    rcm_apprcycle.DataBind();
                    rcm_apprcycle.Items.Insert(0, new Telerik.Web.UI.RadComboBoxItem("Select", "0"));
                }
                else
                {
                    DataTable dt44 = new DataTable();
                    rcm_apprcycle.DataSource = dt44;
                    rcm_apprcycle.DataBind();
                    rcm_apprcycle.Items.Insert(0, new Telerik.Web.UI.RadComboBoxItem("Select", "0"));
                }
            }
            else
            {
                DataTable dt44 = new DataTable();
                rcm_apprcycle.DataSource = dt44;
                rcm_apprcycle.DataBind();
                rcm_apprcycle.Items.Insert(0, new Telerik.Web.UI.RadComboBoxItem("Select", "0"));
            }
        }
        catch (Exception ex)
        {
            //Pms_Bll.ShowMessage(this, ex.Message.ToString());
            //return;
            SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "frm_PmsTask", ex.StackTrace, DateTime.Now);
            Response.Redirect("~/Frm_ErrorPage.aspx");
        }
    }