Exemple #1
0
    private void SetCtrlSetting(int estterm_ref_id, int est_dept_ref_id)
    {
        Biz_Bsc_Work_Map bizMap = new Biz_Bsc_Work_Map();
        //DataSet dsMap = bizMap.GetWorkMapTotalList(estterm_ref_id, est_dept_ref_id);
        DataSet dsMap = bizMap.GetWorkMapTotalListHeader_DB(estterm_ref_id, est_dept_ref_id);

        if (dsMap.Tables[0].Rows.Count > 0)
        {
            ltrStgMapVision.Text = dsMap.Tables[0].Rows[0]["DEPT_VISION"].ToString();
            ltrStgMapChamp.Text  = dsMap.Tables[0].Rows[0]["BSCCHAMPION_NAME"].ToString();
            this.IMAP_VERSION_ID = DataTypeUtility.GetToInt32(dsMap.Tables[0].Rows[0]["MAP_VERSION_ID"]);
        }

        Biz_Bsc_Term_Detail bizTerm = new Biz_Bsc_Term_Detail();
        string strYMD = bizTerm.GetReleasedMonth();

        this.IYMD = (strYMD == "000000" ? DataTypeUtility.GetToInt32(DateTime.Now.ToString("yyyyMM")) : DataTypeUtility.GetToInt32(strYMD));
        SetViewScoreGrid(estterm_ref_id, est_dept_ref_id, this.IYMD);

        string view_kpi_str = (ViewKPI) ? "1" : "0";

        string url = "../usr/usr_stg_map.aspx?ESTTERM_REF_ID=" + estterm_ref_id.ToString()
                     + "&EST_DEPT_REF_ID=" + est_dept_ref_id.ToString()
                     + "&MAP_VERSION_ID=" + this.IMAP_VERSION_ID
                     + "&TMCODE=" + this.IYMD
                     + "&LINE_TYPE=0"
                     + "&SHOW_KPI_LIST=" + view_kpi_str
                     + "&WORKINGMAPYN=T";

        ifm.Attributes.Add("src", Server.UrlDecode(url));
    }
Exemple #2
0
    /// <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";
        }
    }
Exemple #3
0
    public void SetPreviewGrid()
    {
        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                       = "YMD";
                ugCol.BaseColumnName            = "YMD";
                ugCol.Header.Caption            = "평가월";
                ugCol.Width                     = Unit.Pixel(50);
                ugCol.AllowUpdate               = AllowUpdate.No;
                ugCol.DataType                  = "System.String";
                ugCol.CellStyle.HorizontalAlign = HorizontalAlign.Center;
                ugrdPreview.Columns.Add(ugCol);

                ugCol                           = new UltraGridColumn();
                ugCol.Key                       = "DD";
                ugCol.BaseColumnName            = "DD";
                ugCol.Header.Caption            = "발생일자";
                ugCol.Width                     = Unit.Pixel(35);
                ugCol.AllowUpdate               = AllowUpdate.Yes;
                ugCol.DataType                  = "System.String";
                ugCol.Header.Style.Wrap         = true;
                ugCol.CellStyle.HorizontalAlign = HorizontalAlign.Center;
                ugrdPreview.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;
                            ugrdPreview.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;
                            ugrdPreview.Columns.Add(ugCol);
                        }
                    }
                }
            }
        }

        Biz_Bsc_Term_Detail objTerm = new Biz_Bsc_Term_Detail();
        string sEstMon = objTerm.GetReleasedMonth();

        Random rndObj = new Random();

        for (int i = 0; i < 11; i++)
        {
            ugrdPreview.Rows.Add();
            for (int j = 0; j < ugrdPreview.Columns.Count; j++)
            {
                if (ugrdPreview.Columns[j].DataType == "System.String")
                {
                    if (ugrdPreview.Columns[j].Key == "YMD")
                    {
                        ugrdPreview.Rows[i].Cells.FromKey(ugrdPreview.Columns[j].Key).Value = sEstMon;
                    }
                    else if (ugrdPreview.Columns[j].Key == "DD")
                    {
                        ugrdPreview.Rows[i].Cells.FromKey(ugrdPreview.Columns[j].Key).Value = Convert.ToString(rndObj.Next(1, 31)).PadLeft(2, '0');
                    }
                    else
                    {
                        ugrdPreview.Rows[i].Cells.FromKey(ugrdPreview.Columns[j].Key).Value = "String" + i.ToString();
                    }
                }
                else if (ugrdPreview.Columns[j].DataType == "System.Date")
                {
                    ugrdPreview.Rows[i].Cells.FromKey(ugrdPreview.Columns[j].Key).Value = DateTime.Now;
                }
                else if (ugrdPreview.Columns[j].DataType == "System.Double")
                {
                    ugrdPreview.Rows[i].Cells.FromKey(ugrdPreview.Columns[j].Key).Value = rndObj.NextDouble() * rndObj.Next(1000, 1000000);
                }
            }
        }

        ugrdPreview.Visible = true;
    }