/// <summary> /// 생성쿼리 검증 /// </summary> public void SetQueryValidate() { Biz_Bsc_Term_Detail objTerm = new Biz_Bsc_Term_Detail(); string sSYmd = objTerm.GetStartEstMonth(); string sCYmd = objTerm.GetReleasedMonth(); decimal dRtnVal = 0; string sRtnMsg = ""; bool bIsSuccess = false; this.IisValidQuery = "Y"; Biz_Bsc_Interface_Kpi_Query objQry = new Biz_Bsc_Interface_Kpi_Query(); // 인터페이스 리스트 DataSet rDs = objQry.GetInterfaceData(txtQUERY_AL.Text, sCYmd, out sRtnMsg, out bIsSuccess); lblSuccessAl.Text = sRtnMsg; lblSuccessAl.BackColor = (bIsSuccess) ? Color.WhiteSmoke : Color.Red; if (!bIsSuccess) { this.IisValidQuery = "N"; } // 당월실적 쿼리결과 dRtnVal = objQry.GetInterfaceResultMs(txtQUERY_MS.Text, sCYmd, out sRtnMsg, out bIsSuccess); lblSuccessMs.Text = sRtnMsg; lblSuccessMs.BackColor = (bIsSuccess) ? Color.WhiteSmoke : Color.Red; if (!bIsSuccess) { this.IisValidQuery = "N"; } // 누적실적 쿼리결과 dRtnVal = objQry.GetInterfaceResultTs(txtQUERY_TS.Text, sSYmd, sCYmd, out sRtnMsg, out bIsSuccess); lblSuccessTs.Text = sRtnMsg; lblSuccessTs.BackColor = (bIsSuccess) ? Color.WhiteSmoke : Color.Red; if (!bIsSuccess) { this.IisValidQuery = "N"; } }
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"; }