private void SetInitForm() { Biz_Bsc_Kpi_Info objKPI = new Biz_Bsc_Kpi_Info(this.intEstTermID, this.intKpiRefID); txtKpiCode.Text = objKPI.Ikpi_code; lblKpiName.Text = objKPI.Ikpi_name; }
private void SetResultGrid() { Biz_Bsc_Kpi_Info objBSC = new Biz_Bsc_Kpi_Info(); DataSet ds = objBSC.GetKpiListForResultAnalysis(this.IEstTermRefID , this.IYmd , "" , "" , "" , "" , this.IDeptID , 1 // 우수 , this.ISumType , "" , ""); if (ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0) { ds.Tables[0].Columns.Add("RANK", typeof(int)); ds.Tables[0].Columns.Add("SORT_TYPE", typeof(string)); DataTable dataTable = null; // 순위정렬 성격에 따라 처리 내용 dataTable = PageUtility.FilterSortData(ds.Tables[0], "", "ACHIEVE_RATE_DIFF DESC"); SetRowNum(dataTable, "H"); // DataRow 삭제 DeleteExtraRowsByRowNum(dataTable, 10); ugrdResultStatus.Clear(); ugrdResultStatus.DataSource = dataTable; ugrdResultStatus.DataBind(); } }
/// <summary> /// 기본정보 조회 /// </summary> public void SetFormData() { Biz_Bsc_Kpi_Info objBSC = new Biz_Bsc_Kpi_Info(this.IEstTermRefID, this.IKpiRefID); lblKpiCode.Text = objBSC.Ikpi_code; lblKpiName.Text = objBSC.Ikpi_name; txtCalcFormMs.Text = objBSC.Icalc_form_ms; txtCalcFormTs.Text = objBSC.Icalc_form_ts; Biz_Bsc_Interface_Kpi_Query objQry = new Biz_Bsc_Interface_Kpi_Query(this.IKpiRefID, this.IDiCode); this.IDiCode = objQry.IDicode; txtDiCode.Text = objQry.IDicode; this.IVersionNo = 1; //objQry.IVersion_No; -- 차후에 버젼관리 연결 txtField_Ss.Text = objQry.IResult_Field_Al; txtCondition_SS.Text = objQry.IResult_Where_Al; txtField_Ms.Text = objQry.IResult_Field_Ms; txtCondition_Ms.Text = objQry.IResult_Where_Ms; txtField_Ts.Text = objQry.IResult_Field_Ts; txtCondition_Ts.Text = objQry.IResult_Where_Ts; txtQUERY_AL.Text = objQry.IQuery_Al; txtQUERY_MS.Text = objQry.IQuery_Ms; txtQUERY_TS.Text = objQry.IQuery_Ts; this.IisValidQuery = objQry.IIsvalid_Query; if (this.IVersionNo > 0) { Biz_Bsc_Interface_Dicode objCode = new Biz_Bsc_Interface_Dicode(this.IDiCode, gUserInfo.Emp_Ref_ID); txtDiName.Text = objCode.IName; this.IType = "U"; this.SetColumnList(); } else { txtDiCode.Text = ""; txtDiName.Text = ""; this.IDiCode = ""; this.IType = "A"; } //int iTxrUser = gUserInfo.Emp_Ref_ID; //Biz_Bsc_Interface_Dicode objBSC = new Biz_Bsc_Interface_Dicode(this.IDiCode, iTxrUser); //txtDICODE.Text = objBSC.IDicode; //txtDINAME.Text = objBSC.IName; //txtDEFINITION.Text = objBSC.IDefinition; //lblUseYN.Text = objBSC.IUse_Yn; //txtDICODE.BackColor = Color.WhiteSmoke; //txtDICODE.ReadOnly = true; //this.IType = (objBSC.IUse_Yn=="Y") ? "U" : "R"; //Biz_Bsc_Interface_Column objCol = new Biz_Bsc_Interface_Column(); //DataTable dtRtn = objCol.GetColumnInfoPerDicode(this.IDiCode, iTxrUser); //ugrdDIColumn.Clear(); //ugrdDIColumn.DataSource = dtRtn.DefaultView; //ugrdDIColumn.DataBind(); this.SetButton(); }
protected void ibtnDelete_Click(object sender, ImageClickEventArgs e) { object[] objList = GetSelectMboList(); Biz_Bsc_Kpi_Info objMBO = new Biz_Bsc_Kpi_Info(); //bool boolOK = objMBO.DeleteMboToKpi(PageUtility.GetIntByValueDropDownList(ddlEstTerm) // , objList // , gUserInfo.Emp_Ref_ID); string returnMsg = objMBO.RemoveMboToKpi_NW(PageUtility.GetIntByValueDropDownList(ddlEstTerm) , objList , gUserInfo.Emp_Ref_ID); if (returnMsg.Equals(string.Empty)) { DoBindingDept(); DoBindingDeptMBO(); DoBinding(); ltrScript.Text = JSHelper.GetAlertScript("삭제를 완료하였습니다."); } else { //ltrScript.Text = JSHelper.GetAlertScript("삭제가 실패하였습니다."); ltrScript.Text = JSHelper.GetAlertScript(returnMsg); } }
private void DoBinding() { lblRowCount.Text = "0/0"; if (ddlEstTerm.Items.Count < 1) { ltrScript.Text = JSHelper.GetAlertScript("등록된 평가기간이 없습니다."); return; } Biz_Bsc_Kpi_Info objBSC = new Biz_Bsc_Kpi_Info(); DataSet ds = objBSC.GetMBOForDeptKpi(PageUtility.GetIntByValueDropDownList(ddlEstTerm) , txtKpiCodeRight.Text.Trim() , txtKpiNameRight.Text.Trim() , txtChampionNameRight.Text.Trim() , PageUtility.GetByValueDropDownList(ddlKpiGroup) , (ddlComDeptRight.SelectedItem.Value == "" ? 0 : PageUtility.GetIntByValueDropDownList(ddlComDeptRight)) , PageUtility.GetIntByValueDropDownList(ddlKpiCategoryTop) , PageUtility.GetIntByValueDropDownList(ddlKpiCategoryMid) , PageUtility.GetIntByValueDropDownList(ddlKpiCategoryLow) , gUserInfo.Emp_Ref_ID , (User.IsInRole(ROLE_ADMIN) == true ? 1 : 0) , this.IDEPT_ID); this.IDT_PAGING = ds.Tables[0]; ugrdMBO.Clear(); ugrdMBO.DataSource = ds; ugrdMBO.DataBind(); DoSetPaging(1); lblRowCount.Text = " " + ds.Tables[0].Compute("COUNT(APPROVAL_STATUS)", "APPROVAL_STATUS = 'Y'").ToString() + " / " + ds.Tables[0].Rows.Count.ToString() + " "; }
private void SendMail(int step) { string strFrom = System.Configuration.ConfigurationSettings.AppSettings["Mail.From"].ToString(); string strServer = System.Configuration.ConfigurationSettings.AppSettings["Mail.SMTP"].ToString(); string strUrl = System.Configuration.ConfigurationSettings.AppSettings["Mail.Url"].ToString(); Biz_Bsc_Kpi_Info kpiInfo = new Biz_Bsc_Kpi_Info(this.IEstTermRefID, this.IKpiRefID); EmpInfos empinfo = new EmpInfos(kpiInfo.Ichampion_emp_id); string strSubject = GetFileText("../_common/SendMailTemplate/BSC_PC_NOTE_subject.txt"); string strBody = GetFileText("../_common/SendMailTemplate/BSC_PC_NOTE_Content.txt"); string kpi_info = @"등록일시 : " + DateTime.Now.ToString() + @"<br> KPI ID : " + kpiInfo.Ikpi_code + @"<br> 측정월 : " + this.IYMD + @"<br> KPI Name : " + kpiInfo.Ikpi_name + @"<br> KPI Champion : " + empinfo.Emp_Name + @"<br>"; strBody = strBody.Replace("[KPI_INFO]", kpi_info); string ceocomment = ""; //if (step == 1) // ceocomment = "DUE DATE : " + "" + "<br>" + txtComment1.Text.Replace("\r\n", "<br>"); //else if (step == 2) // ceocomment = "DUE DATE : " + "" + "<br>" + txtComment2.Text.Replace("\r\n", "<br>"); strBody = strBody.Replace("[CEO_COMMENT]", ceocomment); strBody = strBody.Replace("[MAIL.URL]", strUrl); strBody = strBody.Replace("[TODAY]", DateTime.Today.ToString()); // strServer = "mail.micropolis.co.kr"; if (ceocomment.Trim().Length > 0) { SendMail(strFrom, empinfo.Emp_Email, strSubject, strBody, "", strServer); } }
private void InitControlValue() { iBtnInitiativeFile.Attributes.Add("onclick", "return mfUpload('" + hdfInitiativeDocNo.ClientID.Replace('_', '$') + "');"); iBtnCauseFileID.Attributes.Add("onclick", "return mfUpload('" + hdfCauseDocNo.ClientID.Replace('_', '$') + "');"); iBtnMeasureFileID.Attributes.Add("onclick", "return mfUpload('" + hdfMeasureDocNo.ClientID.Replace('_', '$') + "');"); txtINITIATIVE_DO.Style.Add(HtmlTextWriterStyle.TextAlign, "left"); txtINITIATIVE_PLAN.Style.Add(HtmlTextWriterStyle.TextAlign, "left"); txtReason_Month.Style.Add(HtmlTextWriterStyle.TextAlign, "left"); txtReason_Sum.Style.Add(HtmlTextWriterStyle.TextAlign, "left"); ugrdPrjList.Visible = false; Biz_Bsc_Kpi_Info objKpi = new Biz_Bsc_Kpi_Info(IEstTermRefID, IKpiRefID); lblKpiCode.Text = objKpi.Ikpi_code; lblKpiName.Text = objKpi.Ikpi_name; kpiType = objKpi.Iresult_achievement_type; lblPNUType.Text = objKpi.Iresult_achievement_type_name; lblUnitName.Text = objKpi.Iunit_name; WebCommon.SetTermMonthDropDownList(ddlMonthInfo, this.IEstTermRefID); PageUtility.FindByValueDropDownList(ddlMonthInfo, IYMD); lblMonthInfo.Text = PageUtility.GetByTextDropDownList(ddlMonthInfo); this.SetKPIBaseInfo(); this.SetResultGrid(); this.SetCommunicationGrid(); this.SetExceptGrid(); }
private void SetKpiInfoData() { //int LogInUser = gUserInfo.Emp_Ref_ID; Biz_Bsc_Kpi_Info objBSC = new Biz_Bsc_Kpi_Info(this.IEstTermRefID, this.IKpiRefID); lblRESULT_ACHIEVEMENT_TYPE.Text = objBSC.Iresult_achievement_type_name; lblRESULT_INPUT_TYPE.Text = objBSC.Iresult_input_type_name; lblRESULT_TS_CALC_TYPE.Text = objBSC.Iresult_ts_calc_type_name; lblKPICode.Text = objBSC.Ikpi_code; lblKPIName.Text = objBSC.Ikpi_name; lblUnitName.Text = objBSC.Iunit_name; //this.TtxtTSResult.ReadOnly = (objBSC.Iresult_ts_calc_type == "SUM" || objBSC.Iresult_ts_calc_type == "AVG") ? true : false; //this.TtxtTSResult.BackColor = (objBSC.Iresult_ts_calc_type == "SUM" || objBSC.Iresult_ts_calc_type == "AVG") ? Color.WhiteSmoke : Color.White; //this.IKpiPoolRefID = objBSC.Ikpi_pool_ref_id; //DataSet rDs = objBSC.GetKpiStatus(this.IEstTermRefID, this.IKpiRefID, LogInUser); //if (rDs.Tables[0].Rows.Count > 0) //{ // this.IChampionEmpYN = rDs.Tables[0].Rows[0]["CHAMPION_EMP_YN"].ToString(); // this.IApprovalEmpYN = rDs.Tables[0].Rows[0]["APPROVAL_EMP_YN"].ToString(); // this.IYearlyClose_YN = rDs.Tables[0].Rows[0]["YEARLY_CLOSE_YN"].ToString(); // this.IisPassCloseDay = rDs.Tables[0].Rows[0]["IS_PASS_CLOSE_DAY"].ToString(); //} //Biz_Bsc_Term_Detail objTerm = new Biz_Bsc_Term_Detail(this.IEstTermRefID, this.IYMD); //this.IMontylyClose_YN = objTerm.Iclose_yn; //Biz_Bsc_Kpi_Pool objPool = new Biz_Bsc_Kpi_Pool(this.IKpiPoolRefID); //TltrEstBasis.Text = objPool.Ivaluation_basis; //this.IKpiGroupRefID = objPool.Ikpi_type; }
protected void iBtnSave_Click(object sender, ImageClickEventArgs e) { object[] objList = GetSelectKpiList(); Biz_Bsc_Term_Detail objTerm = new Biz_Bsc_Term_Detail(); DataSet dsYear = objTerm.GetTermDetail(ESTTERM_REF_ID); if (dsYear.Tables[0].Rows.Count < 1) { ltrScript.Text = JSHelper.GetAlertScript("평가년도를 확인하세요."); return; } Biz_Bsc_Kpi_Info objMBO = new Biz_Bsc_Kpi_Info(); //if (objMBO.CopyKpiToMbo(ESTTERM_REF_ID // , objList // , gUserInfo.Emp_Ref_ID // , dsYear.Tables[0].Rows[0]["YMD"].ToString().Substring(0, 4) // , "STG")) //{ // DoBindingDept(); // DoBinding(); // ltrScript.Text = JSHelper.GetAlertScript("복사를 완료하였습니다."); //} //else //{ // ltrScript.Text = JSHelper.GetAlertScript("복사가 실패하였습니다."); //} int checkCount = 0; for (int i = 0; i < objList.Length; i++) { checkCount += new MicroBSC.Integration.BSC.Biz.Biz_Bsc_Kpi_Info().KpiInfoExsistCheckPerson(int.Parse(objList[i].ToString()), gUserInfo.Emp_Ref_ID, ESTTERM_REF_ID); } if (checkCount > 0) { Response.Write("<script>alert('중복되는 KPI 풀입니다.');</script>"); } else { string returnStr = objMBO.CopyKpiToMbo_NW(ESTTERM_REF_ID , objList , gUserInfo.Emp_Ref_ID , dsYear.Tables[0].Rows[0]["YMD"].ToString().Substring(0, 4) , "STG"); if (returnStr.Equals(string.Empty)) { DoBindingDept(); ltrScript.Text = JSHelper.GetAlertOpenerReflashScript("복사를 완료하였습니다.", true); } else { ltrScript.Text = JSHelper.GetAlertScript(returnStr); } } }
public void setChildKpi() { Biz_Bsc_Kpi_Info objBSC = new Biz_Bsc_Kpi_Info(); DataSet rDs = objBSC.GetKpiChildList(this.IEstTermRefID, this.IKpiRefID); ugrdChildKpi.Clear(); ugrdChildKpi.DataSource = rDs; ugrdChildKpi.DataBind(); }
private void DoBinding() { // KPI정보 바인딩 Biz_Bsc_Kpi_Info objBSC = new Biz_Bsc_Kpi_Info(this.IEstTermRefID, this.IKpiRefID); lblKPICode.Text = objBSC.Ikpi_code; lblKPIName.Text = objBSC.Ikpi_name; lblUnitName.Text = objBSC.Iunit_name; lblRESULT_INPUT_TYPE.Text = objBSC.Iresult_input_type_name; lblRESULT_TS_CALC_TYPE.Text = objBSC.Iresult_ts_calc_type_name; lblRESULT_ACHIEVEMENT_TYPE.Text = objBSC.Iresult_achievement_type_name; IResultTsCalcType = objBSC.Iresult_ts_calc_type; string inputType = objBSC.Iresult_input_type.Trim(); // 누적실적유형이 단순합계, 단순평균은 자동으로 계산되도록 그리드컬럼 LOCK if (objBSC.Iresult_ts_calc_type == "SUM" || objBSC.Iresult_ts_calc_type == "AVG") { ugrdResult.Columns.FromKey("RESULT_TS").AllowUpdate = AllowUpdate.No; ugrdResult.Columns.FromKey("RESULT_TS").CellStyle.BackColor = Color.LightGray; } else if (objBSC.Iresult_ts_calc_type == "OTS") //누적실적만 입력 { ugrdResult.Columns.FromKey("RESULT_MS").AllowUpdate = AllowUpdate.No; ugrdResult.Columns.FromKey("RESULT_MS").CellStyle.BackColor = Color.LightGray; } Biz_Bsc_Kpi_Result bizResult = new Biz_Bsc_Kpi_Result(); DataSet dsResult = bizResult.GetResultTotalData(this.IEstTermRefID , this.IKpiRefID); ugrdResult.Clear(); ugrdResult.DataSource = dsResult; ugrdResult.DataBind(); if (inputType == "SYS") { iBtnInsert.Enabled = false; for (int i = 0; i < ugrdResult.Rows.Count; i++) { ugrdResult.Rows[i].Cells.FromKey("RESULT_MS").AllowEditing = AllowEditing.No; ugrdResult.Rows[i].Cells.FromKey("RESULT_MS").Style.BackColor = Color.LightGray; ugrdResult.Rows[i].Cells.FromKey("RESULT_TS").AllowEditing = AllowEditing.No; ugrdResult.Rows[i].Cells.FromKey("RESULT_TS").Style.BackColor = Color.LightGray; string tName = "0" + (i + 1).ToString(); if (tName.Length == 3) { tName = tName.Substring(1, 2); } ((TextBox)this.FindControl("txtCAUSE_TEXT_MS_" + tName)).ReadOnly = ((TextBox)this.FindControl("txtCAUSE_TEXT_TS_" + tName)).ReadOnly = ((TextBox)this.FindControl("txtMEASURE_TEXT_MS_" + tName)).ReadOnly = ((TextBox)this.FindControl("txtMEASURE_TEXT_TS_" + tName)).ReadOnly = true; } } }
private void InitControlValue() { if (PageUtility.GetAppConfig("GOALTONG_YN").Equals("Y")) { rdoGoalTong.Visible = true; } iBtnInitiativeFile.Attributes.Add("onclick", "return mfUpload('" + hdfInitiativeDocNo.ClientID.Replace('_', '$') + "');"); iBtnCauseFileID.Attributes.Add("onclick", "return mfUpload('" + hdfCauseDocNo.ClientID.Replace('_', '$') + "');"); iBtnMeasureFileID.Attributes.Add("onclick", "return mfUpload('" + hdfMeasureDocNo.ClientID.Replace('_', '$') + "');"); iBtnEXPECT_REASON_FILE_ID.OnClientClick = "return mfUpload('" + hdfExpectReasonFileId.ClientID.Replace('_', '$') + "');"; iBtnRESULT_DIFF_FILE_ID.OnClientClick = "return mfUpload('" + hdfResultDiffFileId.ClientID.Replace('_', '$') + "');"; Biz_Bsc_Kpi_Info objKpi = new Biz_Bsc_Kpi_Info(IEstTermRefID, IKpiRefID); lblKpiCode.Text = objKpi.Ikpi_code; lblKpiName.Text = objKpi.Ikpi_name; kpiType = objKpi.Iresult_achievement_type; lblPNUType.Text = objKpi.Iresult_achievement_type_name; ugrdKpiResultStatus.DisplayLayout.Bands[0].Columns.FromKey("AC_RATE_MS").Header.Caption = (kpiType == "BTY" ? "한계초과율" : "달성율"); ugrdKpiResultStatus.DisplayLayout.Bands[0].Columns.FromKey("AC_RATE_TS").Header.Caption = (kpiType == "BTY" ? "한계초과율" : "달성율"); //grvResultExpt.DisplayLayout.Bands[0].Columns.FromKey("AC_RATE_MS").Header.Caption = (kpiType == "BTY" ? "한계초과율" : "달성율"); grvResultExpt.Columns[3].HeaderText = (kpiType == "BTY" ? "한계초과율" : "달성율"); grvResultExpt.Columns[6].HeaderText = (kpiType == "BTY" ? "한계초과율" : "달성율"); //grvResultExpt.DisplayLayout.Bands[0].Columns.FromKey("AC_RATE_TS").Header.Caption = (kpiType == "BTY" ? "한계초과율" : "달성율"); lblUnitName.Text = objKpi.Iunit_name; WebCommon.SetTermMonthDropDownList(ddlMonthInfo, this.IEstTermRefID); PageUtility.FindByValueDropDownList(ddlMonthInfo, IYMD); if (!User.IsInRole(ROLE_ADMIN)) { txtReason_Month.ReadOnly = true; txtReason_Sum.ReadOnly = true; txtPlan_Month.ReadOnly = true; txtPlan_Sum.ReadOnly = true; } if (User.IsInRole(ROLE_CHAMPION)) { txtReason_Month.ReadOnly = false; txtReason_Sum.ReadOnly = false; txtPlan_Month.ReadOnly = false; txtPlan_Sum.ReadOnly = false; } this.SetKPIBaseInfo(); this.SetResultGrid(); this.SetCommunicationGrid(); this.SetExceptGrid(); }
private void DoBinding() { Biz_Bsc_Kpi_Info objBSC = new Biz_Bsc_Kpi_Info(); DataSet ds = objBSC.GetKpiListForBatchDraft(GetRequestByInt("ESTTERM_REF_ID") , "" , "" , "Y" , GetRequestByInt("EMP_REF_ID") , GetRequest("KPI_REF_ID")); ugrdKPI.Clear(); ugrdKPI.DataSource = ds.Tables[0]; ugrdKPI.DataBind(); }
protected void ibtnInsert_Click(object sender, ImageClickEventArgs e) { object[] objList = GetSelectKpiList(); Biz_Bsc_Term_Detail objTerm = new Biz_Bsc_Term_Detail(); DataSet dsYear = objTerm.GetTermDetail(PageUtility.GetIntByValueDropDownList(ddlEstTerm)); if (dsYear.Tables[0].Rows.Count < 1) { ltrScript.Text = JSHelper.GetAlertScript("평가년도를 확인하세요."); return; } Biz_Bsc_Kpi_Info objMBO = new Biz_Bsc_Kpi_Info(); //if (objMBO.CopyKpiToMbo(PageUtility.GetIntByValueDropDownList(ddlEstTerm) // , objList // , gUserInfo.Emp_Ref_ID // , dsYear.Tables[0].Rows[0]["YMD"].ToString().Substring(0, 4) // , "STG")) //{ // DoBindingDept(); // DoBinding(); // ltrScript.Text = JSHelper.GetAlertScript("복사를 완료하였습니다."); //} //else //{ // ltrScript.Text = JSHelper.GetAlertScript("복사가 실패하였습니다."); //} string returnStr = objMBO.CopyKpiToMbo_NW(PageUtility.GetIntByValueDropDownList(ddlEstTerm) , objList , gUserInfo.Emp_Ref_ID , dsYear.Tables[0].Rows[0]["YMD"].ToString().Substring(0, 4) , "STG"); if (returnStr.Equals(string.Empty)) { DoBindingDept(); DoBinding(); ltrScript.Text = JSHelper.GetAlertScript("복사를 완료하였습니다."); } else { ltrScript.Text = JSHelper.GetAlertScript(returnStr); } }
private void SetKpiInfoData() { Biz_Bsc_Kpi_Info objKPI = new Biz_Bsc_Kpi_Info(); DataSet dsKPI = objKPI.GetKpiForMboResult(this.IEstTermRefID, this.IKpiRefID, GetRequestByInt("DRAFT_EMP_ID"), IYMD); if (dsKPI.Tables[0].Rows.Count > 0) { DataRow dr = dsKPI.Tables[0].Rows[0]; lblRESULT_ACHIEVEMENT_TYPE.Text = dr["RESULT_ACHIEVEMENT_TYPE_NAME"].ToString(); lblCATEGORY_NAME.Text = dr["CATEGORY_NAME"].ToString(); lblRESULT_TS_CALC_TYPE.Text = dr["RESULT_TS_CALC_TYPE_NAME"].ToString(); lblKPICode.Text = dr["KPI_CODE"].ToString(); lblKPIName.Text = dr["KPI_NAME"].ToString(); lblUnitName.Text = dr["UNIT_NAME"].ToString(); } }
private void DoBindingDept() { Biz_Bsc_Kpi_Info objBSC = new Biz_Bsc_Kpi_Info(); DataSet ds = objBSC.GetDeptKpiForMBO(ESTTERM_REF_ID , (ddlComDeptLeft.SelectedItem.Value == "" ? 0 : PageUtility.GetIntByValueDropDownList(ddlComDeptLeft)) , txtKpiCodeLeft.Text.Trim() , txtKpiNameLeft.Text.Trim() , txtChampionNameLeft.Text.Trim() , gUserInfo.Emp_Ref_ID , (User.IsInRole(ROLE_ADMIN) == true ? 1 : 0)); ugrdDeptKpi.Clear(); ugrdDeptKpi.DataSource = ds; ugrdDeptKpi.DataBind(); }
public void setKpiData() { if (this.IEstTermRefID < 1) { PageUtility.AlertMessage("평가기간을 알 수 없습니다."); return; } Biz_Bsc_Kpi_Info objBSC = new Biz_Bsc_Kpi_Info(); objBSC.Iestterm_ref_id = this.IEstTermRefID; objBSC.Iresult_input_type = ddlResultInput.SelectedValue; objBSC.Ikpi_code = txtKPICode.Text.Trim(); objBSC.Ikpi_name = txtKPIName.Text.Trim(); objBSC.Ichampion_emp_name = txtChamName.Text.Trim(); int iest_dept_id = (ddlEstDept.SelectedValue.Trim() == "") ? -1 : int.Parse(ddlEstDept.SelectedValue); objBSC.Iuse_yn = ""; objBSC.Itxr_user = int.Parse(gUserInfo.Emp_Ref_ID.ToString()); //DataSet ds = objBSC.GetKpiListPerUser // (objBSC.Iestterm_ref_id // , objBSC.Iresult_input_type // , objBSC.Ikpi_code // , objBSC.Ikpi_name // , objBSC.Iuse_yn // , objBSC.Ichampion_emp_name // , iest_dept_id // , PageUtility.GetByValueDropDownList(ddlKpiGroupRefID) // , objBSC.Itxr_user); DataSet ds = objBSC.GetKpiChildTargetList (this.IEstTermRefID , this.IKpiRefID , txtKPICode.Text , txtKPIName.Text , txtChamName.Text , PageUtility.GetByValueDropDownList(ddlKpiGroupRefID) , PageUtility.GetIntByValueDropDownList(ddlEstDept)); ugrdKpiList.Clear(); ugrdKpiList.DataSource = ds; ugrdKpiList.DataBind(); }
protected void ibtnInsert2_Click(object sender, ImageClickEventArgs e) { object[] objList = GetSelectTeamMboList(); Biz_Bsc_Term_Detail objTerm = new Biz_Bsc_Term_Detail(); DataSet dsYear = objTerm.GetTermDetail(PageUtility.GetIntByValueDropDownList(ddlEstTerm)); if (dsYear.Tables[0].Rows.Count < 1) { ltrScript.Text = JSHelper.GetAlertScript("평가년도를 확인하세요."); return; } Biz_Bsc_Kpi_Info objMBO = new Biz_Bsc_Kpi_Info(); MicroBSC.Integration.BSC.Biz.Biz_Bsc_Kpi_Info bizBscKpiInfo = new MicroBSC.Integration.BSC.Biz.Biz_Bsc_Kpi_Info(); bool Result = bizBscKpiInfo.CopyKpiToMbo(PageUtility.GetIntByValueDropDownList(ddlEstTerm) , objList , gUserInfo.Emp_Ref_ID , dsYear.Tables[0].Rows[0]["YMD"].ToString().Substring(0, 4) , "PRS"); /* * bool Result = objMBO.CopyKpiToMbo(PageUtility.GetIntByValueDropDownList(ddlEstTerm) * , objList * , gUserInfo.Emp_Ref_ID * , dsYear.Tables[0].Rows[0]["YMD"].ToString().Substring(0, 4) * , "PRS"); */ if (Result) { DoBindingDeptMBO(); DoBinding(); ltrScript.Text = JSHelper.GetAlertScript("복사를 완료하였습니다."); } else { Response.Write(objMBO.Transaction_Message); ltrScript.Text = JSHelper.GetAlertScript("복사가 실패하였습니다."); } }
protected void ibtnSearchLeft_Click(object sender, ImageClickEventArgs e) { Biz_Bsc_Kpi_Info objBSC = new Biz_Bsc_Kpi_Info(); DT_MBO = objBSC.GetMBOForDeptKpi(ESTTERM_REF_ID , "" , "" , "" , "" , 0 , 0 , 0 , 0 , gUserInfo.Emp_Ref_ID , (User.IsInRole(ROLE_ADMIN) == true ? 1 : 0) , this.IDEPT_ID).Tables[0]; DoBindingDept(); }
protected void iBtnDelete_Click(object sender, ImageClickEventArgs e) { object[] objList = GetSelectMboList(); Biz_Bsc_Kpi_Info objMBO = new Biz_Bsc_Kpi_Info(); //bool boolOK = objMBO.DeleteMboToKpi(PageUtility.GetIntByValueDropDownList(ddlEstTerm) // , objList // , gUserInfo.Emp_Ref_ID); //string returnMsg = objMBO.RemoveMboToKpi_NW(PageUtility.GetIntByValueDropDownList(ddlEstTerm) // , objList // , gUserInfo.Emp_Ref_ID); string returnMsg = ""; MicroBSC.BSC.Biz.Biz_Bsc_Kpi_Info objBscKpiInfo = new Biz_Bsc_Kpi_Info(); for (int i = 0; i < objList.Length; i++) { returnMsg = ""; objBscKpiInfo.TxrKPIMaster("D", PageUtility.GetIntByValueDropDownList(ddlEstTerm), (int)objList[i] , "", 0, "", "", "", "", "", "", 0, 0, 0, "", "", "", "", "", "", "", 0, "", "", "", "", "", 0, "", "", "", gUserInfo.Emp_Ref_ID, null, out returnMsg); } if (returnMsg.Equals(string.Empty)) { DoBinding(); ltrScript.Text = JSHelper.GetAlertScript("삭제를 완료하였습니다."); } else { //ltrScript.Text = JSHelper.GetAlertScript("삭제가 실패하였습니다."); ltrScript.Text = JSHelper.GetAlertScript(returnMsg); DoBinding(); } }
private void DoBinding() { Biz_Bsc_Kpi_Info objBSC = new Biz_Bsc_Kpi_Info(); DataSet ds = objBSC.GetMBOForWeight(GetRequestByInt("ESTTERM_REF_ID") , "" , "" , "" , 0 , "" , "" , 0 , 0 , 0 , GetRequestByInt("DRAFT_EMP_ID") , false); ugrdMBO.Clear(); ugrdMBO.DataSource = ds.Tables[0]; ugrdMBO.DataBind(); }
private void SetKPIMaster() { Biz_Bsc_Kpi_Info objBSC = new Biz_Bsc_Kpi_Info(this.IEstTermRefID, this.IKpiRefID); lblCalcFormMs.Text = objBSC.Icalc_form_ms; lblCalcFormTs.Text = objBSC.Icalc_form_ts; lblChampionEmpName.Text = objBSC.Ichampion_emp_name; lblMeasurementEmpName.Text = objBSC.Imeasurement_emp_name; lblDataGetheringMethod.Text = objBSC.Idata_gethering_method; lblKpiCode.Text = objBSC.Ikpi_code; lblWordDefinition.Text = PageUtility.GetHtmlEncodeChar(objBSC.Iword_definition); lblResultInputType.Text = objBSC.Iresult_input_type_name; lblResultAchievementType.Text = objBSC.Iresult_achievement_type_name; lblResultTsCalcType.Text = objBSC.Iresult_ts_calc_type_name; lblMeasurementGradeType.Text = objBSC.Imeasurement_grade_type_name; lblUnit.Text = objBSC.Iunit_name; lblResultMeasurementStep.Text = objBSC.Iresult_measurement_step_name; this.IMeasurementStep = objBSC.Iresult_measurement_step; lblTargetReason.Text = PageUtility.GetHtmlEncodeChar(objBSC.Ikpi_target_setting_reason); //txtBWordDefinition.Text = objBSC.Iword_definition; //ddlBResultInputType.SelectedValue = objBSC.Iresult_input_type; //ddlBResultAchievementType.SelectedValue = objBSC.Iresult_achievement_type; //ddlBResultTsCalcType.SelectedValue = objBSC.Iresult_ts_calc_type; //ddlBMeasurementGradeType.SelectedValue = objBSC.Imeasurement_grade_type; //ddlBResultMeasurementStep.SelectedValue = objBSC.Iresult_measurement_step; //ddlBUnit.SelectedValue = objBSC.Iunit_type_ref_id.ToString(); //ddlBResultTermType.SelectedValue = objBSC.Iresult_term_type; //txtBTargetReason.Text = objBSC.Ikpi_target_setting_reason; hdfTargetReasonFile.Value = objBSC.Ikpi_target_reason_file; this.IKpiPoolRefID = objBSC.Ikpi_pool_ref_id; if (objBSC.Iuse_yn == "N") { this.IType = "D"; } this.SetKpiPoolInfo(); }
private void DoBindingDeptMBO() { if (ddlEstTerm.Items.Count < 1) { ltrScript.Text = JSHelper.GetAlertScript("등록된 평가기간이 없습니다."); return; } Biz_Bsc_Kpi_Info objBSC = new Biz_Bsc_Kpi_Info(); DataSet ds = objBSC.GetDeptMboForMBO(PageUtility.GetIntByValueDropDownList(ddlEstTerm) , (ddlComDeptLeft2.SelectedItem.Value == "" ? 0 : PageUtility.GetIntByValueDropDownList(ddlComDeptLeft2)) , txtKpiCodeLeft2.Text.Trim() , txtKpiNameLeft2.Text.Trim() , txtChampionNameLeft2.Text.Trim() , gUserInfo.Emp_Ref_ID , (User.IsInRole(ROLE_ADMIN) == true ? 1 : 0)); ugrdTeamMbo.Clear(); ugrdTeamMbo.DataSource = ds; ugrdTeamMbo.DataBind(); }
/// <summary> /// 지표기본정보 (사업이 있는지 여부) /// </summary> private void SetKPIBaseInfo() { //-------------------- KPI Status Setting Biz_Bsc_Kpi_Info objBSC = new Biz_Bsc_Kpi_Info(this.IEstTermRefID, this.IKpiRefID); DataSet rDs = objBSC.GetKpiStatus(this.IEstTermRefID, this.IKpiRefID, gUserInfo.Emp_Ref_ID); //Biz_Bsc_Kpi_Pool objPool = new Biz_Bsc_Kpi_Pool(objBSC.Ikpi_pool_ref_id); //if (objPool.Ibasis_use_yn == "EQL") //{ // iBtnEstOpinion.Visible = true; // Biz_Bsc_Kpi_Qlt_Score_Had objOpn = new Biz_Bsc_Kpi_Qlt_Score_Had(); // DataSet oDs = objOpn.GetAllList( this.IEstTermRefID // , this.IYMD // , 0 // , this.IKpiRefID //PageUtility.GetIntByValueDropDownList(ddlEstLevel) // , 0); // ugrdEstOpinion.Clear(); // ugrdEstOpinion.DataSource = oDs.Tables[0].DefaultView; // ugrdEstOpinion.DataBind(); //} //else //{ // iBtnEstOpinion.Visible = false; //} if (rDs.Tables[0].Rows.Count > 0) { this.IHaveInitive_YN = rDs.Tables[0].Rows[0]["HAVE_INITIATIVE_YN"].ToString(); if (this.IHaveInitive_YN == "Y") { this.SetProjectList(); } else { this.SetInitiativeInfo(); ugrdPrjList.Clear(); } } }
/// <summary> /// 지표기본정보 (사업이 있는지 여부) /// </summary> private void SetKPIBaseInfo() { //-------------------- KPI Status Setting Biz_Bsc_Kpi_Info objBSC = new Biz_Bsc_Kpi_Info(this.IEstTermRefID, this.IKpiRefID); DataSet rDs = objBSC.GetKpiStatus(this.IEstTermRefID, this.IKpiRefID, gUserInfo.Emp_Ref_ID); Biz_Bsc_Kpi_Pool objPool = new Biz_Bsc_Kpi_Pool(objBSC.Ikpi_pool_ref_id); if (objPool.Ibasis_use_yn == "EQL") { iBtnEstOpinion.Visible = true; } else { iBtnEstOpinion.Visible = false; } if (rDs.Tables[0].Rows.Count > 0) { this.IHaveInitive_YN = rDs.Tables[0].Rows[0]["HAVE_INITIATIVE_YN"].ToString(); if (this.IHaveInitive_YN == "Y") { pnlinitiative.Visible = false; pnlPrj.Visible = true; this.SetProjectList(); } else { pnlinitiative.Visible = true; pnlPrj.Visible = false; this.SetInitiativeInfo(); ugrdPrjList.Clear(); } } }
public void CopyKpiToAnotherEstterm() { int itxr_user = EMP_REF_ID; int estterm_ref_id_to = PageUtility.GetIntByValueDropDownList(ddlEsttermCopy); CheckBox chk; UltraGridRow row; TemplatedColumn col; DataTable dt = new DataTable("tblKpiCopyList"); dt.Columns.Add("ESTTERM_REF_ID_FR", typeof(int)); dt.Columns.Add("KPI_REF_ID", typeof(int)); dt.Columns.Add("ESTTERM_REF_ID_TO", typeof(int)); dt.Columns.Add("TXR_USER", typeof(int)); DataRow dr; for (int i = 0; i < ugrdKpiList.Rows.Count; i++) { row = ugrdKpiList.Rows[i]; col = (TemplatedColumn)row.Band.Columns.FromKey("selchk"); chk = (CheckBox)((CellItem)col.CellItems[row.BandIndex]).FindControl("cBox"); if (chk.Checked) { try { dr = dt.NewRow(); dr["ESTTERM_REF_ID_FR"] = int.Parse(row.Cells.FromKey("ESTTERM_REF_ID").Value.ToString()); dr["KPI_REF_ID"] = int.Parse(row.Cells.FromKey("KPI_REF_ID").Value.ToString()); dr["ESTTERM_REF_ID_TO"] = estterm_ref_id_to; dr["TXR_USER"] = itxr_user; if (dr["ESTTERM_REF_ID_FR"].ToString() == dr["ESTTERM_REF_ID_TO"].ToString()) { ltrScript.Text = JSHelper.GetAlertScript("같은 평가기간 내에서는 복사할 수 없습니다.", false); return; } dt.Rows.Add(dr); } catch (Exception ex) { PageUtility.AlertMessage(ex.Message); return; } } } if (dt.Rows.Count < 1) { PageUtility.AlertMessage("확정 항목을 선택하세요."); } else { Biz_Bsc_Kpi_Info objBSC = new Biz_Bsc_Kpi_Info(); int intRtn = objBSC.CopyKpiToAnotherTerm(dt); string strMsg = "총 [" + dt.Rows.Count.ToString() + "]건중 [" + intRtn.ToString() + "]건이 처리되었습니다."; ltrScript.Text = JSHelper.GetAlertScript(strMsg, false); } }
public void SetMonthlyResultGraph() { Biz_Bsc_Kpi_Info objKpi = new Biz_Bsc_Kpi_Info(this.IEstTermRefID, this.IKpiRefID); lblKpiCode.Text = objKpi.Ikpi_code; lblKpiName.Text = objKpi.Ikpi_name; lblResultInputType.Text = objKpi.Iresult_input_type_name; lblUnitName.Text = objKpi.Iunit_name; Biz_Bsc_Kpi_Result objBSC = new Biz_Bsc_Kpi_Result(this.IEstTermRefID, this.IKpiRefID, this.IYMD); DataSet rDs = objBSC.GetResultAnalysisList(this.IEstTermRefID, this.IKpiRefID, this.IYMD, this.IGoalTong_YN); DataTable dtMs = new DataTable("TBL_MS"); DataTable dtTs = new DataTable("TBL_TS"); dtMs.Columns.Add("MM", typeof(string)); dtMs.Columns.Add("TARGET", typeof(double)); dtMs.Columns.Add("RESULT", typeof(double)); dtTs.Columns.Add("MM", typeof(string)); dtTs.Columns.Add("TARGET", typeof(double)); dtTs.Columns.Add("RESULT", typeof(double)); double dTargetMs = 0; double dTargetTs = 0; double dResultMs = 0; double dResultTs = 0; DataRow[] arrDr = null; DataRow rDr = null; if (rDs.Tables.Count > 0) { if (rDs.Tables[0].Rows.Count > 0) { string sFilter = "KPI_REF_ID=" + this.IKpiRefID.ToString() + " AND YMD='" + this.IYMD + "'"; arrDr = rDs.Tables[0].Select(sFilter); if (arrDr.GetLength(0) > 0) { dTargetMs = double.Parse(arrDr[0]["TARGET_MS"].ToString()); dTargetTs = double.Parse(arrDr[0]["TARGET_TS"].ToString()); dResultMs = double.Parse(arrDr[0]["RESULT_MS"].ToString()); dResultTs = double.Parse(arrDr[0]["RESULT_TS"].ToString()); } } } rDr = dtMs.NewRow(); rDr["MM"] = this.IYMD; rDr["TARGET"] = dTargetMs; rDr["RESULT"] = dResultMs; dtMs.Rows.Add(rDr); rDr = dtTs.NewRow(); rDr["MM"] = this.IYMD; rDr["TARGET"] = dTargetTs; rDr["RESULT"] = dResultTs; dtTs.Rows.Add(rDr); DundasCharts.DundasChartBase(chartMs, ChartImageType.Flash, 360, 200 , BorderSkinStyle.Emboss, Color.FromArgb(181, 64, 1), 2 , Color.FromArgb(0xFF, 0xFF, 0xFE) , Color.FromArgb(0xFF, 0xFF, 0xFE), Color.FromArgb(0x20, 0x80, 0xD0), ChartDashStyle.Solid , -1 , ChartHatchStyle.None, GradientType.TopBottom, AntiAliasing.None); Series serTargetMs = DundasCharts.CreateSeries(chartMs, "Series1", "Default", "계획", null, SeriesChartType.Column, 1, GetChartColor(0), GetChartColor(0), Color.FromArgb(64, 0, 0, 0), 1, 9, Color.FromArgb(64, 64, 64)); Series serResultMs = DundasCharts.CreateSeries(chartMs, "Series2", "Default", "실적", null, SeriesChartType.Column, 1, GetChartColor(1), GetChartColor(1), Color.FromArgb(64, 0, 0, 0), 1, 9, Color.FromArgb(64, 64, 64)); serTargetMs.ToolTip = "#VALY{N0}"; serResultMs.ToolTip = "#VALY{N0}"; chartMs.ChartAreas[chartMs.Series[serTargetMs.Name].ChartArea].AxisY.LabelStyle.Format = "N0"; chartMs.ChartAreas[chartMs.Series[serTargetMs.Name].ChartArea].Area3DStyle.Enable3D = true; chartMs.ToolTip = "#VALY{N0}"; chartMs.DataSource = dtMs.DefaultView; serTargetMs.ValueMemberX = "MM"; serTargetMs.ValueMembersY = "TARGET"; serResultMs.ValueMembersY = "RESULT"; chartMs.DataBind(); DundasCharts.DundasChartBase(chartTs, ChartImageType.Flash, 360, 200 , BorderSkinStyle.Emboss, Color.FromArgb(181, 64, 1), 2 , Color.FromArgb(0xFF, 0xFF, 0xFE) , Color.FromArgb(0xFF, 0xFF, 0xFE), Color.FromArgb(0x20, 0x80, 0xD0), ChartDashStyle.Solid , -1 , ChartHatchStyle.None, GradientType.TopBottom, AntiAliasing.None); Series serTargetTs = DundasCharts.CreateSeries(chartTs, "Series1", "Default", "계획", null, SeriesChartType.Column, 1, GetChartColor(0), GetChartColor(0), Color.FromArgb(64, 0, 0, 0), 1, 9, Color.FromArgb(64, 64, 64)); Series serResultTs = DundasCharts.CreateSeries(chartTs, "Series2", "Default", "실적", null, SeriesChartType.Column, 1, GetChartColor(1), GetChartColor(1), Color.FromArgb(64, 0, 0, 0), 1, 9, Color.FromArgb(64, 64, 64)); serTargetTs.ToolTip = "#VALY{N0}"; serResultTs.ToolTip = "#VALY{N0}"; chartTs.ChartAreas[chartTs.Series[serTargetTs.Name].ChartArea].AxisY.LabelStyle.Format = "N0"; chartTs.ChartAreas[chartTs.Series[serTargetTs.Name].ChartArea].Area3DStyle.Enable3D = true; chartTs.ToolTip = "#VALY{N0}"; chartTs.DataSource = dtTs.DefaultView; serTargetTs.ValueMemberX = "MM"; serTargetTs.ValueMembersY = "TARGET"; serResultTs.ValueMembersY = "RESULT"; chartTs.DataBind(); if (objKpi.Iresult_input_type == "KPI") { this.SetChildKpiGrid(); } else { this.SetInterfaceGrid(); } }
public void SetInterfaceGrid() { Biz_Bsc_Kpi_Info objKpi = new Biz_Bsc_Kpi_Info(this.IEstTermRefID, this.IKpiRefID); lblKpiCode.Text = objKpi.Ikpi_code; lblKpiName.Text = objKpi.Ikpi_name; txtCalcFormMs.Text = objKpi.Icalc_form_ms; txtCalcFormTs.Text = objKpi.Icalc_form_ts; Biz_Bsc_Interface_Kpi_Query objQry = new Biz_Bsc_Interface_Kpi_Query(this.IKpiRefID, ""); this.IDiCode = objQry.IDicode; txtFieldMs.Text = "계산식 : " + objQry.IResult_Field_Ms + "\n" + "조건식 : " + objQry.IResult_Where_Ms; txtFieldTs.Text = "계산식 : " + objQry.IResult_Field_Ts + "\n" + "조건식 : " + objQry.IResult_Where_Ts; if (this.IDiCode == "") { ltrScript.Text = JSHelper.GetAlertScript("정의된 Interface가 없습니다.", true); return; } Biz_Bsc_Interface_Dicode objCode = new Biz_Bsc_Interface_Dicode(this.IDiCode, gUserInfo.Emp_Ref_ID); txtDiCode.Text = objCode.IDicode; txtDiName.Text = objCode.IName; Biz_Bsc_Interface_Column objCol = new Biz_Bsc_Interface_Column(); DataSet rDs = objCol.GetAllList(this.IDiCode, gUserInfo.Emp_Ref_ID); int iRow = 0; string sUseYn = "N"; string sColKey = ""; string sColName = ""; int iDPoints = 0; int iGridWith = 0; UltraGridColumn ugCol; if (rDs.Tables.Count > 0) { iRow = rDs.Tables[0].Rows.Count; if (iRow > 0) { ugCol = new UltraGridColumn(); ugCol.Key = "RDTERM"; ugCol.BaseColumnName = "RDTERM"; ugCol.Header.Caption = "발생일자"; ugCol.Width = Unit.Pixel(100); ugCol.AllowUpdate = AllowUpdate.Yes; ugCol.DataType = "System.String"; ugCol.CellStyle.HorizontalAlign = HorizontalAlign.Left; ugrdInterface.Columns.Add(ugCol); for (int i = 0; i < iRow; i++) { sUseYn = rDs.Tables[0].Rows[i]["USE_YN"].ToString(); sColKey = rDs.Tables[0].Rows[i]["COLUMN_ID"].ToString(); sColName = rDs.Tables[0].Rows[i]["COLUMN_ALIAS"].ToString(); iDPoints = Convert.ToInt32(rDs.Tables[0].Rows[i]["DECIMAL_POINTS"].ToString()); iGridWith = Convert.ToInt32(rDs.Tables[0].Rows[i]["GRID_WIDTH"].ToString()); if (sUseYn == "Y") { if (sColKey.Substring(0, 7) == "SVALUES") { ugCol = new UltraGridColumn(); ugCol.Key = sColKey; ugCol.BaseColumnName = sColKey; ugCol.Header.Caption = sColName; ugCol.Width = Unit.Pixel(iGridWith); ugCol.DataType = "System.String"; ugCol.AllowUpdate = AllowUpdate.Yes; ugCol.CellStyle.HorizontalAlign = HorizontalAlign.Left; ugrdInterface.Columns.Add(ugCol); } else { ugCol = new UltraGridColumn(); ugCol.Key = sColKey; ugCol.BaseColumnName = sColKey; ugCol.Header.Caption = sColName; ugCol.Width = Unit.Pixel(iGridWith); ugCol.AllowUpdate = AllowUpdate.Yes; ugCol.DataType = "System.Double"; ugCol.Format = "#,###,###,###,###,###,###,##0" + this.GetFormatPoints(iDPoints); ugCol.CellStyle.HorizontalAlign = HorizontalAlign.Right; ugrdInterface.Columns.Add(ugCol); } } } } } sRtnMsg = ""; bIsSuccess = false; dRtnVal = 0; DataSet rDsQry = objQry.GetInterfaceData(this.IKpiRefID, this.IYMD, out sRtnMsg, out bIsSuccess); ugrdInterface.Clear(); ugrdInterface.DataSource = rDsQry; ugrdInterface.DataBind(); dRtnVal = objQry.GetInterfaceResultMs(this.IKpiRefID, this.IYMD, out sRtnMsg, out bIsSuccess); txtResult_Ms.Text = (bIsSuccess) ? dRtnVal.ToString() : "0"; dRtnVal = objQry.GetInterfaceResultTs(this.IKpiRefID, this.IYMD.Substring(0, 4) + "01", this.IYMD, out sRtnMsg, out bIsSuccess); txtResult_Ts.Text = (bIsSuccess) ? dRtnVal.ToString() : "0"; }
private void SetResultGrid() { // 골타겟 관련 입력 버튼 (농협에서 추가) string goaltongYN = "N"; if (PageUtility.GetAppConfig("GOALTONG_YN").Equals("Y")) { rdoGoalTong.Visible = true; if (rdoGoalTong.SelectedIndex.Equals(1)) { goaltongYN = "Y"; } } this.SetPageData(); Biz_Bsc_Kpi_Info objBSC = new Biz_Bsc_Kpi_Info(); DataSet ds = objBSC.GetKpiListForResultAnalysisNew(_iestterm_ref_id , _iymd , _iresult_input_method , _ikpi_code , _ikpi_name , _iemp_name , _iest_dept_id , _ithreshold_ref_id , PageUtility.GetByValueDropDownList(ddlSumType) , PageUtility.GetByValueDropDownList(ddlKpiGroupRefID) , PageUtility.GetByValueDropDownList(ddlExternalType) , PageUtility.GetIntByValueDropDownList(ddlGroup) , PageUtility.GetByValueDropDownList(ddlEstYN) , goaltongYN); if (ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0) { ds.Tables[0].Columns.Add("RANK", typeof(int)); ds.Tables[0].Columns.Add("SORT_TYPE", typeof(string)); DataTable dataTable = null; // 순위정렬 성격에 따라 처리 내용 if (ddlOrderType.SelectedValue == "H") { dataTable = PageUtility.FilterSortData(ds.Tables[0], "", "ACHIEVE_RATE_DIFF DESC"); SetRowNum(dataTable, "H"); } else if (ddlOrderType.SelectedValue == "L") { dataTable = PageUtility.FilterSortData(ds.Tables[0], "", "ACHIEVE_RATE_DIFF ASC"); SetRowNum(dataTable, "L"); } else if (ddlOrderType.SelectedValue == "HL") { DataTable dataTable1 = PageUtility.FilterSortData(ds.Tables[0], "", "ACHIEVE_RATE_DIFF DESC"); SetRowNum(dataTable1, "H"); if (!txtCntKpi.Text.Equals(string.Empty)) { DeleteExtraRowsByRowNum(dataTable1, int.Parse(txtCntKpi.Text)); } DataTable dataTable2 = PageUtility.FilterSortData(ds.Tables[0], "", "ACHIEVE_RATE_DIFF ASC"); SetRowNum(dataTable2, "L"); if (!txtCntKpi.Text.Equals(string.Empty)) { DeleteExtraRowsByRowNum(dataTable2, int.Parse(txtCntKpi.Text)); } dataTable1.Merge(dataTable2); dataTable = dataTable1; } else if (ddlOrderType.SelectedValue == "") { dataTable = ds.Tables[0]; } // DataRow 삭제 if (!txtCntKpi.Text.Equals(string.Empty) && ddlOrderType.SelectedValue != "HL") { DeleteExtraRowsByRowNum(dataTable, int.Parse(txtCntKpi.Text)); } ugrdResultStatus.Clear(); ugrdResultStatus.DataSource = dataTable; ugrdResultStatus.DataBind(); } else { ugrdResultStatus.Clear(); ugrdResultStatus.DataSource = ds.Tables[0]; ugrdResultStatus.DataBind(); } }
private void SetResulSetKpiStatusGraph3() { Biz_Bsc_Kpi_Info objBSC = new Biz_Bsc_Kpi_Info(); DataSet ds = objBSC.GetKpiListForResultAnalysis(this.IEstTermRefID , this.IYmd , "" , "" , "" , "" , 0 , 0 , this.ISumType , "" , ""); if (ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0) { DataTable dataTable = ds.Tables[0]; DataRow[] rank1 = dataTable.Select("ACHIEVE_RATE > '120.00'"); DataRow[] rank2 = dataTable.Select("ACHIEVE_RATE > '100.00' AND ACHIEVE_RATE <= '120.00'"); DataRow[] rank3 = dataTable.Select("ACHIEVE_RATE > '80' AND ACHIEVE_RATE <= '100'"); DataRow[] rank4 = dataTable.Select("ACHIEVE_RATE > '60' AND ACHIEVE_RATE <= '80'"); DataRow[] rank5 = dataTable.Select("ACHIEVE_RATE > '40' AND ACHIEVE_RATE < '60'"); DataRow[] rank6 = dataTable.Select("ACHIEVE_RATE >= '0.00' AND ACHIEVE_RATE < '40'"); double[] yValues1 = new double[] { rank1.Length , rank2.Length , rank3.Length , rank4.Length , rank5.Length , rank6.Length }; double[] yValues2 = new double[] { 10, 10, 10, 10, 10, 10 }; string[] xValues1 = new string[] { "120%초과,200.00-120.01" , "100~ 120%이하,120.00-100.01" , "80~100%이하,100.00-80.01" , "60~80%이하,80.00-60.01" , "40~60%이하,60.00-40.01" , "40%미만,40.00-0.00" }; Color[] bColor = new Color[] { Color.FromArgb(220, 224, 64, 10) , Color.FromArgb(220, 225, 140, 240) , Color.FromArgb(220, 252, 180, 65) , Color.FromArgb(220, 224, 64, 10) , Color.FromArgb(220, 224, 64, 10) , Color.FromArgb(220, 192, 192, 192) }; //double[] maxValue = new double[] { 200, 120, 100, 80, 60, 40 }; //double[] minValue = new double[] { 121, 101, 81, 61, 41, 0 }; Array.Sort(yValues1, xValues1); Array.Reverse(xValues1); Array.Reverse(yValues1); chtFunnel.Series["Default"].Points.Clear(); for (int i = 0; i < yValues1.Length; i++) { chtFunnel.Series["Default"].Points.AddXY(xValues1[i], yValues2[i]); chtFunnel.Series["Default"].Points[i].Label = xValues1[i].ToString().Split(',').GetValue(0).ToString() + "\n" + yValues1[i].ToString(); // chtFunnel.Series["Default"].Points[i].Color = bColor[i]; string strUrl = HttpContext.Current.Request.Url.ToString().Substring(0 , HttpContext.Current.Request.Url.ToString().LastIndexOf('/')) + "/BSC0304S1.aspx?" + "PAGE_TYPE=D&MAX_VALUE=" + xValues1[i].ToString().Split(',').GetValue(1).ToString().Split('-').GetValue(0).ToString() + "&MIN_VALUE=" + xValues1[i].ToString().Split(',').GetValue(1).ToString().Split('-').GetValue(1).ToString(); chtFunnel.Series["Default"].Points[i].Href = strUrl; chtFunnel.Series["Default"].Points[i].LabelHref = strUrl; } chtFunnel.Series["Default"]["FunnelLabelStyle"] = "Outside"; chtFunnel.ChartAreas["Default"].Area3DStyle.Enable3D = true; chtFunnel.Series["Default"]["FunnelStyle"] = "YIsHeight"; chtFunnel.Series["Default"]["FunnelOutsideLabelPlacement"] = "Left"; chtFunnel.Series["Default"]["FunnelPointGap"] = "2"; chtFunnel.Series["Default"]["Funnel3DDrawingStyle"] = "CircularBase"; chtFunnel.Series["Default"]["Funnel3DRotationAngle"] = "10"; //chtFunnel.Titles[0].Text = "달성율 분포"; } }