/// <summary> /// HERE I AM LOADING Goals DETAILS FROM PREVIOUS GOAL SETTING DETAILS TABLE /// </summary> protected void LoadGoal() { try { rcmb_GoalType.Items.Clear(); SPMS_GOALSETTING _obj_Pms_GoalSetting = new SPMS_GOALSETTING(); _obj_Pms_GoalSetting.Mode = 1; DataTable dt = Pms_Bll.get_GoalSetting(_obj_Pms_GoalSetting); rcmb_GoalType.DataSource = dt; rcmb_GoalType.DataTextField = "GSDTL_NAME"; rcmb_GoalType.DataValueField = "GSDTL_ID"; rcmb_GoalType.DataBind(); rcmb_GoalType.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_Task", 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 LoadGoal1() { 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 = 8; _obj_Pms_Appraisalcycle.APPRCYCLE_ORG_ID = Convert.ToInt32(Session["ORG_ID"]); _obj_Pms_Appraisalcycle.APPRCYCLE_BU_ID = Convert.ToInt32(dtem.Rows[0]["EMP_BUSINESSUNIT_ID"]); DataTable dtappid = Pms_Bll.get_Appraisalcycle(_obj_Pms_Appraisalcycle); if (dtappid.Rows.Count != 0) { rcmb_GoalType.Items.Clear(); SPMS_GOALSETTING _obj_Pms_GoalSetting = new SPMS_GOALSETTING(); _obj_Pms_GoalSetting.Mode = 10; _obj_Pms_GoalSetting.CREATEDBY = Convert.ToInt32(Session["ORG_ID"]); _obj_Pms_GoalSetting.GSDTL_ID = Convert.ToInt32(Session["empid1"]); //i am passing employee _obj_Pms_GoalSetting.BU_ID = Convert.ToInt32(dtappid.Rows[0]["APPRCYCLE_ID"]); //i am passing apprycle cycle value DataTable dt = Pms_Bll.get_GoalSetting(_obj_Pms_GoalSetting); if (dt.Rows.Count != 0) { rcmb_GoalType.DataSource = dt; rcmb_GoalType.DataTextField = "GSDTL_NAME"; rcmb_GoalType.DataValueField = "GSDTL_ID"; rcmb_GoalType.DataBind(); rcmb_GoalType.Items.Insert(0, new Telerik.Web.UI.RadComboBoxItem("Select", "0")); } else { DataTable dt44 = new DataTable(); rcmb_GoalType.DataSource = dt44; rcmb_GoalType.DataBind(); rcmb_GoalType.Items.Insert(0, new Telerik.Web.UI.RadComboBoxItem("Select", "0")); } } else { Pms_Bll.ShowMessage(this, "Employee Is Not Under Active Appraisal"); DataTable dt44 = new DataTable(); rcmb_GoalType.DataSource = dt44; rcmb_GoalType.DataBind(); rcmb_GoalType.Items.Insert(0, new Telerik.Web.UI.RadComboBoxItem("Select", "0")); } } else { Pms_Bll.ShowMessage(this, "Employee Is Inactive"); DataTable dt44 = new DataTable(); rcmb_GoalType.DataSource = dt44; rcmb_GoalType.DataBind(); rcmb_GoalType.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"); } }