protected void btn_Approve_Click(object sender, EventArgs e) { try { bool status = false; int count = 0; for (int index = 0; index < RG_ApprAppraisal.Items.Count; index++) { CheckBox c = (CheckBox)RG_ApprAppraisal.Items[index].FindControl("chckbtn_Select"); if (c.Checked) { count++; _obj_GS = new PMS_GoalSettings(); _obj_GS.GS_EMP_ID = Convert.ToInt32(Convert.ToString(RG_ApprAppraisal.Items[index]["EMP_ID"].Text)); _obj_GS.GS_ID = Convert.ToInt32(Convert.ToString(RG_ApprAppraisal.Items[index]["GS_ID"].Text)); _obj_GS.BUID = Convert.ToInt32(rcmb_BU.SelectedItem.Value); _obj_GS.GS_APPRAISAL_CYCLE = Convert.ToString(rtxt_AppraisalCycle.SelectedValue); _obj_GS.GS_ORGANISATION_ID = Convert.ToInt32(Session["ORG_ID"]); _obj_GS.GS_STATUS = 1; _obj_GS.LASTMDFBY = Convert.ToInt32(Session["user_id"]); _obj_GS.LASTMDFDATE = DateTime.Now; _obj_GS.GS_MODE = 32; status = Pms_Bll.set_GS(_obj_GS); if (status) { sendMail(Convert.ToInt32(Convert.ToString(RG_ApprAppraisal.Items[index]["EMP_ID"].Text)), "Approved"); } } } if (count == 0) { BLL.ShowMessage(this, "Please Select Atleast one Employee to Approve."); return; } if (status) { BLL.ShowMessage(this, "Goal Settings for Selected Employees Approved Successfully.Notification Sent."); LoadGrid(); return; } } catch (Exception ex) { SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "frm_GsApproval", ex.StackTrace, DateTime.Now); Response.Redirect("~/Frm_ErrorPage.aspx"); } }
private void LoadGrid() { try { _obj_GS = new PMS_GoalSettings(); _obj_GS.GS_MODE = 34; _obj_GS.GS_APPRAISAL_CYCLE = Convert.ToString(Request.QueryString["APPCYCLE_ID"]); _obj_GS.BUID = Convert.ToInt32(rcmb_AppCycle.SelectedItem.Value); _obj_GS.GS_EMP_ID = Convert.ToInt32(Convert.ToString(Request.QueryString["EMP_ID"])); DataTable dt_details = Pms_Bll.get_GS(_obj_GS); Rg_CopyKRA.DataSource = dt_details; } catch (Exception ex) { SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "frm_CopyKRA", ex.StackTrace, DateTime.Now); Response.Redirect("~/Frm_ErrorPage.aspx"); } }
private void LoadGrid() { try { _obj_GS = new PMS_GoalSettings(); _obj_GS.GS_MODE = 31; _obj_GS.EMPID = Convert.ToInt32(rcmb_RpMgr.SelectedItem.Value); _obj_GS.GS_APPRAISAL_CYCLE = Convert.ToString(rtxt_AppraisalCycle.SelectedItem.Value);//Convert.ToInt32(dtappidzzR.Rows[0]["APPRCYCLE_ID"]); _obj_GS.GS_ORGANISATION_ID = Convert.ToInt32(Session["ORG_ID"]); DataTable dt_EMP = Pms_Bll.get_GS(_obj_GS); if (dt_EMP.Rows.Count > 0) { RG_ApprAppraisal.DataSource = dt_EMP; RG_ApprAppraisal.DataBind(); } else { DataTable dt = new DataTable(); RG_ApprAppraisal.DataSource = dt; RG_ApprAppraisal.DataBind(); } for (int index = 0; index < RG_ApprAppraisal.Items.Count; index++) { CheckBox chk = RG_ApprAppraisal.Items[index].FindControl("chckbtn_Select") as CheckBox; chk.Checked = false; } if (RG_ApprAppraisal.Items.Count == 0) { tr_btns.Visible = false; BLL.ShowMessage(this, "No records to Display."); return; } else { tr_btns.Visible = true; } } catch (Exception ex) { SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "frm_GsApproval", ex.StackTrace, DateTime.Now); Response.Redirect("~/Frm_ErrorPage.aspx"); } }
protected void btn_Approve_Click(object sender, EventArgs e) { try { int logEmpID = Convert.ToInt32(Session["EMP_ID"]); bool status = false; int count = 0; DataTable dtAppProcessEmpData = BLL.get_PMS_APPROVAL_PROCESS_BY_ORG_ID(Convert.ToInt32(Session["ORG_ID"]), Convert.ToInt32(rcmb_BU.SelectedValue)); for (int index = 0; index < RG_ApprAppraisal.Items.Count; index++) { CheckBox chk = RG_ApprAppraisal.Items[index].FindControl("chckbtn_Select") as CheckBox; if (chk.Checked) { count++; string EMP_ID = Convert.ToString(RG_ApprAppraisal.Items[index]["EMP_ID"].Text); string rtng = Convert.ToString(RG_ApprAppraisal.Items[index]["APPRAISAL_AVGRTG"].Text); //RadRating rtng = RG_ApprAppraisal.Items[index].FindControl("rtng_emprtng") as RadRating; _obj_Pms_Appraisalcycle = new PMS_Appraisalcycle(); _obj_Pms_Appraisalcycle.APPRCYCLE_BU_ID = Convert.ToInt32(rcmb_BU.SelectedItem.Value); _obj_Pms_Appraisalcycle.APPRCYCLE_ORG_ID = Convert.ToInt32(Session["ORG_ID"]); DataTable dtappid = Pms_Bll.get_Appraisalcycle(_obj_Pms_Appraisalcycle); _obj_Pms_EmpGoalSetting = new SPMS_EMPGOALSETTING(); _obj_Pms_EmpGoalSetting.Mode = 8; _obj_Pms_EmpGoalSetting.GS_EMP_ID = Convert.ToInt32(EMP_ID); if (dtappid.Rows.Count != 0) { _obj_Pms_EmpGoalSetting.GS_APPRAISAL_CYCLE = Convert.ToString(rtxt_AppraisalCycle.SelectedItem.Value);//Convert.ToString(dtappid.Rows[0]["APPRCYCLE_ID"]); } else { _obj_Pms_EmpGoalSetting.GS_APPRAISAL_CYCLE = "0"; } _obj_Pms_EmpGoalSetting.CREATEDBY = Convert.ToInt32(Session["ORG_ID"]); DataTable dt = Pms_Bll.get_EmpGoalSetting(_obj_Pms_EmpGoalSetting); _obj_GS = new PMS_GoalSettings(); if (dt.Rows.Count != 0) { _obj_GS.GS_ID = Convert.ToInt32(dt.Rows[0]["GS_ID"]); } else { _obj_GS.GS_ID = 0; } //TO UPDATE THE STATUS IN APPRAISAL _obj_Spms_Appraisal = new SPMS_APPRAISAL(); _obj_Spms_Appraisal.APPRAISAL_EMP_ID = Convert.ToInt32(EMP_ID); _obj_Spms_Appraisal.APPRAISAL_ORGANISATION_ID = Convert.ToInt32(Session["ORG_ID"]); _obj_Spms_Appraisal.APPRAISAL_APPRAISALCYCLE = Convert.ToInt32(rtxt_AppraisalCycle.SelectedItem.Value);//Convert.ToInt32(dtappid.Rows[0]["APPRCYCLE_ID"]); _obj_Spms_Appraisal.APPRAISAL_STATUS = 3; _obj_Spms_Appraisal.APPRAISAL_LASTMDFBY = Convert.ToInt32(Session["USER_ID"]); _obj_Spms_Appraisal.APPRAISAL_LASTMDFDATE = DateTime.Now; _obj_Spms_Appraisal.Mode = 48; status = Pms_Bll.set_Appraisal(_obj_Spms_Appraisal); //TO GET THE APPRAISAL ID _obj_Spms_Appraisal = new SPMS_APPRAISAL(); _obj_Spms_Appraisal.APPRAISAL_EMP_ID = Convert.ToInt32(EMP_ID); _obj_Spms_Appraisal.APPRAISAL_APPRAISALCYCLE = Convert.ToInt32(rtxt_AppraisalCycle.SelectedItem.Value); //Convert.ToInt32(dtappid.Rows[0]["APPRCYCLE_ID"]); _obj_Spms_Appraisal.Mode = 5; _obj_Spms_Appraisal.APPRAISAL_ORGANISATION_ID = Convert.ToInt32(Session["ORG_ID"]); DataTable dt_app_id = Pms_Bll.get_Appraisal(_obj_Spms_Appraisal); //TO CHECK WHETHER DATA EXISTS IN APPRAISAL APPROVER OR NOT _obj_Pms_AppApprover = new SPMS_APRAISALAPPROVER(); if (dt_app_id.Rows.Count != 0) { _obj_Pms_AppApprover.APP_APPROVER_APP_ID = Convert.ToInt32(dt_app_id.Rows[0]["APPRAISAL_ID"]); } else { _obj_Pms_AppApprover.APP_APPROVER_APP_ID = 0; } _obj_Pms_AppApprover.Mode = 6; DataTable dt_appr = Pms_Bll.get_AppApprover(_obj_Pms_AppApprover); if (dt_appr.Rows.Count == 0) { //TO INSERT DATA INTO APPRAISAL APPROVER _obj_Pms_AppApprover = new SPMS_APRAISALAPPROVER(); if (dt_app_id.Rows.Count != 0) { _obj_Pms_AppApprover.APP_APPROVER_APP_ID = Convert.ToInt32(dt_app_id.Rows[0]["APPRAISAL_ID"]); } else { _obj_Pms_AppApprover.APP_APPROVER_APP_ID = 0; } _obj_Pms_AppApprover.Mode = 3; _obj_Pms_AppApprover.APP_APPROVER_RATING = Convert.ToDecimal(rtng); _obj_Pms_AppApprover.APP_APPROVER_COMMENTS = Convert.ToString(Pms_Bll.ReplaceQuote(rtxt_comments.Text)); _obj_Pms_AppApprover.APP_APPROVER_CREATEDBY = Convert.ToInt32(Session["user_id"]); _obj_Pms_AppApprover.APP_APPROVER_CREATEDDATE = DateTime.Now; _obj_Pms_AppApprover.APP_APPROVER_ORG_ID = Convert.ToInt32(Session["ORG_ID"]); if (dtAppProcessEmpData.Rows.Count > 0) { if (logEmpID == Convert.ToInt32(dtAppProcessEmpData.Rows[0]["PMS_APPROVAL_PROCESS_EMP_ID_1"])) { _obj_Pms_AppApprover.APP_APPROVER_STATUS = 1; } else if (logEmpID == Convert.ToInt32(string.IsNullOrEmpty(dtAppProcessEmpData.Rows[0]["PMS_APPROVAL_PROCESS_EMP_ID_2"].ToString()) ? 0 : Convert.ToInt32(dtAppProcessEmpData.Rows[0]["PMS_APPROVAL_PROCESS_EMP_ID_2"]))) { _obj_Pms_AppApprover.APP_APPROVER_STATUS = 2; } else if (logEmpID == Convert.ToInt32(dtAppProcessEmpData.Rows[0]["PMS_APPROVAL_PROCESS_EMP_ID_3"])) { _obj_Pms_AppApprover.APP_APPROVER_STATUS = 3; } else { _obj_Pms_AppApprover.APP_APPROVER_STATUS = 0; } } bool status1 = Pms_Bll.set_AppApprover(_obj_Pms_AppApprover); } else { //TO UPDATE DATA IN APPRAISAL APPROVER _obj_Pms_AppApprover = new SPMS_APRAISALAPPROVER(); if (dt_app_id.Rows.Count != 0) { _obj_Pms_AppApprover.APP_APPROVER_APP_ID = Convert.ToInt32(dt_app_id.Rows[0]["APPRAISAL_ID"]); } else { _obj_Pms_AppApprover.APP_APPROVER_APP_ID = 0; } _obj_Pms_AppApprover.Mode = 8; _obj_Pms_AppApprover.APP_APPROVER_RATING = Convert.ToDecimal(rtng); //_obj_Pms_AppApprover.APP_APPROVER_COMMENTS = Convert.ToString(rtxt_comments.Text.Replace("'", "''")); _obj_Pms_AppApprover.APP_APPROVER_COMMENTS = Convert.ToString(Pms_Bll.ReplaceQuote(rtxt_comments.Text)); _obj_Pms_AppApprover.APP_APPROVER_LASTMDFBY = Convert.ToInt32(Session["user_id"]); _obj_Pms_AppApprover.APP_APPROVER_LASTMDFDATE = DateTime.Now; _obj_Pms_AppApprover.APP_APPROVER_ORG_ID = Convert.ToInt32(Session["ORG_ID"]); if (dtAppProcessEmpData.Rows.Count > 0) { if (logEmpID == Convert.ToInt32(dtAppProcessEmpData.Rows[0]["PMS_APPROVAL_PROCESS_EMP_ID_1"])) { _obj_Pms_AppApprover.APP_APPROVER_STATUS = 1; } else if (logEmpID == Convert.ToInt32(string.IsNullOrEmpty(dtAppProcessEmpData.Rows[0]["PMS_APPROVAL_PROCESS_EMP_ID_2"].ToString()) ? 0 : Convert.ToInt32(dtAppProcessEmpData.Rows[0]["PMS_APPROVAL_PROCESS_EMP_ID_2"]))) { _obj_Pms_AppApprover.APP_APPROVER_STATUS = 2; } else if (logEmpID == Convert.ToInt32(dtAppProcessEmpData.Rows[0]["PMS_APPROVAL_PROCESS_EMP_ID_3"])) { _obj_Pms_AppApprover.APP_APPROVER_STATUS = 3; } else { _obj_Pms_AppApprover.APP_APPROVER_STATUS = 0; } } bool status1 = Pms_Bll.set_AppApprover(_obj_Pms_AppApprover); } } } if (count == 0) { BLL.ShowMessage(this, "Please Select Atleast one Employee to Approve."); return; } BLL.ShowMessage(this, "Approver Comments Finalized Successfully."); LoadGrid(); Rm_Appraisal_PAGE.SelectedIndex = 0; } catch (Exception ex) { SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "frm_ApprAppraisal_latest", ex.StackTrace, DateTime.Now); Response.Redirect("~/Frm_ErrorPage.aspx"); } }
protected void btn_Update_Click(object sender, EventArgs e) { try { _obj_GS = new PMS_GoalSettings(); _obj_GS.GS_MODE = 23;//YYY _obj_GS.GS_ORGANISATION_ID = Convert.ToInt32(Session["org_id"]); _obj_GS.GS_APPRAISAL_CYCLE = Convert.ToString(lbl_ID.Text); DataTable dtgsemp = Pms_Bll.get_GS(_obj_GS); _obj_Pms_AppStatus = new SPMS_APRAISALSTATUS(); _obj_Pms_AppStatus.Mode = 8;//YYY _obj_Pms_AppStatus.APP_STATUS_ORG_ID = Convert.ToInt32(Session["org_id"]); _obj_Pms_AppStatus.APP_STATUS_APPRAISALCYCLE = Convert.ToInt32(lbl_ID.Text); DataTable dtappstatusemp = Pms_Bll.get_AppStatus(_obj_Pms_AppStatus); int Status = Convert.ToInt32(rcmb_Status.SelectedItem.Value); if ((dtgsemp.Rows.Count == dtappstatusemp.Rows.Count) || (dtappstatusemp.Rows.Count == 0)) { _obj_Pms_Appraisalcycle = new PMS_Appraisalcycle(); _obj_Pms_Appraisalcycle.APPRCYCLE_ID = Convert.ToInt32(lbl_ID.Text); _obj_Pms_Appraisalcycle.APPRCYCLE_DESC = Pms_Bll.ReplaceQuote(Convert.ToString(txt_AppraisalDescription.Text)); _obj_Pms_Appraisalcycle.APPRCYCLE_ISACTIVE = Convert.ToBoolean(Status); _obj_Pms_Appraisalcycle.APPRCYCLE_MODIFIEDBY = Convert.ToInt32(Session["USER_ID"]); _obj_Pms_Appraisalcycle.APPRCYCLE_MODIFIED_DATE = DateTime.Now; _obj_Pms_Appraisalcycle.APPRCYCLE_SELFAPPRAISAL = chk_SelfAppraisal.Checked; if (Status == 1) { DataTable dt_chk = new DataTable(); _obj_Pms_Appraisalcycle = new PMS_Appraisalcycle(); _obj_Pms_Appraisalcycle.MODE = 7; _obj_Pms_Appraisalcycle.APPRCYCLE_ORG_ID = Convert.ToInt32(Session["org_id"]); _obj_Pms_Appraisalcycle.APPRCYCLE_BU_ID = Convert.ToInt32(rcmb_BUI.SelectedItem.Value); dt_chk = Pms_Bll.get_Appraisalcycle(_obj_Pms_Appraisalcycle); _obj_Pms_Appraisalcycle = new PMS_Appraisalcycle(); _obj_Pms_Appraisalcycle.MODE = 14; _obj_Pms_Appraisalcycle.APPRCYCLE_ORG_ID = Convert.ToInt32(Session["org_id"]); _obj_Pms_Appraisalcycle.APPRCYCLE_BU_ID = Convert.ToInt32(rcmb_BUI.SelectedItem.Value); DataTable dt_chk1 = Pms_Bll.get_Appraisalcycle(_obj_Pms_Appraisalcycle); //if ((dt_chk.Rows.Count != 0) && ((Convert.ToInt32(dt_chk1.Rows[0]["APPRCYCLE_ID"])) != (Convert.ToInt32(lbl_ID.Text)))) // { // Pms_Bll.ShowMessage(this, "There is Already Active Appraisal Cycle"); // } // else // { _obj_Pms_Appraisalcycle.MODE = 4; _obj_Pms_Appraisalcycle.APPRCYCLE_ISACTIVE = Convert.ToBoolean(Status); _obj_Pms_Appraisalcycle.APPRCYCLE_ID = Convert.ToInt32(lbl_ID.Text); _obj_Pms_Appraisalcycle.APPRCYCLE_MODIFIEDBY = Convert.ToInt32(Session["USER_ID"]); _obj_Pms_Appraisalcycle.APPRCYCLE_MODIFIED_DATE = DateTime.Now; _obj_Pms_Appraisalcycle.APPRCYCLE_DESC = Convert.ToString(txt_AppraisalDescription.Text.Replace("'", "''")); _obj_Pms_Appraisalcycle.APPRCYCLE_SELFAPPRAISAL = chk_SelfAppraisal.Checked; bool status = Pms_Bll.set_Appraisalcycle(_obj_Pms_Appraisalcycle); if (status == true) { Pms_Bll.ShowMessage(this, "Record Updated Successfully"); _obj_GS = new PMS_GoalSettings(); _obj_GS.GS_MODE = 20;//YYY _obj_GS.GS_APPRAISAL_CYCLE = Convert.ToString(lbl_ID.Text); bool status22 = Pms_Bll.set_GS(_obj_GS); loadgrid(); btn_Update.Visible = true; RMP_AppraisalCycle.SelectedIndex = 0; } else { Pms_Bll.ShowMessage(this, "Unable to Update the record,Execption Occured"); return; } //} } else { _obj_Pms_Appraisalcycle.MODE = 4; bool status = Pms_Bll.set_Appraisalcycle(_obj_Pms_Appraisalcycle); if (status == true) { Pms_Bll.ShowMessage(this, "Record Updated Successfully"); _obj_GS = new PMS_GoalSettings(); _obj_GS.GS_MODE = 20;//YYY _obj_GS.GS_APPRAISAL_CYCLE = Convert.ToString(lbl_ID.Text); bool status22 = Pms_Bll.set_GS(_obj_GS); loadgrid(); btn_Update.Visible = true; RMP_AppraisalCycle.SelectedIndex = 0; } else { Pms_Bll.ShowMessage(this, "Unable to Update the record,Execption Occured"); return; } } } else { Pms_Bll.ShowMessage(this, "Appraisal Cycle In Process"); return; } } 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"); Pms_Bll.ShowMessage(this, ex.Message.ToString()); return; } }
protected void LoadGrid() { try { _obj_pms_EmployeeSetup = new PMS_EMPSETUP(); _obj_pms_EmployeeSetup.EMP_ID = Convert.ToInt32(Convert.ToString(Request.QueryString["EMP_ID"])); _obj_pms_EmployeeSetup.LASTMDFBY = Convert.ToInt32(Session["ORG_ID"]); DataTable dtbuid1 = Pms_Bll.get_LoginInfo(_obj_pms_EmployeeSetup); if (dtbuid1.Rows.Count != 0) { lbl_RPMgr_Name.Text = Convert.ToString(dtbuid1.Rows[0]["REPORTINGMANAGER"]); lbl_ApprMgr_Name.Text = Convert.ToString(dtbuid1.Rows[0]["APPROVALMANAGER"]); _obj_GS = new PMS_GoalSettings(); _obj_GS.GS_MODE = 9; _obj_GS.GS_ORGANISATION_ID = Convert.ToInt32(Session["ORG_ID"]); _obj_GS.GS_EMP_ID = Convert.ToInt32(Convert.ToString(Request.QueryString["EMP_ID"])); _obj_GS.GS_APPRAISAL_CYCLE = Convert.ToString(Request.QueryString["APPCYCLE_ID"]);//Convert.ToString(dtappid.Rows[0]["APPRCYCLE_ID"]); DataTable dt1 = Pms_Bll.get_GS(_obj_GS); if (dt1.Rows.Count != 0) { lbl_Role_Name.Text = Convert.ToString(dt1.Rows[0]["ROLE_NAMES"]); //lbl_Project_Name.Text = Convert.ToString(dt1.Rows[0]["PROJECT_NAME"]); } } //TO GET SELFAPPRAISAL FOR THE APPRAISAL CYCLE ENABLE OR NOT,18.09.2012 _obj_Pms_Appraisalcycle = new PMS_Appraisalcycle(); _obj_Pms_Appraisalcycle.MODE = 2; _obj_Pms_Appraisalcycle.APPRCYCLE_ORG_ID = Convert.ToInt32(Session["ORG_ID"]); _obj_Pms_Appraisalcycle.APPRCYCLE_ID = Convert.ToInt32(Convert.ToString(Request.QueryString["APPCYCLE_ID"])); DataTable DT = Pms_Bll.get_Appraisalcycle(_obj_Pms_Appraisalcycle); if (DT.Rows.Count > 0) { if (DT.Rows[0]["APPRCYCLE_SELFAPPRAISAL"] != System.DBNull.Value) { if (Convert.ToBoolean(DT.Rows[0]["APPRCYCLE_SELFAPPRAISAL"]) == true) { //RG_EmpAppraisalDetails.Columns[6].Visible = true; //RG_EmpAppraisalDetails.Columns[7].Visible = true; RG_EmpAppraisalDetails.Columns[4].Visible = true; } else { //RG_EmpAppraisalDetails.Columns[6].Visible = false; //RG_EmpAppraisalDetails.Columns[7].Visible = false; RG_EmpAppraisalDetails.Columns[4].Visible = false; } } } //TO LOAD THE GRID _obj_Pms_EmpGoalSetting = new SPMS_EMPGOALSETTING(); _obj_Pms_EmpGoalSetting.Mode = 8; _obj_Pms_EmpGoalSetting.GS_EMP_ID = Convert.ToInt32(Convert.ToString(Request.QueryString["EMP_ID"])); _obj_Pms_EmpGoalSetting.GS_APPRAISAL_CYCLE = Convert.ToString(Request.QueryString["APPCYCLE_ID"]); //Convert.ToString(dtappid.Rows[0]["APPRCYCLE_ID"]); _obj_Pms_EmpGoalSetting.CREATEDBY = Convert.ToInt32(Session["ORG_ID"]); _obj_GS = new PMS_GoalSettings(); DataTable dt = Pms_Bll.get_EmpGoalSetting(_obj_Pms_EmpGoalSetting); if (dt.Rows.Count != 0) { _obj_GS.GS_ID = Convert.ToInt32(dt.Rows[0]["GS_ID"]); } else { _obj_GS.GS_ID = 0; } if (Convert.ToString(Request.QueryString["STR"].Trim()) == "GS_APPROVAL") { _obj_GS.GS_MODE = 33; //RG_EmpAppraisalDetails.Columns[6].Visible = false; //RG_EmpAppraisalDetails.Columns[7].Visible = false; //RG_EmpAppraisalDetails.Columns[8].Visible = false; //RG_EmpAppraisalDetails.Columns[9].Visible = false; RG_EmpAppraisalDetails.Columns[4].Visible = false; RG_EmpAppraisalDetails.Columns[5].Visible = false; RG_EmpAppraisalDetails.Columns[6].Visible = false; } else { _obj_GS.GS_MODE = 37; RG_EmpAppraisalDetails.Columns[2].Visible = false; RG_EmpAppraisalDetails.Columns[3].Visible = false; //RG_EmpAppraisalDetails.Columns[4].Visible = false; //RG_EmpAppraisalDetails.Columns[5].Visible = false; } _obj_GS.GS_ORGANISATION_ID = Convert.ToInt32(Session["ORG_ID"]); //_obj_GS.GS_ID = Convert.ToInt32(Session["GSID"]); DataTable dt_details = new DataTable(); dt_details = Pms_Bll.get_GS(_obj_GS); if (dt_details.Rows.Count > 0) { RG_EmpAppraisalDetails.DataSource = dt_details; RG_EmpAppraisalDetails.DataBind(); } else { RG_EmpAppraisalDetails.DataSource = dt_details; RG_EmpAppraisalDetails.DataBind(); } } catch (Exception ex) { SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "frm_EMPAppraisalDetails", ex.StackTrace, DateTime.Now); Response.Redirect("~/Frm_ErrorPage.aspx"); } }
protected void btn_Copy_Click(object sender, EventArgs e) { try { bool status = false; _obj_GS = new PMS_GoalSettings(); _obj_Pms_goalkradetails = new GOALSETTING_GOALKRA_DETAILS(); _obj_Pms_goalIDPdetails = new GOALSETTING_IDP_DETAILS(); _obj_GSdetails = new PMS_GoalSettings_Details(); int count = 0; for (int index = 0; index < Rg_CopyKRA.Items.Count; index++) { CheckBox chk = Rg_CopyKRA.Items[index].FindControl("chckbtn_Select") as CheckBox; if (chk.Checked) { count++; if (Rg_CopyKRA.Items[index]["A"].Text == "KRA") { _obj_Pms_goalkradetails.GS_KRA_KRA_ID = Convert.ToInt32(Rg_CopyKRA.Items[index]["ROLEKRA_ID"].Text); _obj_Pms_goalkradetails.APPCYCLE = Convert.ToInt32(rcmb_AppCycle.SelectedItem.Value); _obj_Pms_goalkradetails.BUID = Convert.ToInt32(Convert.ToString(Request.QueryString["APPCYCLE_ID"])); _obj_Pms_goalkradetails.EMP_ID = Convert.ToInt32(Convert.ToString(Request.QueryString["EMP_ID"])); _obj_Pms_goalkradetails.MODE = 13; status = Pms_Bll.set_Gskra(_obj_Pms_goalkradetails); } else if (Rg_CopyKRA.Items[index]["A"].Text == "IDP") { _obj_Pms_goalIDPdetails.GS_IDP_IDP_ID = Convert.ToInt32(Rg_CopyKRA.Items[index]["ROLEKRA_ID"].Text); _obj_Pms_goalIDPdetails.APPCYCLE = Convert.ToInt32(rcmb_AppCycle.SelectedItem.Value); _obj_Pms_goalIDPdetails.BUID = Convert.ToInt32(Convert.ToString(Request.QueryString["APPCYCLE_ID"])); _obj_Pms_goalIDPdetails.EMP_ID = Convert.ToInt32(Convert.ToString(Request.QueryString["EMP_ID"])); _obj_Pms_goalIDPdetails.MODE = 13; status = Pms_Bll.set_GsIDP(_obj_Pms_goalIDPdetails); } else { _obj_GSdetails.GSDTL_ID = Convert.ToInt32(Rg_CopyKRA.Items[index]["ROLEKRA_ID"].Text); _obj_GSdetails.APPCYCLE = Convert.ToInt32(rcmb_AppCycle.SelectedItem.Value); _obj_GSdetails.BUID = Convert.ToInt32(Convert.ToString(Request.QueryString["APPCYCLE_ID"])); _obj_GSdetails.EMP_ID = Convert.ToInt32(Convert.ToString(Request.QueryString["EMP_ID"])); _obj_GSdetails.GS_DETAILS_MODE = 15; status = Pms_Bll.set_GSdetails(_obj_GSdetails); } } } if (count == 0) { BLL.ShowMessage(this, "Please Select Atleast one KRA to Copy"); return; } if (status) { LoadGrid(); Rg_CopyKRA.DataBind(); if (Rg_CopyKRA.Items.Count == 0) { btn_Copy.Visible = false; } else { btn_Copy.Visible = true; } BLL.ShowMessage(this, "Selected KRAs Copied Successfully."); //ScriptManager.RegisterClientScriptBlock(this, this.GetType(), Guid.NewGuid().ToString(), "refreshOpener();", true); return; } } catch (Exception ex) { SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "frm_CopyKRA", ex.StackTrace, DateTime.Now); Response.Redirect("~/Frm_ErrorPage.aspx"); } }