Esempio n. 1
0
    private void PrintFormGrid()
    {
        //MicroBSC.BSC.Biz.Biz_Bsc_Score_Card objBSC = new MicroBSC.BSC.Biz.Biz_Bsc_Score_Card();
        //DataSet dsKpi = objBSC.GetEstDeptKpiScoreList
        //                                         ( this.IEstTermRefID
        //                                         , this.IYmd
        //                                         , this.ISumType
        //                                         , this.IEstDeptID
        //                                         , this.IExtKpiYN);

        MicroBSC.BSC.Biz.Biz_Bsc_Score_Card_Personal objBSC = new MicroBSC.BSC.Biz.Biz_Bsc_Score_Card_Personal();
        DataSet dsKpi = objBSC.GetPersonalScoreCard(this.IEstTermRefID
                                                    , this.IYmd
                                                    , this.IDeptType
                                                    , this.ISumType
                                                    , this.IEmpRefID
                                                    , PageUtility.GetIntByValueDropDownList(ddlEstDept));


        ugrdScoreCardPrint.Clear();
        ugrdScoreCardPrint.DataSource = dsKpi;
        ugrdScoreCardPrint.DataBind();

        string strCurDate = DateTime.Now.Year.ToString() + "_" + DateTime.Now.Month.ToString().PadRight(2, '0') + DateTime.Now.Minute.ToString().PadRight(2, '0') + DateTime.Now.Second.ToString().PadRight(2, '0');

        ugrdEEP.ExcelStartRow = 10;
        ugrdEEP.ExportMode    = ExportMode.Download;
        ugrdEEP.DownloadName  = "ScoreCard." + strCurDate + ".xls";
        ugrdEEP.WorksheetName = "ScoreCardFor." + lblDeptName.Text;
        ugrdEEP.Export(ugrdScoreCardPrint);
        ugrdScoreCardPrint.Clear();
    }
Esempio n. 2
0
    public void SetDeptScoreCard()
    {
        MicroBSC.BSC.Biz.Biz_Bsc_Score_Card_Personal objBSC = new MicroBSC.BSC.Biz.Biz_Bsc_Score_Card_Personal();
        DataSet iDs = new DataSet();

        if (rdoGoalTong.SelectedIndex.Equals(0))
        {
            iDs = objBSC.GetPersonalScoreCard(this.IEstTermRefID
                                              , this.IYmd
                                              , this.IDeptType
                                              , this.ISumType
                                              , this.IEmpRefID
                                              , PageUtility.GetIntByValueDropDownList(ddlEstDept));
        }
        else
        {
            iDs = objBSC.GetPersonalScoreCard_Goal(this.IEstTermRefID
                                                   , this.IYmd
                                                   , this.IDeptType
                                                   , this.ISumType
                                                   , this.IEmpRefID
                                                   , PageUtility.GetIntByValueDropDownList(ddlEstDept));
        }

        ugrdScoreCard.Clear();
        ugrdScoreCard.DataSource = iDs.Tables[0].DefaultView;
        ugrdScoreCard.DataBind();

        //lblTotalScore.Style.Add("align", "right");
        //lblTotalScore.Text = (dsTot.Tables[0].Rows.Count > 0) ? double.Parse(dsTot.Tables[0].Rows[0]["POINT"].ToString()).ToString("#,##0.00") : "0";

        //MicroBSC.BSC.Biz.Biz_Bsc_Map_Info objMap = new MicroBSC.BSC.Biz.Biz_Bsc_Map_Info(this.IEstTermRefID
        //                                                                               , this.IEstDeptID
        //                                                                               , this.IYmd);
        //lblDeptName.Text    = objMap.Iest_dept_name;
        //lblDeptVision.Text  = objMap.Idept_vision;
        //lblBSCChampion.Text = objMap.Ibscchampion_name;
    }
Esempio n. 3
0
    public void SetScoreRank()
    {
        this.SetParameter();
        //MicroBSC.BSC.Biz.Biz_Bsc_Score_Card objBSC = new MicroBSC.BSC.Biz.Biz_Bsc_Score_Card();
        MicroBSC.BSC.Biz.Biz_Bsc_Score_Card_Personal objBSC = new MicroBSC.BSC.Biz.Biz_Bsc_Score_Card_Personal();
        DataSet iDs = new DataSet();

        /*
         * if (PageUtility.GetIntByValueDropDownList(ddlEstDept) == 0)
         * {
         *  iDs = objBSC.GetPersonalScoreRank
         *   (this.IEstTermRefID
         *   , this.IYmd
         *   , this.IDeptType
         *   , this.ISumType
         *   , gUserInfo.Emp_Ref_ID
         *   , PageUtility.GetIntByValueDropDownList(ddlEstDept)
         *   );
         * }
         * else
         * {
         *  iDs = objBSC.GetPersonalScoreRankAll
         *   (this.IEstTermRefID
         *   , this.IYmd
         *   , this.IDeptType
         *   , this.ISumType
         *   , gUserInfo.Emp_Ref_ID
         *   , PageUtility.GetIntByValueDropDownList(ddlEstDept)
         *   );
         * }
         */

        if (rdoGoalTong.SelectedIndex.Equals(0))
        {
            iDs = objBSC.GetPersonalScoreRankAll
                      (this.IEstTermRefID
                      , this.IYmd
                      , this.IDeptType
                      , this.ISumType
                      , IEmpRefID// gUserInfo.Emp_Ref_ID
                      , PageUtility.GetIntByValueDropDownList(ddlEstDept)
                      );
        }
        else
        {
            iDs = objBSC.GetPersonalScoreRankAll_Goal
                      (this.IEstTermRefID
                      , this.IYmd
                      , this.IDeptType
                      , this.ISumType
                      , IEmpRefID//gUserInfo.Emp_Ref_ID
                      , PageUtility.GetIntByValueDropDownList(ddlEstDept)
                      );
        }


        //직원id를 매개변수로 받으면 해당 직원에 대한 정보만 출력
        if (WebUtility.GetRequestByInt("EMP_REF_ID") > 0 && iDs.Tables[0].Rows.Count > 0)
        {
            iDs = DataTypeUtility.FilterSortDataSet(iDs, string.Format("EMP_REF_ID={0}", IEmpRefID), null);
        }


        //2012.02.20 박효동 : 허성덕대왕님 요청으로 관리자/bsc관리자/성과평과관리자는 전체보고 팀장은 팀원들만 보고, 일반은 자기것만보도록 수정
        if (!User.IsInRole(ROLE_ADMIN) && !User.IsInRole(ROLE_TEAM_MANAGER) && !User.IsInRole(ROLE_BSCADMIN) && !User.IsInRole(ROLE_ESTADMIN))
        {
            foreach (DataRow dr in iDs.Tables[0].Select("EMP_REF_ID <> " + gUserInfo.Emp_Ref_ID))
            {
                dr.Delete();
            }
        }
        ugrdScore.Clear();
        ugrdScore.DataSource = iDs.Tables[0].DefaultView;
        ugrdScore.DataBind();

        ugrdScoreRankPrint.Clear();
        //ugrdScoreRankPrint.DataSource = iDs;
        ugrdScoreRankPrint.DataSource = iDs.Tables[0].DefaultView;
        ugrdScoreRankPrint.DataBind();

        cntRow = iDs.Tables[0].Rows.Count;

        if (cntRow < 1)
        {
            ugrdScoreCard.Clear();
            this.IEstDeptID       = 0;
            lblDeptName.Text      = " ";
            lblDeptVision.Text    = " ";
            lblBSCChampion.Text   = " ";
            lblRank.Text          = " ";
            lblTotalScore.Text    = " ";
            lblGrade.Text         = " ";
            lblRankAll.Text       = " ";
            iBtnPrintRank.Visible = false;
        }
        else
        {
            iBtnPrintRank.Visible = true;
        }
    }