Ejemplo n.º 1
0
    /// <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();
    }
Ejemplo n.º 2
0
    /// <summary>
    /// 조회
    /// </summary>
    public void SetFormData()
    {
        int iTxrUser = gUserInfo.Emp_Ref_ID;
        Biz_Bsc_Interface_Dicode objBSC = new Biz_Bsc_Interface_Dicode(this.IDiCode, iTxrUser);

        lblDICODE.Text     = objBSC.IDicode;
        lblDINAME.Text     = objBSC.IName;
        lblDEFINITION.Text = objBSC.IDefinition;
        lblUseYN.Text      = objBSC.IUse_Yn;
    }
Ejemplo n.º 3
0
    /// <summary>
    /// DICode 리스트 조회
    /// </summary>
    public void SetDicodeGrid()
    {
        Biz_Bsc_Interface_Dicode objBSC = new Biz_Bsc_Interface_Dicode();

        objBSC.IDicode      = txtsCode.Text;
        objBSC.IName        = txtsName.Text;
        objBSC.ICreate_User = gUserInfo.Emp_Ref_ID;
        DataSet dsDicdoe = objBSC.GetAllList(objBSC.IDicode, objBSC.IName, objBSC.ICreate_User);

        ugrdDicode.Clear();
        ugrdDicode.DataSource = dsDicdoe;
        ugrdDicode.DataBind();
    }
Ejemplo n.º 4
0
    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";
    }