/// <summary> /// 목표 조회 /// </summary> private void DoBinding_KpiGoal() { ugrdPlan.Clear(); MicroBSC.Integration.BSC.Biz.Biz_Bsc_Kpi_Target_Goal bizBscKpiTargetGoal = new MicroBSC.Integration.BSC.Biz.Biz_Bsc_Kpi_Target_Goal(); DataTable dtBscKpiTargetGoal = bizBscKpiTargetGoal.GetBscKpiTargetGoal_DB(this.IEstTermRefID, this.IKpiRefID, 1); DataTable dtTemp = dtBscKpiTargetGoal; if (dtBscKpiTargetGoal.Rows.Count == 0) { MicroBSC.Integration.BSC.Biz.Biz_Bsc_Term_Detail bizBscTermDetail = new MicroBSC.Integration.BSC.Biz.Biz_Bsc_Term_Detail(); DataTable dtBscTermDetail = bizBscTermDetail.GetBscTermDetail_DB(this.IEstTermRefID, this.IKpiRefID); dtTemp = dtBscTermDetail; } ugrdPlan.DataSource = dtTemp; ugrdPlan.DataBind(); }
private void DoSaving() { //////////////////////////////////////////////////// // KPI TARGET //////////////////////////////////////////////////// int intRow = ugrdPlan.Rows.Count; int intCol = ugrdPlan.Columns.Count; DataTable rDT3 = new DataTable("BSC_KPI_TARGET"); string strMS = ""; string strTS = ""; int intTargetVersion = (hdfkpi_target_version_id.Value == "") ? 0 : int.Parse(hdfkpi_target_version_id.Value); //if (hdfinitial_version_yn.Value == "Y") { strMS = "MS_PLAN"; strTS = "TS_PLAN"; } //else //{ // strMS = "MM_PLAN"; // strTS = "TM_PLAN"; //} rDT3.Columns.Add("ITYPE", typeof(string)); rDT3.Columns.Add("ESTTERM_REF_ID", typeof(int)); rDT3.Columns.Add("KPI_REF_ID", typeof(int)); rDT3.Columns.Add("KPI_TARGET_VERSION_ID", typeof(int)); rDT3.Columns.Add("YMD", typeof(string)); rDT3.Columns.Add("TARGET_MS", typeof(double)); rDT3.Columns.Add("TARGET_TS", typeof(double)); DataRow rDR3; for (int i = 0; i < intRow; i++) { rDR3 = rDT3.NewRow(); //rDR3["ITYPE"] = this.IType; //(ugrdPlan.Rows[i].Cells.FromKey("ESTTERM_REF_ID").Value == null) ? "A" : "U"; rDR3["ITYPE"] = "A"; rDR3["ESTTERM_REF_ID"] = (ugrdPlan.Rows[i].Cells.FromKey("ESTTERM_REF_ID").Value == null) ? this.IEstTermRefID : int.Parse(ugrdPlan.Rows[i].Cells.FromKey("ESTTERM_REF_ID").Value.ToString()); rDR3["KPI_REF_ID"] = (ugrdPlan.Rows[i].Cells.FromKey("KPI_REF_ID").Value == null) ? this.IKpiRefID : int.Parse(ugrdPlan.Rows[i].Cells.FromKey("KPI_REF_ID").Value.ToString()); rDR3["KPI_TARGET_VERSION_ID"] = intTargetVersion; //(ugrdPlan.Rows[i].Cells.FromKey("KPI_TARGET_VERSION_ID").Value == null) ? intTargetVersion : ugrdPlan.Rows[i].Cells.FromKey("KPI_TARGET_VERSION_ID").Value; rDR3["YMD"] = (ugrdPlan.Rows[i].Cells.FromKey("YMD").Value == null) ? "" : ugrdPlan.Rows[i].Cells.FromKey("YMD").Value; rDR3["TARGET_MS"] = (ugrdPlan.Rows[i].Cells.FromKey(strMS).Value == null) ? 0 : double.Parse(ugrdPlan.Rows[i].Cells.FromKey(strMS).Value.ToString()); rDR3["TARGET_TS"] = (ugrdPlan.Rows[i].Cells.FromKey(strTS).Value == null) ? 0 : double.Parse(ugrdPlan.Rows[i].Cells.FromKey(strTS).Value.ToString()); rDT3.Rows.Add(rDR3); } MicroBSC.Integration.BSC.Biz.Biz_Bsc_Kpi_Target_Goal bizBscKpiTargetGoal = new MicroBSC.Integration.BSC.Biz.Biz_Bsc_Kpi_Target_Goal(); string msg = bizBscKpiTargetGoal.AddBscKpiTargetGoal_DB(rDT3 , IEstTermRefID , IKpiRefID , intTargetVersion , this.gUserInfo.Emp_Ref_ID); if (msg.Equals(string.Empty)) { ltrScript.Text = JSHelper.GetAlertScript("정상적으로 처리되었습니다.", false); } else { ltrScript.Text = JSHelper.GetAlertScript("처리시 오류가 발생되었습니다.", false); } }
protected void UltraWebGrid1_InitializeRow(object sender, Infragistics.WebUI.UltraWebGrid.RowEventArgs e) { string col_goal = "GOAL_MS"; string col_target = "TARGET_MS"; string col_result = "RESULT_MS"; string col_goal_dal = "GOAL_DAL_MS"; string col_target_dal = "TARGET_DAL_MS"; if (rdoMethod.SelectedIndex.Equals(1)) { col_goal = "GOAL_TS"; col_target = "TARGET_TS"; col_result = "RESULT_TS"; col_goal_dal = "GOAL_DAL_TS"; col_target_dal = "TARGET_DAL_TS"; } double goal_p = 0; double target_p = 0; double result = 0; double goal_dal = 0; double target_dal = 0; DataRowView drw = (DataRowView)e.Data; int kpi_ref_id = DataTypeUtility.GetToInt32(e.Row.Cells.FromKey("KPI_REF_ID").Value); // 목표 MicroBSC.Integration.BSC.Biz.Biz_Bsc_Kpi_Target_Goal bizBscKpiTargetGoal = new MicroBSC.Integration.BSC.Biz.Biz_Bsc_Kpi_Target_Goal(); DataTable dtBscKpiTargetGoal = bizBscKpiTargetGoal.GetBscKpiTargetGoalTong_DB(IEstTermRefID , kpi_ref_id , IYmd); if (dtBscKpiTargetGoal.Rows.Count > 0) { goal_p = DataTypeUtility.GetToDouble(DataTypeUtility.GetValue(dtBscKpiTargetGoal.Rows[0][col_goal]).Replace("-", "0")); goal_dal = DataTypeUtility.GetToDouble(DataTypeUtility.GetValue(dtBscKpiTargetGoal.Rows[0][col_goal_dal]).Replace("-", "0")); } // 실적 MicroBSC.Integration.BSC.Biz.Biz_Bsc_Kpi_Result bizBscKpiResult = new MicroBSC.Integration.BSC.Biz.Biz_Bsc_Kpi_Result(); DataTable dtBscKpiResult = bizBscKpiResult.GetBscKpiTargetGoalTong_DB(IEstTermRefID , kpi_ref_id , IYmd); if (dtBscKpiResult.Rows.Count > 0) { result = DataTypeUtility.GetToDouble(DataTypeUtility.GetValue(dtBscKpiResult.Rows[0][col_result]).Replace("-", "0")); } // 달성율 MicroBSC.Integration.BSC.Biz.Biz_Bsc_Kpi_Target bizBscKpiTarget = new MicroBSC.Integration.BSC.Biz.Biz_Bsc_Kpi_Target(); DataTable dtBscKpiTarget = bizBscKpiTarget.GetBscKpiTargetGoalTong_DB(IEstTermRefID , kpi_ref_id , IYmd); if (dtBscKpiTarget.Rows.Count > 0) { target_p = DataTypeUtility.GetToDouble(DataTypeUtility.GetValue(dtBscKpiTarget.Rows[0][col_target]).Replace("-", "0")); target_dal = DataTypeUtility.GetToDouble(DataTypeUtility.GetValue(dtBscKpiTarget.Rows[0][col_target_dal]).Replace("-", "0")); } e.Row.Cells.FromKey("GOAL_P").Value = goal_p; e.Row.Cells.FromKey("TARGET_P").Value = target_p; e.Row.Cells.FromKey("RESULT").Value = result; e.Row.Cells.FromKey("GOAL_DAL").Value = goal_dal; e.Row.Cells.FromKey("TARGET_DAL").Value = target_dal; }