コード例 #1
0
ファイル: Dac_Com_IF.cs プロジェクト: schifflee/bscgit
        public int Select_Diff_EmpInfo_IF_Count(string GUBUN)
        {
            /*
             * string query = @"
             * SELECT  COUNT(*)
             * FROM
             * (
             * SELECT DEPT.DEPT_CODE, DEPT.DEPT_NAME, EMP.EMP_CODE, EMP.EMP_NAME
             *  FROM            REL_DEPT_EMP    REL
             *      INNER JOIN  COM_DEPT_INFO   DEPT
             *          ON  REL.DEPT_REF_ID =   DEPT.DEPT_REF_ID
             *      INNER JOIN  COM_EMP_INFO    EMP
             *          ON  REL.EMP_REF_ID  =   EMP.EMP_REF_ID
             * ) TARGET
             * FULL OUTER JOIN
             * COM_EMP_INFO_IF SRC
             * ON (TARGET.EMP_CODE=SRC.EMP_CODE)
             * ";
             */

            string query = @"
SELECT      COUNT(*)
    FROM
    (
        SELECT  SRC.DEPT_CODE               AS  SRC_DEPT_CODE
                , SRC.DEPT_NAME             AS  SRC_DEPT_NAME
                , SRC.DEPT_USEYN            AS  SRC_DEPT_USEYN
                , SRC.EMP_CODE              AS  SRC_EMP_CODE
                , SRC.EMP_NAME              AS  SRC_EMP_NAME
                , SRC.POSITION_CLASS_CODE   AS  SRC_POSITION_CLASS_CODE
                , SRC.POSITION_GRP_CODE     AS  SRC_POSITION_GRP_CODE
                , SRC.POSITION_RANK_CODE    AS  SRC_POSITION_RANK_CODE
                , SRC.POSITION_DUTY_CODE    AS  SRC_POSITION_DUTY_CODE
                , SRC.POS_KIND_CD           AS  SRC_POS_KIND_CD
                
                , TARGET.DEPT_CODE          AS  TARGET_DEPT_CODE
                , TARGET.DEPT_NAME          AS  TARGET_DEPT_NAME
                , TARGET.EMP_CODE           AS  TARGET_EMP_CODE
                , TARGET.EMP_NAME           AS  TARGET_EMP_NAME

                , CASE WHEN     SRC.EMP_CODE    !=  TARGET.EMP_CODE
                            OR  SRC.DEPT_CODE   !=  TARGET.DEPT_CODE    THEN 'N' ELSE 'Y' END AS GUBUN

                --, ROW_NUMBER() OVER ( ORDER BY SRC.EMP_NAME ASC, TARGET.EMP_NAME ASC) AS RN
            FROM 
                (
                    SELECT  DEPT.DEPT_CODE
                            , DEPT.DEPT_NAME
                            , EMP.EMP_CODE
                            , EMP.EMP_NAME
                        FROM            REL_DEPT_EMP        REL
                            INNER JOIN  COM_DEPT_INFO       DEPT
                                ON  REL.DEPT_REF_ID =   DEPT.DEPT_REF_ID
                            INNER JOIN  COM_EMP_INFO        EMP
                                ON  REL.EMP_REF_ID  =   EMP.EMP_REF_ID
                ) TARGET
                FULL OUTER JOIN
                (
                    SELECT  EMP.EMP_CODE
                            , EMP.EMP_NAME
                            , EMP.DEPT_CODE
                            , DEPT.DEPT_NAME
                            , DEPT.DEPT_USEYN
                            , POSITION_CLASS_CODE
                            , POSITION_CLASS_NAME
                            , POSITION_GRP_CODE
                            , POSITION_GRP_NAME
                            , POSITION_RANK_CODE
                            , POSITION_RANK_NAME
                            , POSITION_DUTY_CODE
                            , POSITION_DUTY_NAME
                            , POS_KIND_CD
                            , POS_KIND_NM
                            , EMP_STRDATE
                            , EMP_ENDDATE
                        FROM
                                        COM_EMP_INFO_IF     EMP
                            INNER JOIN  COM_DEPT_INFO_IF    DEPT
                                ON  EMP.DEPT_CODE   =   DEPT.DEPT_CODE
                        WHERE
                                EMP.INSERT_DATE     IN  (
                                                            SELECT      MAX(INSERT_DATE)
                                                                FROM    COM_EMP_INFO_IF
                                                        )
                            AND DEPT.INSERT_DATE    IN  (
                                                            SELECT      MAX(INSERT_DATE)
                                                                FROM    COM_DEPT_INFO_IF
                                                        )
                ) SRC
                    ON (TARGET.EMP_CODE=SRC.EMP_CODE)
            WHERE   (
                        CASE WHEN     SRC.EMP_CODE    !=  TARGET.EMP_CODE
                            OR  SRC.DEPT_CODE   !=  TARGET.DEPT_CODE    THEN 'N' ELSE 'Y' END   =   @GUBUN   OR  @GUBUN  =''
                    )
                AND SRC.DEPT_USEYN  =   'Y'
    )
";

            IDbDataParameter[] paramArray;

            paramArray = CreateDataParameters(1);

            paramArray[0]       = CreateDataParameter("@GUBUN", SqlDbType.NVarChar);
            paramArray[0].Value = GUBUN;


            object Result = DbAgentObj.ExecuteScalar(query, paramArray);

            return(DataTypeUtility.GetToInt32(Result));
        }
コード例 #2
0
    private void NotPostBackSetting()
    {
        // 골타겟 관련 입력 버튼 (농협에서 추가)
        if (PageUtility.GetAppConfig("GOALTONG_YN").Equals("Y"))
        {
            rdoGoalTong.Visible = true;
        }

        iBtnPrint.Style.Add("vertical-align", "middle");
        ugrdKpiStatusTab.SelectedTab = 0;

        WebCommon.SetSumTypeDropDownList(ddlSumType, false);
        WebCommon.SetScoreCardLevelDropDownList(ddlMapLevel, false);

        if (this.IEstTermRefID > 0 && this.IYmd != "")
        {
            WebCommon.SetEstTermDropDownList(ddlEstTermInfo);
            PageUtility.FindByValueDropDownList(ddlEstTermInfo, this.IEstTermRefID);

            WebCommon.SetTermMonthDropDownList(ddlMonthInfo, PageUtility.GetIntByValueDropDownList(ddlEstTermInfo));
            PageUtility.FindByValueDropDownList(ddlMonthInfo, this.IYmd);
        }
        else
        {
            WebCommon.SetEstTermDropDownList(ddlEstTermInfo);
            WebCommon.SetTermMonthDropDownList(ddlMonthInfo, PageUtility.GetIntByValueDropDownList(ddlEstTermInfo));


            IEstTermRefID = DataTypeUtility.GetToInt32(PageUtility.GetByValueDropDownList(ddlEstTermInfo));
            IYmd          = PageUtility.GetByValueDropDownList(ddlMonthInfo);


            MicroBSC.Integration.COM.Biz.Biz_Rel_Dept_Emp bizRelDeptEmp = new MicroBSC.Integration.COM.Biz.Biz_Rel_Dept_Emp();
            IEstDeptID = DataTypeUtility.GetToInt32(bizRelDeptEmp.Get_Dept_ID_of_Emp_ID(gUserInfo.Emp_Ref_ID.ToString()));
        }


        WebCommon.FillEstMappingTree_NW(trvEstDept, this.IEstTermRefID, this.IEstDeptID, TreeNodeSelectAction.Select);
        //WebCommon.FillEstTree(trvEstDept
        //                    , PageUtility.GetIntByValueDropDownList(ddlEstTermInfo)
        //                    , gUserInfo.Emp_Ref_ID
        //                    , this.IEstDeptID);

        WebCommon.SetExternalScoreCheckBox(chkApplyExtScore, PageUtility.GetIntByValueDropDownList(ddlEstTermInfo));
        chkApplyExtScore.Checked = this.IExtKpiYN;


        this.SetKpiSignalMaster();

        if (trvEstDept.Nodes.Count > 0 && this.IEstDeptID > 0 && this.IEstTermRefID > 0)
        {
            this.SetParameter();

            if (!this.HaveReadRight())
            {
                ltrScript.Text = JSHelper.GetAlertScript("조회할 권한이 없습니다.", false);
                return;
            }

            this.SetDeptMapInfo();
            this.SetDeptScoreCard();
        }
        else if (trvEstDept.Nodes.Count > 0 && this.IEstDeptID < 1 && this.IEstTermRefID < 1)
        {
            trvEstDept.Nodes[0].Select();
            this.IEstDeptID = (trvEstDept.SelectedNode == null) ? 0 : int.Parse(trvEstDept.SelectedNode.Value);
            this.SetParameter();

            if (!this.HaveReadRight())
            {
                return;
            }

            this.SetDeptMapInfo();
            this.SetDeptScoreCard();
        }
        else
        {
            lblDeptName.Text   = "";
            lblTotalScore.Text = "";
            lblDeptVision.Text = "";
            ugrdScoreCard.Clear();
        }
    }
コード例 #3
0
    protected void ibnRandom_Click(object sender, ImageClickEventArgs e)
    {
        Biz_Mul_Est_Target_Pool bizMulEstTargetPool = new Biz_Mul_Est_Target_Pool();

        DataTable DT_dept_ref_id = UltraGridUtility.GetDataSetByCheckedBox(UltraWebGrid1, new string[] { "DEPT_REF_ID" }, "selchk", "cBox").Tables[0];

        StringBuilder dept_ref_id_list = new StringBuilder();


        //전체 직원 정보, 평가, 피평가 포함된 테이블 스키마 복사
        DataTable dtResult = DT_DEPTEMP.Clone();



        for (int i = 0; i < DT_dept_ref_id.Rows.Count; i++)
        {
            string dept_ref_id = DT_dept_ref_id.Rows[i]["DEPT_REF_ID"].ToString();
            if (dept_ref_id_list.Length > 0)
            {
                dept_ref_id_list.Append(", ");
            }
            dept_ref_id_list.Append(dept_ref_id);
        }


        //해당 부서들의 피평가자들 리스트
        DataTable DT_tgt_emp_id = DataTypeUtility.FilterSortDataTable(DT_DEPTEMP, string.Format(" EST_TYPE_TGT = 'TGT' AND DEPT_REF_ID IN ({0}) ", dept_ref_id_list.ToString()));



        //피평가자들의 모든 평가자 리스트
        DataTable DT_est_emp_id = bizMulEstTargetPool.Get_BaseEstEmpList(COMP_ID, EST_ID, ESTTERM_REF_ID, ESTTERM_SUB_ID, DT_tgt_emp_id);



        DT_est_emp_id.Columns.Add("TGT_DEPT_ID");
        DT_est_emp_id.Columns.Add("TGT_EMP_NAME");
        DT_est_emp_id.Columns.Add("TGT_CLASS_CODE");
        DT_est_emp_id.Columns.Add("TGT_CLS_NAME");
        DT_est_emp_id.Columns.Add("TGT_GRP_CODE");
        DT_est_emp_id.Columns.Add("TGT_GRP_NAME");
        DT_est_emp_id.Columns.Add("TGT_RANK_CODE");
        DT_est_emp_id.Columns.Add("TGT_RANK_NAME");
        DT_est_emp_id.Columns.Add("TGT_DUTY_CODE");
        DT_est_emp_id.Columns.Add("TGT_DUT_NAME");
        DT_est_emp_id.Columns.Add("TGT_KIND_CODE");
        DT_est_emp_id.Columns.Add("TGT_KND_NAME");

        StringBuilder est_tgt_list = new StringBuilder();

        for (int i = 0; i < DT_dept_ref_id.Rows.Count; i++)
        {
            string    c_dept_ref_id   = DT_dept_ref_id.Rows[i]["DEPT_REF_ID"].ToString();
            DataTable c_DT_tgt_emp_id = DataTypeUtility.FilterSortDataTable(DT_tgt_emp_id, string.Format("DEPT_REF_ID={0}", c_dept_ref_id));

            //선택된 부서의 피평가자 수만큼 루프
            for (int j = 0; j < c_DT_tgt_emp_id.Rows.Count; j++)
            {
                string tgt_dept_id         = c_DT_tgt_emp_id.Rows[j]["DEPT_REF_ID"].ToString();
                string tgt_emp_id          = c_DT_tgt_emp_id.Rows[j]["EMP_REF_ID"].ToString();
                string tgt_emp_name        = c_DT_tgt_emp_id.Rows[j]["EMP_NAME"].ToString();
                string position_class_code = c_DT_tgt_emp_id.Rows[j]["POSITION_CLASS_CODE"].ToString();
                string pos_cls_name        = c_DT_tgt_emp_id.Rows[j]["POS_CLS_NAME"].ToString();
                string position_grp_code   = c_DT_tgt_emp_id.Rows[j]["POSITION_GRP_CODE"].ToString();
                string pos_grp_name        = c_DT_tgt_emp_id.Rows[j]["POS_GRP_NAME"].ToString();
                string position_rank_code  = c_DT_tgt_emp_id.Rows[j]["POSITION_RANK_CODE"].ToString();
                string pos_rank_name       = c_DT_tgt_emp_id.Rows[j]["POS_RNK_NAME"].ToString();
                string position_duty_code  = c_DT_tgt_emp_id.Rows[j]["POSITION_DUTY_CODE"].ToString();
                string pos_dut_name        = c_DT_tgt_emp_id.Rows[j]["POS_DUT_NAME"].ToString();
                string position_kind_code  = c_DT_tgt_emp_id.Rows[j]["POSITION_KIND_CODE"].ToString();
                string pos_knd_name        = c_DT_tgt_emp_id.Rows[j]["POS_KND_NAME"].ToString();



                //해당 피평가자에 대한 평가자 리스트 추출
                string    filter_Extract_EstEmp = string.Format("TGT_EMP_ID={0} AND EST_EMP_ID <> {0}", tgt_emp_id);
                DataTable dtRandom = DataTypeUtility.FilterSortDataTable(DT_est_emp_id, filter_Extract_EstEmp);



                StringBuilder est_emp_list = new StringBuilder();

                if (dtRandom.Rows.Count > 0)
                {
                    for (int k = 0; k < EST_MAX_COUNT; k++)
                    {
                        int cntRandom = dtRandom.Rows.Count;


                        //행 감소를 체크
                        if (cntRandom == 0)
                        {
                            break;
                        }


                        //랜덤 인덱스
                        Random rnd    = new Random();
                        int    rndNum = rnd.Next();
                        int    rndIdx = rndNum % cntRandom;



                        //평가자 EMP_REF_ID
                        if (est_emp_list.Length > 0)
                        {
                            est_emp_list.Append(", ");
                        }
                        est_emp_list.Append(j.ToString() + "-" + dtRandom.Rows[rndIdx]["EMP_REF_ID"].ToString());



                        DataRow rowRandom = dtRandom.Rows[rndIdx];

                        rowRandom["TGT_DEPT_ID"]    = tgt_dept_id;
                        rowRandom["TGT_EMP_ID"]     = tgt_emp_id;
                        rowRandom["TGT_EMP_NAME"]   = tgt_emp_name;
                        rowRandom["TGT_CLASS_CODE"] = position_class_code;
                        rowRandom["TGT_CLS_NAME"]   = pos_cls_name;
                        rowRandom["TGT_GRP_CODE"]   = position_grp_code;
                        rowRandom["TGT_GRP_NAME"]   = pos_grp_name;
                        rowRandom["TGT_RANK_CODE"]  = position_rank_code;
                        rowRandom["TGT_RANK_NAME"]  = pos_rank_name;
                        rowRandom["TGT_DUTY_CODE"]  = position_duty_code;
                        rowRandom["TGT_DUT_NAME"]   = pos_dut_name;
                        rowRandom["TGT_KIND_CODE"]  = position_kind_code;
                        rowRandom["TGT_KND_NAME"]   = pos_knd_name;



                        //평가자 추가
                        dtResult.ImportRow(rowRandom);



                        //원본 데이터에서 사용한 데이터 삭제 확정
                        rowRandom.Delete();
                        dtRandom.AcceptChanges();
                    }



                    if (est_emp_list.Length > 0)
                    {
                        if (est_tgt_list.Length > 0)
                        {
                            est_tgt_list.Append(";");
                        }
                        est_tgt_list.Append(string.Format("{2}. {0}={1}", tgt_emp_id, est_emp_list.ToString(), i.ToString()));
                    }
                }
            }
        }

        if (dept_ref_id_list.Length == 0)
        {
            dept_ref_id_list.Append("-1");
        }


        DataTable dtEmp = DataTypeUtility.FilterSortDataTable(DT_DEPTEMP, string.Format(" DEPT_REF_ID  IN ({0})  ", dept_ref_id_list));

        MicroBSC.Integration.EST.Biz.Biz_Est_Emp_Est_Target_Map bizEstEmpEstTargetMap = new MicroBSC.Integration.EST.Biz.Biz_Est_Emp_Est_Target_Map();



        //해당 부서에 해당하는 직원이 피평가자로 있는 매핑 데이터를 모두 삭제 후 다시 추가
        string okMsg = bizEstEmpEstTargetMap.AddEmpEstTargetMapFromPool(dtEmp
                                                                        , dtResult
                                                                        , COMP_ID
                                                                        , EST_ID
                                                                        , ESTTERM_REF_ID
                                                                        , ESTTERM_SUB_ID
                                                                        , ConESTTERM_STEP_ID
                                                                        , ConDIRECTION_TYPE
                                                                        , "N"
                                                                        , DateTime.Now
                                                                        , this.gUserInfo.Emp_Ref_ID);

        if (okMsg.Length == 0)
        {
            ltrScript.Text = JSHelper.GetAlertScript("정상 처리 되었습니다.", false);

            DoBinding_Dept();
        }
        else
        {
            ltrScript.Text = JSHelper.GetAlertScript("실패하였습니다.", false);
        }
    }
コード例 #4
0
    protected void UltraWebGrid1_InitializeRow(object sender, Infragistics.WebUI.UltraWebGrid.RowEventArgs e)
    {
        TemplatedColumn cCol = (TemplatedColumn)e.Row.Band.Columns.FromKey("selchk");
        CheckBox        chk  = (CheckBox)((CellItem)cCol.CellItems[e.Row.BandIndex]).FindControl("cBox");

        DataRowView dr = (DataRowView)e.Data;

        e.Row.Cells.FromKey("MENU_TYPE_NAME").Value = GetMenuTypeName(dr["MENU_TYPE"].ToString());

        if (_roleMenuRelDataTable != null && _roleMenuRelDataTable.Rows.Count > 0)
        {
            foreach (DataRow row in _roleMenuRelDataTable.Rows)
            {
                if (DataTypeUtility.GetToInt32(e.Row.Cells.FromKey("MENU_REF_ID").Value) == DataTypeUtility.GetToInt32(row["MENU_REF_ID"]))
                {
                    chk.Checked = true;
                }
            }
        }
    }
コード例 #5
0
ファイル: EST010300.ASPX.cs プロジェクト: schifflee/bscgit
    private void ViewOne(int comp_id, string est_id)
    {
        Biz_EstInfos estInfo = new Biz_EstInfos(comp_id, est_id);

        txtEstID.Text   = estInfo.Est_ID;
        txtEstName.Text = estInfo.Est_Name;

        if (estInfo.Up_Est_ID != DBNull.Value)
        {
            Biz_EstInfos upEstInfo = new Biz_EstInfos(comp_id, estInfo.Up_Est_ID.ToString());
            txtUpEstID.Text  = upEstInfo.Est_Name;
            hdfUpEstID.Value = estInfo.Up_Est_ID.ToString();
        }

        txtHeaderColor.Text = estInfo.Header_Color;

        WebUtility.FindByValueRadioButtonList(rblFixedWeightUseYN, estInfo.Fixed_Weight_Use_YN);
        txtFixedWeight.Text = estInfo.Fixed_Weight.ToString();
        TextBoxCommon.SetOnlyPercent(txtFixedWeight);

        rblFixedWeightUseYN_SelectedIndexChanged(rblFixedWeightUseYN, null);

        WebUtility.FindByValueRadioButtonList(rblGradeConfirmYN, estInfo.Grade_Confirm_YN);
        WebUtility.FindByValueRadioButtonList(rblBiasYN, estInfo.Bias_YN);
        WebUtility.FindByValueRadioButtonList(rblBiasDeptUseID, estInfo.Bias_Dept_Use_YN);

        if (estInfo.Tgt_Opinion_YN.Equals("Y") && estInfo.FeedBack_YN.Equals("N"))
        {
            WebUtility.FindByValueRadioButtonList(rblTgtSendType, "OPN");
        }
        else if (estInfo.Tgt_Opinion_YN.Equals("N") && estInfo.FeedBack_YN.Equals("Y"))
        {
            WebUtility.FindByValueRadioButtonList(rblTgtSendType, "FBK");
        }
        else
        {
            WebUtility.FindByValueRadioButtonList(rblTgtSendType, "N");
        }

        WebUtility.FindByValueDropDownList(ddlPointCtrlStep, estInfo.Point_Ctrl_Step);
        WebUtility.FindByValueDropDownList(ddlGradeCtrlStep, estInfo.Grade_Ctrl_Step);
        WebUtility.FindByValueRadioButtonList(rblOwnerType, estInfo.Owner_Type);
        WebUtility.FindByValueRadioButtonList(rblEstStyle, estInfo.Est_Style_ID);

        if (estInfo.Link_Est_ID != "")
        {
            Biz_EstInfos lnkEstInfo = new Biz_EstInfos(comp_id, estInfo.Link_Est_ID);
            txtLinkEstID.Text  = lnkEstInfo.Est_Name;
            hdfLinkEstID.Value = estInfo.Link_Est_ID;
        }

        WebUtility.FindByValueRadioButtonList(rblWeightType, estInfo.Weight_Type);
        WebUtility.FindByValueRadioButtonList(rblScaleType, estInfo.Scale_Type);
        WebUtility.FindByValueDropDownList(ddlStatusStyleID, estInfo.Status_Style_ID);
        WebUtility.FindByValueDropDownList(ddlQuestionStyleID, estInfo.Q_Style_ID);
        WebUtility.FindByValueDropDownList(ddlBiasTypeID, estInfo.Bias_Type_ID);
        WebUtility.FindByValueRadioButtonList(rblQItemDescUseYN, estInfo.Q_Item_Desc_Use_YN);
        WebUtility.FindByValueRadioButtonList(rblQTgtPosBizUseYN, estInfo.Q_Tgt_Pos_Biz_Use_YN);
        WebUtility.FindByValueRadioButtonList(rblAllStepVisibleYN, estInfo.All_Step_Visible_YN);
        WebUtility.FindByValueRadioButtonList(rblEmpComDeptYN, estInfo.Emp_Com_Dept_YN);
        WebUtility.FindByValueRadioButtonList(rblUseYN, estInfo.Use_YN);
        WebUtility.FindByValueRadioButtonList(rblVisiblePastPointYN, estInfo.Visible_Past_Point_YN.Trim());
        WebUtility.FindByValueRadioButtonList(rblEstQTTMBOYN, estInfo.Est_Qtt_Mbo_YN.Trim());
        WebUtility.FindByValueRadioButtonList(rblMboScoreEstimateYN, estInfo.Mbo_Score_Estimate_YN.Trim());
        WebUtility.FindByValueRadioButtonList(rblDashBoardTYPE, estInfo.DashBoard_TYPE.Trim());
        if (estInfo.DashBoard_TYPE.Trim() == "" || estInfo.DashBoard_TYPE.Trim() == "N")
        {
            rblDashBoardTYPE.Items.FindByValue("N").Selected = true;
            ddlDashBoardTYPE.Style.Add("display", "none");
        }
        else
        {
            rblDashBoardTYPE.Items.FindByValue("Y").Selected = true;
            ddlDashBoardTYPE.Style.Add("display", "block");
            WebUtility.FindByValueDropDownList(ddlDashBoardTYPE, estInfo.DashBoard_TYPE.Trim());
        }

        //이전차수의 질의평가지 보이기 여부
        WebUtility.FindByValueDropDownList(ddlPreviousStempYN, estInfo.Question_Previous_Step_YN.Trim());
        if (estInfo.Q_Style_ID.Trim() == "" || estInfo.Q_Style_ID.Trim() == "BLK")
        {
            divQPSYN.Style.Add("display", "none");
        }
        else
        {
            divQPSYN.Style.Add("display", "true");
        }

        // 평가주기 바인딩
        BindCblEstTermSub(comp_id, est_id);

        // 평가차수 바인딩
        BindCblEstTermStep(comp_id, est_id);

        BindEstJob(comp_id, est_id);

        rblEstStyle_SelectedIndexChanged(null, null);
        rblBiasYN_SelectedIndexChanged(null, null);

        MicroBSC.Integration.EST.Biz.Biz_Est_Outer_Data_Proc_Info bizOuterDataProcInfo = new MicroBSC.Integration.EST.Biz.Biz_Est_Outer_Data_Proc_Info();
        DataTable dtOuterDataProcInfo = bizOuterDataProcInfo.GetOuterDataProcInfo(comp_id
                                                                                  , est_id).Tables[0];

        if (dtOuterDataProcInfo.Rows.Count > 0)
        {
            txtQueryString.Text = DataTypeUtility.GetValue(dtOuterDataProcInfo.Rows[0]["QUERY_STRING"]);
        }
    }
コード例 #6
0
ファイル: EST060300.aspx.cs プロジェクト: schifflee/bscgit
    private string GetWeightName(string est_id, string weight_type, ref string weight)
    {
        string reVal       = "<b>가중치</b><br>";
        string weight_name = string.Empty;

        if (weight_type.Equals("DPT"))
        {
            DataRow[] rows = DS_DETAIL.Tables[0].Select(string.Format(" EST_ID = '{0}' ", est_id));

            if (rows.Length > 0)
            {
                weight = (rows[0]["WEIGHT"].ToString().Equals("")) ? "" : rows[0]["WEIGHT"].ToString();
            }
            else
            {
                weight = "";
            }

            if (weight.Equals(""))
            {
                weight_name = "";
            }
            else
            {
                weight_name = "&nbsp;부서:" + weight + "%";
            }
        }
        else if (weight_type.Equals("POS"))
        {
            Biz_DeptPosDetails biz = new Biz_DeptPosDetails();
            DataSet            ds  = biz.GetDeptPosDetail(COMP_ID
                                                          , ESTTERM_REF_ID
                                                          , DataTypeUtility.GetToInt32(TreeView1.SelectedNode.Value)
                                                          , est_id);

            if (ds.Tables[0].Rows.Count > 0)
            {
                foreach (DataRow row in ds.Tables[0].Rows)
                {
                    string no     = "&nbsp;" + row["SEQ"].ToString() + ".";
                    string pos_id = GetPosName(row["POS_ID"].ToString(), row["POS_VALUE"].ToString());
                    weight = (row["WEIGHT"].ToString().Equals("")) ? "" : row["WEIGHT"].ToString() + "%" + "<br>";

                    weight_name += no + pos_id + weight;
                }
            }
            else
            {
                weight_name = "";
            }
        }

        reVal += weight_name;

        if (reVal.Equals("<b>가중치</b><br>"))
        {
            return("");
        }

        return(reVal);
    }
コード例 #7
0
    protected void ibnSave_Click(object sender, ImageClickEventArgs e)
    {
        int    intEstTermSubID   = DataTypeUtility.GetToInt32(txtEstTermSubID.Text);
        string strEstTermSubName = txtEstTermSubName.Text;
        double weight            = DataTypeUtility.GetToDouble(txtWeight.Text);
        string year_yn           = DataTypeUtility.GetBooleanToYN(ckbYearYN.Checked);
        int    sort_order        = DataTypeUtility.GetToInt32(txtSortOrder.Text);
        string use_yn            = DataTypeUtility.GetBooleanToYN(ckbUseYN.Checked);
        int    startMonth        = DataTypeUtility.GetToInt32(txtStartMonth.Text);
        int    endMonth          = DataTypeUtility.GetToInt32(txtEndMonth.Text);

        Biz_TermSubs termSubs = new Biz_TermSubs();

        if (PageWriteMode == WriteMode.New)
        {
            bool bDuplicate = termSubs.IsExist(COMP_ID, intEstTermSubID);

            if (bDuplicate)
            {
                ltrScript.Text = JSHelper.GetAlertScript("존재하는 평가주기 ID가 있습니다.");
                return;
            }

            bool bResult = termSubs.AddTermSub(COMP_ID
                                               , intEstTermSubID
                                               , strEstTermSubName
                                               , weight
                                               , year_yn
                                               , sort_order
                                               , startMonth
                                               , endMonth
                                               , use_yn
                                               , DateTime.Now
                                               , EMP_REF_ID);

            if (bResult)
            {
                GridBinding(COMP_ID);
                ButtonStatusInit();
            }
            else
            {
                ltrScript.Text = JSHelper.GetAlertScript("저장 중 오류가 발생되었습니다.");
                return;
            }
        }
        else if (PageWriteMode == WriteMode.Modify)
        {
            bool bResult = termSubs.ModifyTermSub(COMP_ID
                                                  , intEstTermSubID
                                                  , strEstTermSubName
                                                  , weight
                                                  , year_yn
                                                  , sort_order
                                                  , startMonth
                                                  , endMonth
                                                  , use_yn
                                                  , DateTime.Now
                                                  , EMP_REF_ID);

            if (bResult)
            {
                GridBinding(COMP_ID);
                ButtonStatusInit();
            }
            else
            {
                ltrScript.Text = JSHelper.GetAlertScript("수정 중 오류가 발생하였습니다.");
                return;
            }
        }
    }
コード例 #8
0
    private void DoCompute()
    {
        MicroBSC.Integration.COM.Biz.Biz_NHIT bizNHIT = new MicroBSC.Integration.COM.Biz.Biz_NHIT();
        DataTable dtNHIT = bizNHIT.GetJeonSa("A"
                                             , 10
                                             , ""
                                             , "", TG_GUBUN);

        //object objMaxYear =  dtNHIT.Compute("MAX(CR_YEAR)", "");
        //object objMaxMonth = dtNHIT.Compute("MAX(CR_MONTH)", string.Format(" CR_YEAR = '{0}' ", objMaxYear));

        object objMaxYear  = CR_YEAR;
        object objMaxMonth = CR_MONTH;

        DataRow[] rows = dtNHIT.Select(string.Format(" CR_YEAR = '{0}' AND CR_MONTH = '{1}' ", objMaxYear, objMaxMonth), " SORT_ORDER ");

        if (rows.Length > 0)
        {
            lblYearMonth.Text = string.Format("{0}년 {1}월", objMaxYear, objMaxMonth);

            double rate1p = 0;
            double rate2p = 0;
            double rate3p = 0;


            lblMeDon.Text = String.Format("{0:##,##0}", DataTypeUtility.GetToInt32(rows[0][10]));
            lblMePer.Text = String.Format("{0:##,##0.00}", DataTypeUtility.GetToDouble(rows[0][11]) * 100) + "%";

            lblYoungDon.Text = String.Format("{0:##,##0}", DataTypeUtility.GetToInt32(rows[1][10]));
            lblYoungPer.Text = String.Format("{0:##,##0.00}", DataTypeUtility.GetToDouble(rows[1][11]) * 100) + "%";

            lblDangDon.Text = String.Format("{0:##,##0}", DataTypeUtility.GetToInt32(rows[2][10]));
            lblDangPer.Text = String.Format("{0:##,##0.00}", DataTypeUtility.GetToDouble(rows[2][11]) * 100) + "%";

            rate1p = DataTypeUtility.GetToDouble(rows[0][11]) * 100 * 0.5;
            rate2p = DataTypeUtility.GetToDouble(rows[1][11]) * 100 * 0.5;
            rate3p = DataTypeUtility.GetToDouble(rows[2][11]) * 100 * 0.5;

            //if (rate < rate1p)
            //{
            //    rate = rate1p;
            //}

            //if (rate < rate2p)
            //{
            //    rate = rate2p;
            //}

            //if (rate < rate3p)
            //{
            //    rate = rate3p;
            //}

            //if (rate > 100)
            //{
            //    rate1p = (rate1p == 0) ? rate1p : (rate1p / rate * 100);
            //    rate2p = (rate2p == 0) ? rate2p : (rate2p / rate * 100);
            //    rate3p = (rate3p == 0) ? rate3p : (rate3p / rate * 100);
            //}

            if (rate1p < 0)
            {
                rate1p = 0;
            }
            if (rate1p > 100)
            {
                rate1p = 100;
            }

            if (rate2p < 0)
            {
                rate2p = 0;
            }
            if (rate2p > 100)
            {
                rate2p = 100;
            }

            if (rate3p < 0)
            {
                rate3p = 0;
            }
            if (rate3p > 100)
            {
                rate3p = 100;
            }

            string wid1        = @"width:{0}%";
            string widthvalue1 = string.Format(wid1, rate1p);
            divMe.Attributes.Add("style", widthvalue1);

            string wid2        = @"width:{0}%";
            string widthvalue2 = string.Format(wid2, rate2p);
            divYoung.Attributes.Add("style", widthvalue2);

            string wid3        = @"width:{0}%";
            string widthvalue3 = string.Format(wid3, rate3p);
            divDang.Attributes.Add("style", widthvalue3);

            double avg       = (rate1p + rate2p + rate2p / 3);
            string grade     = "U";
            string colorCode = "#b8b8b8";

            if (avg >= 100)
            {
                grade     = "S";
                colorCode = "#6fe1e0";
            }
            else if (avg >= 90 && avg < 100)
            {
                grade     = "A";
                colorCode = "#6fe1e0";
            }
            else if (avg >= 80 && avg < 90)
            {
                grade     = "B";
                colorCode = "#a8f620";
            }
            else if (avg >= 70 && avg < 80)
            {
                grade     = "C";
                colorCode = "#f6c739";
            }
            else if (avg < 70)
            {
                grade     = "D";
                colorCode = "#fb7716";
            }
            //else if(avg <= 50)
            //{
            //    grade = "U";
            //    colorCode = "#b8b8b8";
            //}


            lblG.Text      = grade;
            lblG.ForeColor = Color.FromName(colorCode);

            //            .fcols{color: #8fc9fa;}
            //.fcola{color: #6fe1e0;}
            //.fcolb{color: #a8f620;}
            //.fcolc{color: #f6c739;}
            //.fcold{color: #fb7716;}
            //.fcolu{color: #b8b8b8;}
        }
    }
コード例 #9
0
    private void DoDrawingInPower(DataTable dtChart, Chart chart)
    {
        // 당월그래프
        MSCharts.DundasChartBase(chart
                                 , ChartImageType.Jpeg
                                 , ChartWidth
                                 , ChartHeight
                                 , BorderSkinStyle.Emboss
                                 , CHART_BORDER_GRAY
                                 , 1
                                 , Color.FromArgb(0xFF, 0xFF, 0xFE)
                                 , Color.FromArgb(0xFF, 0xFF, 0xFE)
                                 , Color.FromArgb(0x20, 0x80, 0xD0)
                                 , ChartDashStyle.Solid
                                 , -1
                                 , ChartHatchStyle.None
                                 , MsGradientType.Center
                                 , MsAntiAliasing.Graphics);

        chart.DataSource = dtChart;

        string target = "-";

        if (dtChart.Rows.Count > 0)
        {
            target = DataTypeUtility.GetValue(dtChart.Rows[0]["TARGET_FULL_RATE"]);
        }


        Series series1 = MSCharts.CreateSeries(chart, "serPlan", "Default", string.Format("목표 가득율 ({0}%)", target), null, SeriesChartType.Line, 1
                                               , CHART_LINE_BLUE, Color.FromArgb(180, 26, 59, 105), Color.FromArgb(64, 0, 0, 0), 1, 9, Color.FromArgb(64, 64, 64));
        Series series2 = MSCharts.CreateSeries(chart, "serActl", "Default", "가득율", null, SeriesChartType.Line, 1
                                               , CHART_LINE_ORANGE, Color.FromArgb(180, 26, 59, 105), Color.FromArgb(64, 0, 0, 0), 1, 8, Color.FromArgb(64, 64, 64));//Font="Trebuchet MS, 4pt, style=Bold">



        // Enable data points labels
        //series1.IsValueShownAsLabel = true;
        //series2.IsValueShownAsLabel = true;

        series1.BorderWidth  = 2;
        series1.ShadowOffset = 0;
        //series1.BorderColor = GetChartColor2(0);
        series1.Label = "#VALY{P0}";

        // Set spline line tension
        //series2["LineTension"] = "0.1";

        // Enable data points markers
        //series2.MarkerStyle = MarkerStyle.Circle;
        //series2.MarkerSize = 5;
        //series2.MarkerColor = Color.Magenta;

        series2.BorderWidth  = 2;
        series2.ShadowOffset = 0;
        series2.Label        = "#VALY{P0}";
        //series2.BorderColor = GetChartColor2(1);

        series1.YValueMembers = "TARGET_FULL_RATE_001";
        series2.YValueMembers = "RESULT_FULL_RATE_001";
        series1.XValueMember  = "CR_MONTH_NAME";


        series1.ToolTip = "#VALY{P0}";
        series2.ToolTip = "#VALY{P0}";


        string sChartArea2 = chart.Series[series2.Name].ChartArea;

        chart.ChartAreas[sChartArea2].AxisY.LabelStyle.Format = "P0";
        chart.ChartAreas[sChartArea2].AxisY.IsStartedFromZero = false;
        chart.ChartAreas[sChartArea2].AxisX.IsMarginVisible   = true;
        chart.ChartAreas[sChartArea2].AxisY2.Enabled          = AxisEnabled.False;

        DoSettingChartStyles(chart, "#%");

        // Show as 3D
        if (rdoChartType.SelectedIndex == 0)
        {
            chart.ChartAreas[sChartArea2].Area3DStyle.Enable3D = false;
        }
        else
        {
            chart.ChartAreas[sChartArea2].Area3DStyle.Enable3D = true;
        }

        chart.DataBind();
    }
コード例 #10
0
        public int NewSeq(IDbConnection conn
                          , IDbTransaction trx
                          , int estterm_ref_id
                          , int est_dept_ref_id
                          , string ymd
                          , string st_up_tbl_id
                          , string st_tbl_id
                          , string ed_up_tbl_id
                          , string ed_tbl_id)
        {
            int reVal = 0;

            string query = @"

 SELECT MAX(SEQ) FROM BSC_MAP_STG_MANUAL
 WHERE ESTTERM_REF_ID   =   @ESTTERM_REF_ID
   AND YMD              =   @YMD
   AND EST_DEPT_REF_ID  =   @EST_DEPT_REF_ID
   AND (ST_UP_TBL_ID       =   @ST_UP_TBL_ID          OR          @ST_UP_TBL_ID      =       '')
   AND (ST_TBL_ID          =   @ST_TBL_ID             OR          @ST_TBL_ID         =       '')
   AND (ED_UP_TBL_ID       =   @ED_UP_TBL_ID          OR          @ED_UP_TBL_ID      =       '')
   AND (ED_TBL_ID          =   @ED_TBL_ID             OR          @ED_TBL_ID         =       '')

                           ";

            IDbDataParameter[] paramArray = CreateDataParameters(7);

            paramArray[0]       = CreateDataParameter("@ESTTERM_REF_ID", SqlDbType.Int);
            paramArray[0].Value = estterm_ref_id;
            paramArray[1]       = CreateDataParameter("@EST_DEPT_REF_ID", SqlDbType.VarChar);
            paramArray[1].Value = est_dept_ref_id;
            paramArray[2]       = CreateDataParameter("@YMD", SqlDbType.Int);
            paramArray[2].Value = ymd;
            paramArray[3]       = CreateDataParameter("@ST_UP_TBL_ID", SqlDbType.VarChar);
            paramArray[3].Value = st_up_tbl_id;
            paramArray[4]       = CreateDataParameter("@ST_TBL_ID", SqlDbType.VarChar);
            paramArray[4].Value = st_tbl_id;
            paramArray[5]       = CreateDataParameter("@ED_UP_TBL_ID", SqlDbType.VarChar);
            paramArray[5].Value = ed_up_tbl_id;
            paramArray[6]       = CreateDataParameter("@ED_TBL_ID", SqlDbType.VarChar);
            paramArray[6].Value = ed_tbl_id;
            //paramArray[7] = CreateDataParameter("@oRTN_MSG", SqlDbType.VarChar, 1000);
            //paramArray[7].Direction = ParameterDirection.Output;
            //paramArray[8] = CreateDataParameter("@oRTN_COMPLETE_YN", SqlDbType.Char, 1);
            //paramArray[8].Direction = ParameterDirection.Output;

            IDataParameterCollection col;
            object objMaxSeq = DbAgentObj.ExecuteScalar(conn, trx, query, paramArray, CommandType.Text, out col);

            if (objMaxSeq == null || objMaxSeq == DBNull.Value)
            {
                reVal = 0;
            }
            else
            {
                reVal = DataTypeUtility.GetToInt32(objMaxSeq) + 1;
            }

            //this.Transaction_Message = GetOutputParameterValueBySP(col, "@oRTN_MSG").ToString();
            //this.Transaction_Result = GetOutputParameterValueBySP(col, "@oRTN_COMPLETE_YN").ToString();

            return(reVal);
        }
コード例 #11
0
ファイル: EIS010300.aspx.cs プロジェクト: schifflee/bscgit
    private void BindChart(Chart chart
                           , DataTable dt
                           , string titleName
                           , System.Web.UI.WebControls.Label lbl)
    {
        dt.Columns.Add("TEXT", typeof(string));

        foreach (DataRow dr in dt.Rows)
        {
            dr["TEXT"] = string.Format("{0}({2}%)"
                                       , dr["ALIAS"]
                                       , DataTypeUtility.GetToDouble(dr["RESULT_TS"]).ToString("#,##0.00")
                                       , DataTypeUtility.GetToDouble(dr["RATE"]).ToString("#,##0.00"));
        }

        DundasCharts.DundasChartBase(chart
                                     , ChartImageType.Flash
                                     , 480
                                     , 300
                                     , 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 series1 = DundasCharts.CreateSeries(chart
                                                   , "Series1"
                                                   , "Default"
                                                   , null
                                                   , null
                                                   , SeriesChartType.Doughnut
                                                   , 1
                                                   , GetChartColor(0)
                                                   , Color.FromArgb(0x4A, 0x58, 0x7E)
                                                   , Color.FromArgb(64, 0, 0, 0)
                                                   , 1
                                                   , 9
                                                   , Color.FromArgb(64, 64, 64));

        //series1.Label   = "#VALY{N0}";

        series1.ToolTip = "#VALY{N0}";

        //series1.ShowLabelAsValue = true;
        //series1.ShowInLegend = true;

        chart.ChartAreas["Default"].AxisY.LabelStyle.Format = "N0";

        DundasAnimations.DundasChartBase(chart, AnimationTheme.None, -1, -1, false, 1);
        DundasAnimations.GrowingAnimation(chart, series1, 0.5, 1.5, true);

        //for (int i = 0; i < dt.Rows.Count; i++)
        //{
        //    series1.Points[i].AxisLabel = dt.Rows[i]["ALIAS"].ToString();
        //}

        //for (int i = 0; i < dt.Rows.Count; i++)
        //{
        //    series1.Points.AddY(dt.Rows[i]["RESULT_TS"]);
        //}

        series1.Font = new Font("굴림", 7, FontStyle.Regular);

        DataTable dtData = DataTypeUtility.FilterSortDataTable(dt, "KPI_REF_ID <> 0");

        for (int i = 0; i < dtData.Rows.Count; i++)
        {
            series1.Points.AddXY(dt.Rows[i]["TEXT"].ToString(), dt.Rows[i]["RESULT_TS"]);
        }

        if (series1.Type == SeriesChartType.Pie || series1.Type == SeriesChartType.Doughnut)
        {
            for (int p = 0; p < series1.Points.Count; p++)
            {
                DataPoint point = series1.Points[p];

                point.Color = GetChartColor(p);
            }
        }

        //series1.ToolTip = "#VALY{#,##0,00}";
        //series2.ToolTip = "#VALY{#,##0}";

        //series2.MarkerStyle         = MarkerStyle.Circle;
        //series2.MarkerColor         = Color.FromArgb(0xFF, 0xAA, 0x20);
        //series2.MarkerBorderColor   = Color.FromArgb(0xD7, 0x41, 0x01);

        Font font = new Font("Gulim", 11, FontStyle.Regular);

        Dundas.Charting.WebControl.Title title = DundasCharts.CreateTitle(chart
                                                                          , "Title1"
                                                                          , titleName
                                                                          , font
                                                                          , Color.FromArgb(26, 59, 105)
                                                                          , Color.Empty
                                                                          , Color.Empty
                                                                          , ContentAlignment.TopCenter
                                                                          , null
                                                                          , Color.FromArgb(32, 0, 0, 0)
                                                                          , 3
                                                                          , false
                                                                          , 5
                                                                          , 7
                                                                          , 91
                                                                          , 6);

        Legend legend = DundasCharts.CreateLegend(chart
                                                  , "Default"
                                                  , Color.Transparent
                                                  , Color.Empty
                                                  , Color.Empty);

        DundasCharts.SetChartArea(chart.ChartAreas["Default"], true);

        series1.Font             = new Font("굴림", 8, FontStyle.Regular);
        series1["PieLabelStyle"] = "Outside";

        legend.LegendStyle = LegendStyle.Table;
        legend.AutoFitText = false;
        legend.Docking     = LegendDocking.Bottom;
        //legend.Alignment = StringAlignment.Near;
        //legend.Position = new ElementPosition(60, 7, 50, 24);
        //legend.Enabled = false;
        //legend.DockInsideChartArea = true;
        //chart.ChartAreas["Default"].AlignOrientation = AreaAlignOrientation.Horizontal;

        DataRow[] drCol = dt.Select(string.Format("KPI_REF_ID = 0"));

        if (drCol.Length > 0)
        {
            lbl.Text = DataTypeUtility.GetToDouble(drCol[0]["RESULT_TS"]).ToString("#,##0");
        }
        else
        {
            lbl.Text = "0";
        }
    }
コード例 #12
0
        public DataTable Select_Pms_Info_Join_Prj_Info(object start_date, object end_date, object PRJ_NAME, object est_emp_id, EST_GUBUN gubun)

        {
            string query = @"
SELECT  PRJ_ID
      , PRJ_NAME
      , DEPT_NAME
      , PM_EMP_NAME
      --, EMP_WORK_MM
      , PRJ_REF_ID
      , PRJ_EST_DATE
      , PRJ_EST_STATUS
      , EST_DEPT_ID
      , EST_EMP_ID
      , TO_CHAR(PRJ_ENDDATE,'YYYY-MM-DD') AS PRJ_ENDDATE
      , TO_CHAR(PRJ_STARTDATE,'YYYY-MM-DD') AS PRJ_STARTDATE
    FROM
        (
            SELECT
                    PMS.PRJ_ID          AS  PRJ_ID
                    , PMS.PRJ_NM        AS  PRJ_NAME

                    , CASE  WHEN    DEPT.DEPT_NAME      IS NULL     THEN    CAST(PMS.PRJ_DEPT_ID AS varchar(100))
                                                                    ELSE    DEPT.DEPT_NAME
                        END             AS  DEPT_NAME

                    , PMS.PM_EMP_NAME   AS  PM_EMP_NAME

                    , CASE  WHEN    PRJ.PRJ_REF_ID      IS NULL     THEN    '-'
                                                                    ELSE    CAST(PRJ.PRJ_REF_ID AS varchar(100))
                        END             AS  PRJ_REF_ID

                    , CASE  WHEN    PRJ.PRJ_REF_ID      IS NULL     THEN    'N'
                                                                    ELSE    'Y'
                        END             AS  PRJ_REF_ID_YN

                    , CASE  WHEN    PRJ_DATA.STATUS_ID  =   'E'     THEN    CAST(PRJ_DATA.STATUS_DATE AS varchar(100))
                                                                    ELSE    '-'
                        END             AS  PRJ_EST_DATE

                    , CASE  WHEN    PRJ_DATA.STATUS_ID  IS NULL     THEN    '-'
                                                                    ELSE    PRJ_DATA.STATUS_ID
                        END             AS  PRJ_EST_STATUS
                    , PMS.PRJ_DEPT_ID   AS  EST_DEPT_ID
                    , PMS.PM_EMP_ID     AS  EST_EMP_ID
                    , PMS.PRJ_ENDDATE   AS  PRJ_ENDDATE
                    , PMS.PRJ_STARTDATE AS  PRJ_STARTDATE
                FROM
                        (
                            SELECT 
                                        PROJECTID           AS PRJ_ID
                                        , PROJECTNAME       AS PRJ_NM
                                        , TEAM_BSC_DEPT_ID  AS PRJ_DEPT_ID
                                        , PM_BSC_EMP_ID     AS PM_EMP_ID
                                        , PMNAME            AS PM_EMP_NAME
                                        , PROJECTENDDATE    AS PRJ_ENDDATE
                                        , PROJECTSTARTDATE  AS PRJ_STARTDATE
                                FROM
                                        PMS_INFO
                                WHERE   
                                        PROJECTENDDATE    BETWEEN     @START_DATE
                                                              AND     @END_DATE
                                GROUP BY
                                        PROJECTID
                                        , PROJECTNAME
                                        , TEAM_BSC_DEPT_ID
                                        , PM_BSC_EMP_ID
                                        , PMNAME
                                        , PROJECTENDDATE
                                        , PROJECTSTARTDATE
                        )               PMS
                LEFT OUTER JOIN
                        PRJ_INFO        PRJ
                    ON  PMS.PRJ_ID                  =       PRJ.PRJ_CODE
                LEFT OUTER JOIN
                        COM_DEPT_INFO   DEPT
                    ON  PMS.PRJ_DEPT_ID             =       DEPT.DEPT_REF_ID
                LEFT OUTER JOIN
                        PRJ_DATA
                    ON  (  
                            PRJ.PRJ_REF_ID          =       PRJ_DATA.PRJ_REF_ID
                        AND PRJ_DATA.TGT_DEPT_ID    =   -1
                        AND PRJ_DATA.TGT_EMP_ID     =   -1
                        )
        )
    WHERE
                PRJ_NAME        LIKE    @PRJ_NAME
        AND (   PRJ_REF_ID_YN   =     @GUBUN        OR  @GUBUN      ='' )
        AND (   EST_EMP_ID      =     @EST_EMP_ID   OR  @EST_EMP_ID = 0 )
    GROUP BY
        PRJ_ID
      , PRJ_NAME
      , DEPT_NAME
      , PM_EMP_NAME
      --, EMP_WORK_MM
      , PRJ_REF_ID
      , PRJ_EST_DATE
      , PRJ_EST_STATUS
      , EST_DEPT_ID
      , EST_EMP_ID
      , PRJ_ENDDATE
      , PRJ_STARTDATE
    ORDER BY
        PRJ_ENDDATE DESC
";


            IDbDataParameter[] paramArray = CreateDataParameters(5);

            paramArray[0]       = CreateDataParameter("@START_DATE", SqlDbType.Date);
            paramArray[0].Value = start_date;
            paramArray[1]       = CreateDataParameter("@END_DATE", SqlDbType.Date);
            paramArray[1].Value = end_date;
            paramArray[2]       = CreateDataParameter("@PRJ_NAME", SqlDbType.NVarChar);
            paramArray[2].Value = "%" + DataTypeUtility.GetString(PRJ_NAME) + "%";
            paramArray[3]       = CreateDataParameter("@EST_EMP_ID", SqlDbType.Int);
            paramArray[3].Value = est_emp_id;


            string strGubun;

            if (gubun == EST_GUBUN.TOTAL)
            {
                strGubun = "";
            }
            else if (gubun == EST_GUBUN.EXCLUDED_PRJ_INFO)
            {
                strGubun = "N";
            }
            else
            {
                strGubun = "Y";
            }
            paramArray[4]       = CreateDataParameter("@GUBUN", SqlDbType.NVarChar);
            paramArray[4].Value = strGubun;



            DataTable dt = DbAgentObj.FillDataSet(query, "PMS_INFO_JOIN_PRJ_INFO", null, paramArray, CommandType.Text).Tables[0];

            return(dt);
        }
コード例 #13
0
ファイル: EST050100.aspx.cs プロジェクト: schifflee/bscgit
    protected void ibnSave_Click(object sender, ImageClickEventArgs e)
    {
        string est_sche_id = txtEstScheID.Text.Trim();

        if (est_sche_id.Length == 0)
        {
            est_sche_id = hdfEstScheId.Value.Trim();
        }

        string up_est_sche_id = hdfUpEstScheID.Value.Trim();
        string est_sche_name  = txtEstScheName.Text.Trim();
        string est_sche_desc  = txtEstScheDesc.Text.Trim();
        int    sort_order     = DataTypeUtility.GetToInt32(txtSortOrder.Text);
        string est_id         = hdfEstID.Value.Trim();

        Biz_ScheInfos scheInfos = new Biz_ScheInfos();

        if (PageWriteMode == WriteMode.New)
        {
            bool bDuplicate = scheInfos.IsExist(COMP_ID, est_sche_id);

            if (bDuplicate == true)
            {
                ltrScript.Text = JSHelper.GetAlertScript("존재하는 일정 ID가 있습니다.", false);
                return;
            }

            bool bResult = scheInfos.AddScheInfo(COMP_ID
                                                 , est_sche_id
                                                 , up_est_sche_id
                                                 , est_sche_name
                                                 , est_sche_desc
                                                 , sort_order
                                                 , est_id
                                                 , DateTime.Now
                                                 , gUserInfo.Emp_Ref_ID
                                                 );

            if (bResult == true)
            {
                ltrScript.Text = JSHelper.GetAlertScript("정상적으로 저장되었습니다.");
                BindGrid(COMP_ID);
                ButtonStatusByInit();
            }
            else
            {
                ltrScript.Text = JSHelper.GetAlertScript("처리 중 오류가 발생하였습니다.");
                return;
            }
        }
        else if (PageWriteMode == WriteMode.Modify)
        {
            bool bIsExist = scheInfos.IsExist(COMP_ID, est_sche_id);

            if (bIsExist == false)
            {
                ltrScript.Text = JSHelper.GetAlertScript("해당 자료가 없습니다.");
                return;
            }

            bool bResult = scheInfos.ModifyScheInfo(COMP_ID
                                                    , est_sche_id
                                                    , up_est_sche_id
                                                    , est_sche_name
                                                    , est_sche_desc
                                                    , sort_order
                                                    , est_id
                                                    , DateTime.Now
                                                    , gUserInfo.Emp_Ref_ID
                                                    );

            if (bResult == true)
            {
                ltrScript.Text = JSHelper.GetAlertScript("정상적으로 수정되었습니다.");
                BindGrid(COMP_ID);
                ButtonStatusByInit();
            }
            else
            {
                ltrScript.Text = JSHelper.GetAlertBackScript("수정되지 않았습니다.");
                return;
            }
        }
    }
コード例 #14
0
ファイル: Biz_Prj_Data.cs プロジェクト: schifflee/bscgit
        /// <summary>
        /// 평가차수에 따른 점수를 가중치로 계산하여 집계하는 메소드
        /// </summary>
        /// <param name="est_id"></param>
        /// <param name="estterm_ref_id"></param>
        /// <param name="estterm_sub_id"></param>
        /// <returns></returns>
        public bool AggregateEstTermStepEstData(int comp_id
                                                , string est_id
                                                , int estterm_ref_id
                                                , int estterm_sub_id
                                                , int estterm_step_id_merge_y
                                                , double total_weight_estterm_step
                                                , string year_yn
                                                , string merge_yn)
        {
            int affectedRow = 0;

            IDbConnection conn = DbAgentHelper.CreateDbConnection();

            conn.Open();
            IDbTransaction trx = conn.BeginTransaction();

            try
            {
                // 존재하는 테이터를 우선 삭제한다.
                affectedRow += _data.Delete(conn
                                            , trx
                                            , comp_id
                                            , est_id
                                            , estterm_ref_id
                                            , estterm_sub_id
                                            , BizUtility.GetEstTermStepIDByMergeYN(comp_id)
                                            , 0
                                            , 0
                                            , 0
                                            , year_yn
                                            , "Y");

                DataTable dtBlank = GetDataTableSchema();
                DataRow   dataRow = null;

                DataTable dtPrjData = _data.SelectPrjData(comp_id
                                                          , est_id
                                                          , estterm_ref_id
                                                          , estterm_sub_id
                                                          , 0
                                                          , 0
                                                          , 0
                                                          , 0
                                                          , 0
                                                          , 0
                                                          , year_yn
                                                          , merge_yn).Tables[0];

                foreach (DataRow drPrjData in dtPrjData.Rows)
                {
                    // 빈 데이터 테이블에 존재하는 피평가 대상자 있는 지 확인 후
                    // 있다면 존재하는 데이터에 가중치를 계산하여 수정하지만
                    // 존재하지 않다면 새로운 데이터 Row를 생성하여 삽입한다.
                    DataRow[] drArr = dtBlank.Select(string.Format(@"COMP_ID         = {0}
                                                                AND EST_ID          = '{1}'
                                                                AND ESTTERM_REF_ID  = {2}
                                                                AND ESTTERM_SUB_ID  = {3}
                                                                AND ESTTERM_STEP_ID = {4}
                                                                AND PRJ_REF_ID      = {5}"
                                                                   , drPrjData["COMP_ID"]
                                                                   , drPrjData["EST_ID"]
                                                                   , drPrjData["ESTTERM_REF_ID"]
                                                                   , drPrjData["ESTTERM_SUB_ID"]
                                                                   , estterm_step_id_merge_y
                                                                   , drPrjData["PRJ_REF_ID"]));

                    if (drArr.Length == 0)
                    {
                        dataRow = dtBlank.NewRow();
                    }
                    else
                    {
                        dataRow = drArr[0];
                    }

                    dataRow["COMP_ID"]         = drPrjData["COMP_ID"];
                    dataRow["EST_ID"]          = drPrjData["EST_ID"];
                    dataRow["ESTTERM_REF_ID"]  = drPrjData["ESTTERM_REF_ID"];
                    dataRow["ESTTERM_SUB_ID"]  = drPrjData["ESTTERM_SUB_ID"];
                    dataRow["ESTTERM_STEP_ID"] = BizUtility.GetEstTermStepIDByMergeYN(comp_id);
                    dataRow["EST_DEPT_ID"]     = drPrjData["EST_DEPT_ID"];
                    dataRow["EST_EMP_ID"]      = drPrjData["EST_EMP_ID"];
                    dataRow["PRJ_REF_ID"]      = drPrjData["PRJ_REF_ID"];
                    dataRow["POINT"]           = DataTypeUtility.GetToDouble(dataRow["POINT"])
                                                 + DataTypeUtility.GetToDouble(drPrjData["POINT"])
                                                 * (DataTypeUtility.GetToDouble(drPrjData["WEIGHT_ESTTERM_STEP"]) / total_weight_estterm_step);
                    dataRow["POINT_DATE"]  = DateTime.Now;
                    dataRow["STATUS_ID"]   = "E";
                    dataRow["STATUS_DATE"] = DateTime.Now;
                    dataRow["DATE"]        = DateTime.Now;
                    dataRow["USER"]        = drPrjData["UPDATE_USER"];

                    if (drArr.Length == 0)
                    {
                        dtBlank.Rows.Add(dataRow);
                    }
                }

                foreach (DataRow drBlank in dtBlank.Rows)
                {
                    affectedRow += _data.Insert(conn
                                                , trx
                                                , drBlank["COMP_ID"]
                                                , drBlank["EST_ID"]
                                                , drBlank["ESTTERM_REF_ID"]
                                                , drBlank["ESTTERM_SUB_ID"]
                                                , drBlank["ESTTERM_STEP_ID"]
                                                , drBlank["EST_DEPT_ID"]
                                                , drBlank["EST_EMP_ID"]
                                                , drBlank["PRJ_REF_ID"]
                                                , drBlank["POINT"]
                                                , drBlank["POINT_DATE"]
                                                , drBlank["STATUS_ID"]
                                                , drBlank["STATUS_DATE"]
                                                , dataRow["DATE"]
                                                , dataRow["USER"]);
                }

                trx.Commit();
            }
            catch (Exception ex)
            {
                trx.Rollback();
                return(false);
            }
            finally
            {
                conn.Close();
            }

            return((affectedRow > 0) ? true : false);
        }
コード例 #15
0
ファイル: EST010200.aspx.cs プロジェクト: schifflee/bscgit
 protected void UltraWebGrid1_SelectedRowsChange(object sender, SelectedRowsEventArgs e)
 {
     hdfEstTermStepID.Value = e.SelectedRows[0].Cells.FromKey("ESTTERM_STEP_ID").Value.ToString();
     ViewOne(COMP_ID, DataTypeUtility.GetToInt32(hdfEstTermStepID.Value));
     ButtonStatusModify();
 }
コード例 #16
0
    private void DoDrawingEtcChart(DataTable dtChart, Chart chart, int colorCode)
    {
        string url = string.Empty;

        string xValue = DataTypeUtility.GetValue(dtChart.Rows[0]["GRP_TWO_NAME"]);


        // 당월그래프
        MSCharts.DundasChartBase(chart
                                 , ChartImageType.Jpeg
                                 , ChartWidth
                                 , ChartHeight
                                 , BorderSkinStyle.Emboss
                                 , CHART_BORDER_GRAY
                                 , 1
                                 , Color.FromArgb(0xFF, 0xFF, 0xFE)
                                 , Color.FromArgb(255, 255, 255)
                                 , Color.FromArgb(0x20, 0x80, 0xD0)
                                 , ChartDashStyle.Solid
                                 , -1
                                 , ChartHatchStyle.None
                                 , MsGradientType.TopBottom
                                 , MsAntiAliasing.None);

        chart.DataSource = dtChart;

        Series series1 = MSCharts.CreateSeries(chart
                                               , "ME1"
                                               , "Default"
                                               , "매출(목표)"
                                               , null
                                               , SeriesChartType.Column
                                               , 1
                                               , CHART_COLUMN_GREEN
                                               , Color.FromArgb(180, 26, 59, 105)
                                               , Color.FromArgb(64, 0, 0, 0)
                                               , 1
                                               , 9
                                               , Color.FromArgb(64, 64, 64));

        Series series2 = MSCharts.CreateSeries(chart,
                                               "ME2",
                                               "Default",
                                               "매출(실적)",
                                               null,
                                               SeriesChartType.Column,
                                               1
                                               , CHART_COLUMN_ORANGE,
                                               Color.FromArgb(180, 26, 59, 105),
                                               Color.FromArgb(64, 0, 0, 0), 1, 9,
                                               Color.FromArgb(64, 64, 64));

        //Series series3 = MSCharts.CreateSeries(chart, "YG1", "Default", "영업(목표)", null, SeriesChartType.Line, 1, GetChartColor2(4), Color.FromArgb(180, 26, 59, 105), Color.FromArgb(64, 0, 0, 0), 1, 9, Color.FromArgb(64, 64, 64));
        //Series series4 = MSCharts.CreateSeries(chart, "YG2", "Default", "영업(실적)", null
        //                                       , SeriesChartType.Line
        //                                       , 2
        //                                       , CHART_LINE_BLUE, Color.FromArgb(180, 26, 59, 105), Color.FromArgb(64, 0, 0, 0), 1, 9, Color.FromArgb(64, 64, 64));



        Series series4 = MSCharts.CreateSeries(chart, "serPlan", "Default", "영업이익", null
                                               , SeriesChartType.Line
                                               , 1
                                               , CHART_LINE_BLUE
                                               , Color.FromArgb(180, 26, 59, 105)
                                               , Color.FromArgb(64, 0, 0, 0)
                                               , 1, 9, Color.FromArgb(64, 64, 64));


        //series1.IsValueShownAsLabel = true;
        //series1.MarkerStyle = MarkerStyle.Circle;
        //series1.MarkerColor = Color.Magenta;
        //series1.MarkerSize = 3;
        //series1.BorderWidth = 1;


        series1.Label        = "#VALY{N0}";
        series1.Color        = CHART_COLUMN_GREEN;
        series1.BorderWidth  = 0;
        series1.BorderColor  = CHART_COLUMN_BORDER;
        series1.ShadowOffset = 0;


        //series2.IsValueShownAsLabel = true;
        //series2.MarkerStyle = MarkerStyle.Circle;
        //series2.MarkerColor = Color.Magenta;
        //series2.MarkerSize = 3;
        series2.Label        = "#VALY{N0}";
        series2.Color        = CHART_COLUMN_ORANGE;
        series2.BorderWidth  = 0;
        series2.BorderColor  = CHART_COLUMN_BORDER;
        series2.ShadowOffset = 0;

        //series3.IsValueShownAsLabel = true;
        //series3.MarkerStyle = MarkerStyle.Circle;
        //series3.MarkerColor = Color.Magenta;
        //series3.MarkerSize = 3;
        //series3.Label = "#VALY{N0}";

        //series4.YAxisType = AxisType.Secondary;
        series4.ShadowOffset = 0;
        series4.Color        = CHART_COLUMN_RED;
        series4.BorderColor  = CHART_COLUMN_RED;


        //series4.IsValueShownAsLabel = true;
        //series4.MarkerStyle = MarkerStyle.Circle;
        //series4.MarkerColor = Color.Magenta;
        //series4.MarkerSize = 3;
        series4.Label = "#VALY{N0}";


        series1.YValueMembers = "ME_TARGET_TS";
        series2.YValueMembers = "ME_RESULT_TS";
        //series3.YValueMembers = "YG_TARGET_TS";
        series4.YValueMembers = "YG_RESULT_TS";
        series1.XValueMember  = "GRP_TWO_NAME";



        series1.ToolTip = "#VALY{N0}";
        series2.ToolTip = "#VALY{N0}";
        //series3.ToolTip = "#VALY{N0}";
        series4.ToolTip = "#VALY{N0}";

        string sChartArea2 = chart.Series[series2.Name].ChartArea;

        //chart.ChartAreas[sChartArea2].AxisX.IsMarginVisible = true;
        //chart.ChartAreas[sChartArea2].AxisY2.Enabled = AxisEnabled.False;

        ///  chart.ChartAreas[sChartArea2].AxisY.LabelStyle.Format = "N0";
        ///  chart.ChartAreas[sChartArea2].AxisY.Title = "매출";


        // chart.ChartAreas[sChartArea2].AxisY2.LabelStyle.Format = "N0";
        // chart.ChartAreas[sChartArea2].AxisY2.Title = "영업";

        ///  LabelStyle lblStyle = new LabelStyle();
        ///  lblStyle.ForeColor = Color.FromArgb(127, 127, 127);
        ///  lblStyle.Font = new Font("Tahoma", 7.5f, FontStyle.Regular);
        ///  lblStyle.Format = "#,##0";

        // chart.ChartAreas[sChartArea2].AxisY2.LabelStyle = lblStyle;
        // chart.ChartAreas[sChartArea2].AxisY2.LineColor = Color.FromArgb(127, 127, 127);

        DoSettingChartStyles(chart, "#,##0");

        // Show as 3D
        if (rdoChartType.SelectedIndex == 0)
        {
            chart.ChartAreas[sChartArea2].Area3DStyle.Enable3D = false;
        }
        else
        {
            chart.ChartAreas[sChartArea2].Area3DStyle.Enable3D = true;
        }

        chart.DataBind();
    }
コード例 #17
0
ファイル: EST060300.aspx.cs プロジェクト: schifflee/bscgit
    private string GetScaleName(string est_id)
    {
        //if(est_id.Equals("3B"))
        //    System.Diagnostics.Debugger.Break();

        Biz_EstInfos estInfo = new Biz_EstInfos(COMP_ID, est_id);

        string scale_id   = string.Empty;
        string scale_name = "";

        if (estInfo.Scale_Type.Equals("DPT"))
        {
            DataRow[] rows = DS_DETAIL.Tables[0].Select(string.Format(" EST_ID = '{0}' ", est_id));

            if (rows.Length > 0)
            {
                scale_id = rows[0]["SCALE_ID"].ToString();

                if (scale_id.Equals("ABS"))
                {
                    scale_name = "<b>절대평가</b>";
                }
                else if (scale_id.Equals("REL"))
                {
                    string            temp = string.Empty;
                    Biz_RelGroupInfos biz  = new Biz_RelGroupInfos();
                    DataSet           ds   = biz.GetRelGroupInfo(COMP_ID, "", est_id, ESTTERM_REF_ID);

                    StringBuilder sbTemp = new StringBuilder();
                    int           cnt    = 0;

                    foreach (DataRow row in ds.Tables[0].Rows)
                    {
                        cnt++;
                        temp = string.Format("<a href='#' onclick=ViewEmpList('{0}','{1}','{2}','{3}')>{4}</a>"
                                             , COMP_ID
                                             , est_id
                                             , ESTTERM_REF_ID
                                             , row["REL_GRP_ID"].ToString()
                                             , row["REL_GRP_NAME"].ToString());

                        sbTemp.Append("<br>&nbsp;" + cnt.ToString() + ". " + temp);
                    }

                    temp = (temp.Length > 0) ? temp.Remove(temp.Length - 1, 1) : string.Empty;

                    scale_name = "<b>상대평가</b>" + sbTemp.ToString();
                }
            }
        }
        else if (estInfo.Scale_Type.Equals("POS"))
        {
            Biz_DeptPosScales deptPosScale = new Biz_DeptPosScales();
            DataSet           ds           = deptPosScale.GetDeptPosScale(COMP_ID
                                                                          , ESTTERM_REF_ID
                                                                          , DataTypeUtility.GetToInt32(TreeView1.SelectedNode.Value)
                                                                          , est_id);

            if (ds.Tables[0].Rows.Count > 0)
            {
                scale_name = "";
                bool isFirst = true;

                foreach (DataRow row in ds.Tables[0].Rows)
                {
                    string no = "&nbsp;" + row["SEQ"].ToString() + ".";

                    string pos_id = GetPosName(row["POS_ID"].ToString(), row["POS_VALUE"].ToString());
                    string temp   = "<b>" + row["SCALE_NAME"].ToString().Replace("평가", "") + "</b>";

                    if (isFirst)
                    {
                        scale_name += no + pos_id + temp;
                        isFirst     = false;
                    }
                    else
                    {
                        scale_name += "<br>" + no + pos_id + temp;
                    }
                }
            }
            else
            {
                scale_name = "&nbsp;-";
            }
        }

        return(scale_name);
    }
コード例 #18
0
        public void ToTableFieldSchema()
        {
            DataTypeUtility.ToTableFieldSchema <wikipedia>().IsStructuralEqual(new[]
            {
                new TableFieldSchema()
                {
                    Name = "title", Type = "STRING", Mode = "NULLABLE"
                },
                new TableFieldSchema()
                {
                    Name = "id", Type = "INTEGER", Mode = "NULLABLE"
                },
                new TableFieldSchema()
                {
                    Name = "language", Type = "STRING", Mode = "NULLABLE"
                },
                new TableFieldSchema()
                {
                    Name = "wp_namespace", Type = "INTEGER", Mode = "REQUIRED"
                },
                new TableFieldSchema()
                {
                    Name = "is_redirect", Type = "BOOLEAN", Mode = "NULLABLE"
                },
                new TableFieldSchema()
                {
                    Name = "revision_id", Type = "INTEGER", Mode = "NULLABLE"
                },
                new TableFieldSchema()
                {
                    Name = "contributor_ip", Type = "STRING", Mode = "NULLABLE"
                },
                new TableFieldSchema()
                {
                    Name = "contributor_id", Type = "INTEGER", Mode = "NULLABLE"
                },
                new TableFieldSchema()
                {
                    Name = "contributor_username", Type = "STRING", Mode = "NULLABLE"
                },
                new TableFieldSchema()
                {
                    Name = "timestamp", Type = "INTEGER", Mode = "REQUIRED"
                },
                new TableFieldSchema()
                {
                    Name = "is_minor", Type = "BOOLEAN", Mode = "NULLABLE"
                },
                new TableFieldSchema()
                {
                    Name = "is_bot", Type = "BOOLEAN", Mode = "NULLABLE"
                },
                new TableFieldSchema()
                {
                    Name = "reversion_id", Type = "INTEGER", Mode = "NULLABLE"
                },
                new TableFieldSchema()
                {
                    Name = "comment", Type = "STRING", Mode = "NULLABLE"
                },
                new TableFieldSchema()
                {
                    Name = "num_characters", Type = "INTEGER", Mode = "REQUIRED"
                },
            });


            DataTypeUtility.ToTableFieldSchema(new
            {
                Hoge = default(DateTime),
                Huga = default(DateTimeOffset?),
                Tako = default(bool),
                Nano = 1.0,
                K    = default(int?),
                C    = MyEnum.Apple
            }).IsStructuralEqual(new[]
            {
                new TableFieldSchema()
                {
                    Name = "Hoge", Type = "TIMESTAMP", Mode = "REQUIRED"
                },
                new TableFieldSchema()
                {
                    Name = "Huga", Type = "TIMESTAMP", Mode = "NULLABLE"
                },
                new TableFieldSchema()
                {
                    Name = "Tako", Type = "BOOLEAN", Mode = "REQUIRED"
                },
                new TableFieldSchema()
                {
                    Name = "Nano", Type = "FLOAT", Mode = "REQUIRED"
                },
                new TableFieldSchema()
                {
                    Name = "K", Type = "INTEGER", Mode = "NULLABLE"
                },
                new TableFieldSchema()
                {
                    Name = "C", Type = "INTEGER", Mode = "REQUIRED"
                },
            });
        }
コード例 #19
0
ファイル: EST060300.aspx.cs プロジェクト: schifflee/bscgit
    /// <summary>
    /// 1. 우선 테이블을 뿌리고
    /// 2. 선을 그린다.
    /// </summary>
    private void BindMap()
    {
        divMapMain.InnerHtml = string.Empty;

        // 레벨별로 들어옴
        DataTable dtMap = BizUtility.GetEstIDTree(COMP_ID);
        DataSet   dsMap = new DataSet();

        dsMap.Tables.Add(dtMap);

        // Relation 걸고
        dsMap.Relations.Add("Relation", dsMap.Tables[0].Columns["EST_ID"], dsMap.Tables[0].Columns["UP_EST_ID"], false);

        // 선그리기용 HashTable --- EST_ID + TableName
        // 테이블의명을 알아야 선을 그릴 수 있으므로 테이블명을 저장하는 HashTable이 필요함.
        Hashtable htDraw = new Hashtable();

        string strRootTableName   = string.Empty;
        string strTableName       = string.Empty;
        string strTableNameFormat = "div_{0}_{1}";

        string strRoot = string.Empty;

        strRootTableName = strTableName;

        int intRootLevel = 0;

        // 레벨별 간격
        int intHeight = 15;

        // Root
        // Root 레벨도 일반 레벨과 크게 다른점 없이 Loop로 돌리면 되지만 Root에서
        // 차후에 유지/보수할 내용이 있을 것 같아서 따로 처리했음
        // GetRootHtml()
        DataRow[] drRoot = dtMap.Select(string.Format("LEVEL = '{0}'", intRootLevel.ToString()));

        if (drRoot.Length != 0)
        {
            strTableName          = string.Format(strTableNameFormat, intRootLevel.ToString(), intRootLevel.ToString());
            strRoot               = string.Format(GetRootHtml(), drRoot[0]["PADDING"].ToString(), strTableName, GetRootName(drRoot[0]["EST_NAME"].ToString()), drRoot[0]["HEADER_COLOR"].ToString());
            divMapMain.InnerHtml += strRoot;

            htDraw.Add(drRoot[0]["EST_ID"].ToString(), strTableName);
        }

        // 간격
        divMapMain.InnerHtml += string.Format("<table><tr style='height:{0}'><td></td></tr></table>", intHeight.ToString());

        // Root를 제외한 레벨DataTable
        DataTable dtLevel      = DataTypeUtility.GetGroupByDataTable(dtMap, new string[] { "LEVEL" });
        DataView  dvLevel1Over = dtLevel.DefaultView;

        dvLevel1Over.RowFilter = string.Format("LEVEL >= {0}", (intRootLevel + 1).ToString());
        dvLevel1Over.Sort      = "LEVEL";

        // 레벨별로 처리했음
        // 각 레벨별로 <tr><td><table>로 생성됨
        for (int j = 0; j < dvLevel1Over.Count; j++)
        {
            int       intCurrentLevel = DataTypeUtility.GetToInt32(dvLevel1Over[j]["LEVEL"]);
            DataRow[] drsLevel        = dtMap.Select(string.Format("LEVEL = '{0}'", intCurrentLevel.ToString()));

            divMapMain.InnerHtml += "<table border='0'><tr>";
            for (int i = 0; i < drsLevel.Length; i++)
            {
                strTableName = string.Format(strTableNameFormat, intCurrentLevel, i.ToString());
                string est_name        = GetRootName(drsLevel[i]["EST_NAME"].ToString());
                string est_id          = drsLevel[i]["EST_ID"].ToString();
                string status_style_id = GetItemName(drsLevel[i]["STATUS_STYLE_ID"].ToString());
                string est_sche_name   = GetItemName(drsLevel[i]["EST_SCHE_NAME"].ToString());
                string header_color    = "05";
                string weight_type     = drsLevel[i]["WEIGHT_TYPE"].ToString();

                string weight      = string.Empty;
                string weight_name = string.Empty;
                string scale_name  = GetScaleName(est_id);

                //if (!scale_name.Equals("-"))
                //{
                weight_name = GetWeightName(est_id, weight_type, ref weight);

                if (!weight.Equals("") && !scale_name.Equals(""))
                {
                    header_color = "01";
                }
                else if (!weight.Equals("") || !scale_name.Equals(""))
                {
                    header_color = "03";
                }
                //}
                //else
                //    scale_name = scale_name.Equals("-") ? "<center>" + scale_name + "</center>" : scale_name;


                // 레벨안의 Item의 간격 조정을 padding-left로 되며 EST_MAP_PADDING에서 Select
                divMapMain.InnerHtml += string.Format("<td style='padding-left:{0}px'>", DataTypeUtility.GetString(drsLevel[i]["PADDING"].ToString()));
                divMapMain.InnerHtml += string.Format(GetItemHtml()
                                                      , strTableName
                                                      , est_name
                                                      , (scale_name.Replace("&nbsp", "").Trim().Equals("")) ? "" : scale_name + "<br>"
                                                      , weight_name
                                                      , header_color);
                divMapMain.InnerHtml += "</td>";

                htDraw.Add(est_id, strTableName);
            }
            divMapMain.InnerHtml += "</tr></table>";

            // 간격
            divMapMain.InnerHtml += string.Format("<table><tr style='height:{0}'><td></td></tr></table>", intHeight.ToString());
        }

        // 2. 선 Draw(Javascript)
        DrawMapLine(dtMap, htDraw);
    }
コード例 #20
0
    protected void UltraWebGrid1_InitializeRow(object sender, RowEventArgs e)
    {
        DataRowView drw = (DataRowView)e.Data;

        BizUtility.SetStatusImage(drw, e.Row.Cells);

        // 가중치관련 컬럼 보이기가 Y 인경우
        if (COL_WEIGHT_VISIBLE_YN.Equals("Y"))
        {
            BizUtility.SetWeightByDptPos(DT_COLUMN_INFO.Select(@"COL_STYLE_ID            = 'BIZ' 
                                                              AND VISIBLE_YN              = 'Y'")
                                         , COMP_ID
                                         , DT_DEPT_EST_POS_DETAIL
                                         , drw
                                         , e.Row.Cells);
        }

        // 평가별 점수 보여주기 사용 여부
        if (COL_POINT_VISIBLE_YN.Equals("Y"))
        {
        }

        // Bias 점수 조정 사용 여부
        if (COL_BIAS_POINT_VISIBLE_YN.Equals("Y"))
        {
        }

        // 등급 보이기 여부
        if (COL_GRADE_VISIBLE_YN.Equals("Y"))
        {
            // 부서별 평가방법일 경우
            if (ScaleTypeMode.Equals("DPT"))
            {
                DataRow[] drArr = DT_DEPT_SCALE.Select(string.Format("DEPT_REF_ID = {0}", drw["TGT_DEPT_ID"]));

                if (drArr.Length > 0)
                {
                    if (drArr[0]["SCALE_ID"].ToString().Equals("ABS"))
                    {
                        BizUtility.SetGradeByScale_ABS(DT_SCOPE
                                                       , drw
                                                       , e.Row.Cells);
                    }
                    else if (drArr[0]["SCALE_ID"].ToString().Equals("REL"))
                    {
                        BizUtility.SetGradeByScale_REL(DT_SCOPE
                                                       , DT_EST_DATA
                                                       , drw
                                                       , e.Row.Cells);
                    }
                }
            } // 직급,직책별 평가방법일 경우
            else if (ScaleTypeMode.Equals("POS"))
            {
                string scale_id = "ABS";

                //해당 부서 중 직책, 직급을 선별
                DataRow[] dtArrPosScale = DT_POS_SCALE.Select(string.Format("EST_ID = '{0}' AND DEPT_REF_ID = {1}", EST_ID, drw["TGT_DEPT_ID"]), "SEQ");

                //선별된 직책, 직급의 순서에 따라
                foreach (DataRow drChildPosScale in dtArrPosScale)
                {
                    // 기본값이면
                    if (drChildPosScale["POS_VALUE"].ToString().Equals("-"))
                    {
                        scale_id = DataTypeUtility.GetValue(drChildPosScale["SCALE_ID"]);
                        break;
                    }
                    else // 선별된 직급
                    {
                        if (drw[string.Format("TGT_POS_{0}_ID", drChildPosScale["POS_ID"])].ToString().Equals(drChildPosScale["POS_VALUE"].ToString()))
                        {
                            scale_id = DataTypeUtility.GetValue(drChildPosScale["SCALE_ID"]);
                            break;
                        }
                    }
                }

                if (scale_id.Equals("ABS"))
                {
                    BizUtility.SetGradeByScale_ABS(DT_SCOPE
                                                   , drw
                                                   , e.Row.Cells);
                }
                else if (scale_id.Equals("REL"))
                {
                    BizUtility.SetGradeByScale_REL(DT_SCOPE
                                                   , DT_EST_DATA
                                                   , drw
                                                   , e.Row.Cells);
                }
            }
        }

        // 등급을 점수로 환산 사용 여부
        if (COL_GRADE_TO_POINT_VISIBLE_YN.Equals("Y"))
        {
            BizUtility.SetGradeToPoint(DT_SCOPE
                                       , drw
                                       , e.Row.Cells);
        }

        // 주기별 집계 사용 여부
        if (COL_ESTTERM_SUB_AGG_VISIBLE_YN.Equals("Y"))
        {
        }

        // 차수별 집계 사용 여부
        if (COL_ESTTERM_STEP_AGG_VISIBLE_YN.Equals("Y"))
        {
        }

        // 점수 조정 사용 여부
        if (COL_CTRL_POINT_VISIBLE_YN.Equals("Y"))
        {
            BizUtility.SetCtrlPoint(drw
                                    , e.Row.Cells
                                    , DT_COLUMN_INFO
                                    , DT_CTRL_INFO
                                    , DT_CTRL_EST_DEPT_MAP
                                    , DT_CTRL_POINT_DATA
                                    , EMP_REF_ID);
        }

        // 등급 조정 사용 여부
        if (COL_CTRL_GRADE_VISIBLE_YN.Equals("Y"))
        {
            BizUtility.SetCtrlGrade(drw
                                    , e.Row.Cells
                                    , DT_COLUMN_INFO
                                    , DT_CTRL_INFO
                                    , DT_CTRL_EST_DEPT_MAP
                                    , DT_CTRL_GRADE_DATA
                                    , EMP_REF_ID);
        }
    }
コード例 #21
0
        static TableFieldSchema[] CreateTwitterStatusSchemas()
        {
            var schemas = DataTypeUtility.ToTableFieldSchema(typeof(Status), (pi) =>
            {
                // avoid circular reference
                if (pi == typeof(Place).GetProperty("ContainedWithin"))
                {
                    return(new TableFieldSchema
                    {
                        Name = "contained_within_id",
                        Type = DataType.String.ToIdentifier(),
                        Mode = "REPEATED"
                    });
                }
                if (pi == typeof(Status).GetProperty("RetweetedStatus"))
                {
                    return(new TableFieldSchema
                    {
                        Name = "retweeted_status_id",
                        Type = DataType.Integer.ToIdentifier(),
                    });
                }
                if (pi == typeof(User).GetProperty("Status"))
                {
                    return(new TableFieldSchema
                    {
                        Name = "status_id",
                        Type = DataType.Integer.ToIdentifier()
                    });
                }

                // avoid complex type

                if (pi.PropertyType == typeof(double[][][])) // Place/BoundingBox/Coordinates
                {
                    return(new TableFieldSchema
                    {
                        Name = pi.GetCustomAttribute <JsonPropertyAttribute>().PropertyName,
                        Type = DataType.String.ToIdentifier()
                    });
                }

                // Type mapping
                if (pi.PropertyType == typeof(Uri))
                {
                    return(new TableFieldSchema
                    {
                        Name = pi.GetCustomAttribute <JsonPropertyAttribute>().PropertyName,
                        Type = DataType.String.ToIdentifier()
                    });
                }
                if (pi.PropertyType == typeof(Dictionary <string, object>))
                {
                    return(new TableFieldSchema
                    {
                        Name = pi.GetCustomAttribute <JsonPropertyAttribute>().PropertyName,
                        Type = DataType.String.ToIdentifier()
                    });
                }

                return(null);
            });

            return(schemas);
        }
コード例 #22
0
ファイル: EIS041100.aspx.cs プロジェクト: schifflee/bscgit
    private void DataBinding()
    {
        DataTable dtIndex = new DataTable();
        DataRow   dr      = null;

        dtIndex.Columns.Add("IDX", typeof(int));
        dtIndex.Columns.Add("BU", typeof(string));

        dr        = dtIndex.NewRow();
        dr["IDX"] = 1;
        dr["BU"]  = "CJ";
        dtIndex.Rows.Add(dr);

        dr        = dtIndex.NewRow();
        dr["IDX"] = 2;
        dr["BU"]  = "CJ";
        dtIndex.Rows.Add(dr);

        dr        = dtIndex.NewRow();
        dr["IDX"] = 3;
        dr["BU"]  = "CJ";
        dtIndex.Rows.Add(dr);

        dr        = dtIndex.NewRow();
        dr["IDX"] = 4;
        dr["BU"]  = "CJ";
        dtIndex.Rows.Add(dr);

        dr        = dtIndex.NewRow();
        dr["IDX"] = 5;
        dr["BU"]  = "CJ";
        dtIndex.Rows.Add(dr);

        dr        = dtIndex.NewRow();
        dr["IDX"] = 6;
        dr["BU"]  = "CJ";
        dtIndex.Rows.Add(dr);

        dr        = dtIndex.NewRow();
        dr["IDX"] = 7;
        dr["BU"]  = "CJ";
        dtIndex.Rows.Add(dr);

        dr        = dtIndex.NewRow();
        dr["IDX"] = 8;
        dr["BU"]  = "CJ";
        dtIndex.Rows.Add(dr);

        dr        = dtIndex.NewRow();
        dr["IDX"] = 9;
        dr["BU"]  = "CJ";
        dtIndex.Rows.Add(dr);

        dr        = dtIndex.NewRow();
        dr["IDX"] = 10;
        dr["BU"]  = "CJ";
        dtIndex.Rows.Add(dr);

        dr        = dtIndex.NewRow();
        dr["IDX"] = 11;
        dr["BU"]  = "CJ";
        dtIndex.Rows.Add(dr);


        HtmlTable tbl = Page.FindControl("tbl") as HtmlTable;

        foreach (Control con in tbl.Controls)
        {
            if (con is HtmlTableRow)
            {
                int idx = DataTypeUtility.GetToInt32(con.ID.Replace("tr", ""));

                Infragistics.WebUI.UltraWebGrid.UltraWebGrid grid = Page.FindControl(string.Format("Grid{0}", idx)) as Infragistics.WebUI.UltraWebGrid.UltraWebGrid;

                if (grid != null)
                {
                    DataTable dt = DataTypeUtility.FilterSortDataTable(DT_DATA, string.Format("SORT_ORDER1 = {0}", idx), "SORT_ORDER2");

                    dt.Columns.Add("ITM_NAME", typeof(string));

                    foreach (DataRow dr_I in dt.Rows)
                    {
                        if (DataTypeUtility.GetToInt32(dr_I["SORT_ORDER2"]) == 1)
                        {
                            dr_I["ITM_NAME"] = "생산수율";
                        }
                        else if (DataTypeUtility.GetToInt32(dr_I["SORT_ORDER2"]) == 2)
                        {
                            dr_I["ITM_NAME"] = "공정불량율";
                        }
                    }

                    grid.DataSource = dt;
                    grid.DataBind();


                    if (dt.Rows.Count == 0)
                    {
                        con.Visible = false;
                    }
                }
            }
            else
            {
                con.Visible = false;
            }
        }
    }
コード例 #23
0
ファイル: Biz_QuestionItems.cs プロジェクト: schifflee/bscgit
        public Biz_QuestionItems(string q_itm_id, string q_sbj_id, string q_obj_id)
        {
            DataSet ds = _questionItem.Select(q_itm_id, q_sbj_id, q_obj_id);
            DataRow dr;

            if (ds.Tables[0].Rows.Count == 1)
            {
                dr               = ds.Tables[0].Rows[0];
                _q_itm_id        = (dr["Q_ITM_ID"] == DBNull.Value) ? "" : dr["Q_ITM_ID"].ToString();
                _q_sbj_id        = (dr["Q_SBJ_ID"] == DBNull.Value) ? "" : dr["Q_SBJ_ID"].ToString();
                _num             = (dr["NUM"] == DBNull.Value) ? 0 :  DataTypeUtility.GetToInt32(dr["NUM"]);
                _q_item_name     = (dr["Q_ITEM_NAME"] == DBNull.Value) ? "" : dr["Q_ITEM_NAME"].ToString();
                _point           = (dr["POINT"] == DBNull.Value) ? 0 :  DataTypeUtility.GetToDouble(dr["POINT"]);
                _weight          = (dr["WEIGHT"] == DBNull.Value) ? 0 :  DataTypeUtility.GetToDouble(dr["WEIGHT"]);
                _comment         = (dr["COMMENT"] == DBNull.Value) ? "" : dr["COMMENT"].ToString();
                _subject_item_yn = (dr["SUBJECT_ITEM_YN"] == DBNull.Value) ? "" : dr["SUBJECT_ITEM_YN"].ToString();
                _update_date     = (dr["UPDATE_DATE"] == DBNull.Value) ? DateTime.MinValue : DataTypeUtility.GetToDateTime(dr["UPDATE_DATE"]);
                _update_user     = (dr["UPDATE_USER"] == DBNull.Value) ? 0 : DataTypeUtility.GetToInt32(dr["UPDATE_USER"]);
            }
        }
コード例 #24
0
ファイル: EST020100.aspx.cs プロジェクト: schifflee/bscgit
    protected void ibnSave_Click(object sender, ImageClickEventArgs e)
    {
        int    seq                = DataTypeUtility.GetToInt32(txtSeq.Text.Trim());
        string col_name           = txtColName.Text.Trim();
        string col_style_id       = WebUtility.GetByValueDropDownList(ddlColStyleID);
        string col_key            = txtColKey.Text.Trim();
        string caption            = txtCaption.Text.Trim();
        int    width              = DataTypeUtility.GetToInt32(txtWidth.Text.Trim());
        string data_type          = WebUtility.GetByValueDropDownList(ddlDataType);
        string halign             = WebUtility.GetByValueDropDownList(ddlHAlign);
        string back_color         = txtBackColor.Text.Trim();
        string format             = txtFormat.Text;
        string formula            = txtFormula.Text.Trim();
        string defaultValue       = txtDefaultValue.Text.Trim();
        string col_desc           = txtColDesc.Text.Trim();
        string back_color_yn      = DataTypeUtility.GetBooleanToYN(ckbBackColorYN.Checked);
        string format_yn          = DataTypeUtility.GetBooleanToYN(ckbFormatYN.Checked);
        string formula_yn         = DataTypeUtility.GetBooleanToYN(ckbFormularYN.Checked);
        string defaultValue_yn    = DataTypeUtility.GetBooleanToYN(ckbDefaultValueYN.Checked);
        string visible_yn         = WebUtility.GetByValueRadioButtonList(rbnVisibleYN);
        string col_emp_visible_yn = WebUtility.GetByValueRadioButtonList(rbnColEmpVisibleYN);

        Biz_ColumnInfos columnInfos = new Biz_ColumnInfos();

        if (PageWriteMode == WriteMode.New)
        {
            bool bDuplicate = columnInfos.IsExist(COMP_ID, EST_ID, col_key);

            if (bDuplicate)
            {
                ltrScript.Text = JSHelper.GetAlertScript("동일한 컬럼키가 존재합니다.");
                return;
            }

            bool bResult = columnInfos.AddColumnInfo(COMP_ID
                                                     , EST_ID
                                                     , seq
                                                     , col_name
                                                     , col_style_id
                                                     , col_key
                                                     , caption
                                                     , width
                                                     , data_type
                                                     , halign
                                                     , back_color
                                                     , format
                                                     , formula
                                                     , defaultValue
                                                     , col_desc
                                                     , back_color_yn
                                                     , format_yn
                                                     , formula_yn
                                                     , defaultValue_yn
                                                     , visible_yn
                                                     , col_emp_visible_yn
                                                     , DateTime.Now
                                                     , EMP_REF_ID
                                                     );

            bool isOK = SaveEstJobColumnMap(!trEstJob.Visible);

            if (bResult)
            {
                //ltrScript.Text = JSHelper.GetAlertScript("정상적으로 저장되었습니다.");
                GridBinding(COMP_ID);
                ButtonStatusInit();
            }
            else
            {
                ltrScript.Text = JSHelper.GetAlertScript("처리 중 오류가 발생하였습니다.");
                return;
            }
        }
        else if (PageWriteMode == WriteMode.Modify)
        {
            bool bResult = columnInfos.ModifyColumnInfo(COMP_ID
                                                        , EST_ID
                                                        , seq
                                                        , col_name
                                                        , col_style_id
                                                        , col_key
                                                        , caption
                                                        , width
                                                        , data_type
                                                        , halign
                                                        , back_color
                                                        , format
                                                        , formula
                                                        , defaultValue
                                                        , col_desc
                                                        , back_color_yn
                                                        , format_yn
                                                        , formula_yn
                                                        , defaultValue_yn
                                                        , visible_yn
                                                        , col_emp_visible_yn
                                                        , DateTime.Now
                                                        , EMP_REF_ID
                                                        );

            bool isOK = SaveEstJobColumnMap(!trEstJob.Visible);

            if (bResult)
            {
                //ltrScript.Text = JSHelper.GetAlertScript("정상적으로 수정되었습니다.");
                //GridBinding(COMP_ID);
                //ButtonStatusInit();
            }
            else
            {
                ltrScript.Text = JSHelper.GetAlertScript("수정되지 않았습니다.");
                return;
            }
        }
    }
コード例 #25
0
ファイル: EST010300.ASPX.cs プロジェクト: schifflee/bscgit
    protected void ibnSave_Click(object sender, ImageClickEventArgs e)
    {
        string est_id           = txtEstID.Text;
        string up_est_id        = hdfUpEstID.Value;
        string est_name         = txtEstName.Text;
        string header_color     = txtHeaderColor.Text;
        string grade_confirm_yn = WebUtility.GetByValueRadioButtonList(rblGradeConfirmYN);
        string bias_yn          = WebUtility.GetByValueRadioButtonList(rblBiasYN);
        string bias_dept_use_id = WebUtility.GetByValueRadioButtonList(rblBiasDeptUseID);
        string tgt_send_type    = WebUtility.GetByValueRadioButtonList(rblTgtSendType);
        string tgt_opinion_yn   = null;
        string feedback_yn      = null;

        if (bias_yn.Equals("N"))
        {
            bias_dept_use_id = "N";
        }

        if (tgt_send_type.Equals("OPN"))
        {
            tgt_opinion_yn = "Y";
            feedback_yn    = "N";
        }
        else if (tgt_send_type.Equals("FBK"))
        {
            tgt_opinion_yn = "N";
            feedback_yn    = "Y";
        }
        else
        {
            tgt_opinion_yn = "N";
            feedback_yn    = "N";
        }

        int    estterm_sub          = CheckBoxListCommon.GetCheckNum(cblEstTermSub);
        int    estterm_step         = CheckBoxListCommon.GetCheckNum(cblEstTermStep);
        string fixed_weight_use_yn  = WebUtility.GetByValueRadioButtonList(rblFixedWeightUseYN);
        double fixed_weight         = DataTypeUtility.GetToDouble(txtFixedWeight.Text);
        int    point_ctrl_step      = WebUtility.GetIntByValueDropDownList(ddlPointCtrlStep);
        int    grade_ctrl_step      = WebUtility.GetIntByValueDropDownList(ddlGradeCtrlStep);
        string owner_type           = WebUtility.GetByValueRadioButtonList(rblOwnerType);
        string est_style            = WebUtility.GetByValueRadioButtonList(rblEstStyle);
        string link_est_id          = hdfLinkEstID.Value;
        string weight_type          = WebUtility.GetByValueRadioButtonList(rblWeightType);
        string scale_type           = WebUtility.GetByValueRadioButtonList(rblScaleType);
        string status_style_id      = WebUtility.GetByValueDropDownList(ddlStatusStyleID);
        string q_style_id           = WebUtility.GetByValueDropDownList(ddlQuestionStyleID);
        string bias_type_id         = WebUtility.GetByValueDropDownList(ddlBiasTypeID);
        string q_item_desc_use_yn   = WebUtility.GetByValueRadioButtonList(rblQItemDescUseYN);
        string q_tgt_pos_biz_use_yn = WebUtility.GetByValueRadioButtonList(rblQTgtPosBizUseYN);
        string all_step_visible_yn  = WebUtility.GetByValueRadioButtonList(rblAllStepVisibleYN);
        string emp_com_dept_yn      = WebUtility.GetByValueRadioButtonList(rblEmpComDeptYN);
        string use_yn = WebUtility.GetByValueRadioButtonList(rblUseYN);
        string visible_past_point_yn = WebUtility.GetByValueRadioButtonList(rblVisiblePastPointYN);
        string est_qtt_mbo_yn        = WebUtility.GetByValueRadioButtonList(rblEstQTTMBOYN);
        string mbo_score_estimate_yn = WebUtility.GetByValueRadioButtonList(rblMboScoreEstimateYN);
        string dashboard_type        = (rblDashBoardTYPE.SelectedItem.Value != "N" ? ddlDashBoardTYPE.SelectedItem.Value : "N");
        string previousstep_yn       = (ddlQuestionStyleID.SelectedItem.Value == "BLK" ? "N" : ddlPreviousStempYN.SelectedItem.Value.ToString());

        if (visible_past_point_yn.Equals(""))
        {
            visible_past_point_yn = "Y";
        }
        if (est_qtt_mbo_yn.Equals(""))
        {
            est_qtt_mbo_yn = "N";
        }
        if (mbo_score_estimate_yn.Equals(""))
        {
            mbo_score_estimate_yn = "N";
        }

        Biz_EstInfos   estInfo   = new Biz_EstInfos();
        Biz_JobEstMaps jobEstMap = new Biz_JobEstMaps();

        if (PageWriteMode == WriteMode.New)
        {
            bool bDuplicate = estInfo.IsExists(COMP_ID, est_id);

            if (bDuplicate)
            {
                ltrScript.Text = JSHelper.GetAlertScript("존재하는 평가 ID 입니다.");
            }

            bool bResult = estInfo.AddEstInfoAddMaps(COMP_ID
                                                     , est_id
                                                     , up_est_id
                                                     , est_name
                                                     , header_color
                                                     , grade_confirm_yn
                                                     , bias_yn
                                                     , bias_dept_use_id
                                                     , tgt_opinion_yn
                                                     , feedback_yn
                                                     , estterm_sub
                                                     , estterm_step
                                                     , fixed_weight_use_yn
                                                     , fixed_weight
                                                     , point_ctrl_step
                                                     , grade_ctrl_step
                                                     , owner_type
                                                     , est_style
                                                     , link_est_id
                                                     , weight_type
                                                     , scale_type
                                                     , status_style_id
                                                     , q_style_id
                                                     , q_item_desc_use_yn
                                                     , q_tgt_pos_biz_use_yn
                                                     , all_step_visible_yn
                                                     , emp_com_dept_yn
                                                     , bias_type_id
                                                     , visible_past_point_yn
                                                     , est_qtt_mbo_yn
                                                     , mbo_score_estimate_yn
                                                     , dashboard_type
                                                     , previousstep_yn
                                                     , use_yn
                                                     , DateTime.Now
                                                     , EMP_REF_ID);

            bool isOK1 = SaveEstTermSubMap();
            bool isOK2 = SaveEstTermStepMap();
            bool isOK3 = SaveEstJobEstMap();

            DoSavIng_OuterDataProcInfo();

            if (bResult)
            {
                ltrScript.Text = JSHelper.GetAlertScript("정상적으로 저장되었습니다.");
                GridBinding(COMP_ID);
                ButtonStatusInit();
            }
            else
            {
                ltrScript.Text = JSHelper.GetAlertScript("처리 중 오류가 발생하였습니다.");
                return;
            }
        }
        else if (PageWriteMode == WriteMode.Modify)
        {
            bool bResult = estInfo.ModifyEstInfoModifyMaps(COMP_ID
                                                           , est_id
                                                           , up_est_id
                                                           , est_name
                                                           , header_color
                                                           , grade_confirm_yn
                                                           , bias_yn
                                                           , bias_dept_use_id
                                                           , tgt_opinion_yn
                                                           , feedback_yn
                                                           , estterm_sub
                                                           , estterm_step
                                                           , fixed_weight_use_yn
                                                           , fixed_weight
                                                           , point_ctrl_step
                                                           , grade_ctrl_step
                                                           , owner_type
                                                           , est_style
                                                           , link_est_id
                                                           , weight_type
                                                           , scale_type
                                                           , status_style_id
                                                           , q_style_id
                                                           , q_item_desc_use_yn
                                                           , q_tgt_pos_biz_use_yn
                                                           , all_step_visible_yn
                                                           , emp_com_dept_yn
                                                           , bias_type_id
                                                           , visible_past_point_yn
                                                           , est_qtt_mbo_yn
                                                           , mbo_score_estimate_yn
                                                           , dashboard_type
                                                           , previousstep_yn
                                                           , use_yn
                                                           , DateTime.Now
                                                           , EMP_REF_ID);

            bool isOK1 = SaveEstTermSubMap();
            bool isOK2 = SaveEstTermStepMap();
            bool isOK3 = SaveEstJobEstMap();

            DoSavIng_OuterDataProcInfo();

            if (bResult)
            {
                ltrScript.Text = JSHelper.GetAlertScript("정상적으로 수정되었습니다.");
                //GridBinding();
                ButtonStatusModify();
                ViewOne(COMP_ID, hdfEstID.Value);
            }
            else
            {
                ltrScript.Text = JSHelper.GetAlertScript("수정되지 않았습니다.");
                return;
            }
        }
    }
コード例 #26
0
    public void SetFormData()
    {
        Biz_Prj_Info     objPrj      = new Biz_Prj_Info(this.IPrjRefID);
        Biz_Prj_Resource prjResource = new Biz_Prj_Resource();
        Biz_Prj_Budget   objBud      = new Biz_Prj_Budget();

        this.IApp_Ref_Id = objPrj.IApp_Ref_Id;
        txtPRJ_CODE.Text = objPrj.IPrj_Code;
        txtPRJ_NAME.Text = objPrj.IPrj_Name;
        this.IDraftEmpID = objPrj.IOwner_Emp_Id;


        if (this.IPrjRefID == 0)
        {
            return;
        }


        lblPrjPeriod.Text = DataTypeUtility.GetToDateTime(objPrj.IPlan_Start_Date).ToShortDateString() + " ~ " + DataTypeUtility.GetToDateTime(objPrj.IPlan_End_Date).ToShortDateString();

        this.ITotalBudget         = objPrj.ITotal_Budget;
        lblTotalBudgetAmount.Text = this.ITotalBudget.ToString("###,##0");


        ugrdBudgetList.Clear();

        DataSet   ds      = objBud.SelectMonthRateList(this.IPrjRefID);
        DataTable dt      = objBud.GetDataTableSchema();
        DateTime  dtStart = DataTypeUtility.GetToDateTime(objPrj.IPlan_Start_Date);
        DateTime  dtEnd   = DataTypeUtility.GetToDateTime(objPrj.IPlan_End_Date);


        for (DateTime date = dtStart; date <= dtEnd;)
        {
            DataRow dataRow = null;

            dataRow = GetBudGetYM(ds.Tables[0], date.ToString("yyyyMM"));

            if (dataRow == null)
            {
                dataRow = dt.NewRow();

                dataRow["ITYPE"]          = "A";
                dataRow["PRJ_REF_ID"]     = this.IPrjRefID;
                dataRow["BUDGET_YM"]      = date.ToString("yyyyMM");
                dataRow["BUDGET_YM_NAME"] = date.ToString("yyyy년 MM월");
                dataRow["MONTHLY_AMOUNT"] = 0;
                dataRow["AMOUNT"]         = 0;
                dataRow["RATE"]           = DBNull.Value;

                dt.Rows.Add(dataRow);
            }
            else
            {
                dt.ImportRow(dataRow);
            }

            date = date.AddMonths(1);
        }

        ugrdBudgetList.DataSource = dt;
        ugrdBudgetList.DataBind();
    }
コード例 #27
0
    /// <summary>
    /// 관점별 / 등급별 현황 그래프
    /// </summary>
    private void SetGraph()
    {
        int chartWidth  = 310;
        int chartHeight = 400;

        double tempWidth  = DataTypeUtility.GetToInt32(hdfScreenWidth.Value) * 0.31;
        double tempHeight = DataTypeUtility.GetToInt32(hdfScreenHeight.Value) * 0.33;

        chartWidth  = DataTypeUtility.GetToInt32(Math.Round(tempWidth, 0));
        chartHeight = DataTypeUtility.GetToInt32(Math.Round(tempHeight, 0));

        chartView.Visible  = false;
        chartGrade.Visible = false;

        this.SetParameter();
        MicroBSC.BSC.Biz.Biz_Bsc_Score_Card objBSC = new MicroBSC.BSC.Biz.Biz_Bsc_Score_Card();

        DataSet dsViw = new DataSet();
        DataSet dsGrd = new DataSet();


        if (rdoGoalTong.SelectedIndex.Equals(0))
        {
            dsViw = objBSC.GetEstDeptKpiViewTypeList
                        (this.IEstTermRefID
                        , this.IYmd
                        , this.ISumType
                        , this.IEstDeptID
                        , this.IExtKpiYN);



            dsGrd = objBSC.GetKpiGradeStatusForMap
                        (this.IEstTermRefID
                        , this.IYmd
                        , this.ISumType
                        , this.IEstDeptID
                        , this.IExtKpiYN);
        }
        else
        {
            dsViw = objBSC.GetEstDeptKpiViewTypeList_Goal
                        (this.IEstTermRefID
                        , this.IYmd
                        , this.ISumType
                        , this.IEstDeptID
                        , this.IExtKpiYN);


            dsGrd = objBSC.GetKpiGradeStatusForMap_Goal
                        (this.IEstTermRefID
                        , this.IYmd
                        , this.ISumType
                        , this.IEstDeptID
                        , this.IExtKpiYN);
        }

        if (dsViw.Tables[0].Rows.Count > 0)
        {
            Chart chartMS = this.ugrdKpiStatusTab.FindControl("chartView") as Chart;

            chartMS.Visible = true;

            MSCharts.DundasChartBase(chartMS, ChartImageType.Jpeg, chartWidth, chartHeight
                                     , BorderSkinStyle.Emboss, Color.FromArgb(181, 64, 1), 1
                                     , Color.FromArgb(0xFF, 0xFF, 0xFE)
                                     , Color.FromArgb(0xFF, 0xFF, 0xFE), Color.FromArgb(0x20, 0x80, 0xD0), ChartDashStyle.Solid
                                     , -1
                                     , ChartHatchStyle.None, MsGradientType.TopBottom, MsAntiAliasing.None);
            Series serARate = MSCharts.CreateSeries(chartMS, "serA", "AreaView", "달성율", null, SeriesChartType.Column, 0, GetChartColor(0), Color.FromArgb(180, 26, 59, 105), Color.FromArgb(64, 0, 0, 0), 1, 9, Color.FromArgb(64, 64, 64));

            chartMS.Legends[0].Enabled = false;
            serARate.ToolTip           = "#VALY{P}";

            chartMS.ChartAreas["AreaView"].Area3DStyle.Enable3D = true;

            chartMS.DataSource     = dsViw;
            serARate.YValueMembers = "ACHV_RATE";
            serARate.XValueMember  = "VIEW_NAME";
            chartMS.DataBind();
        }



        if (dsGrd.Tables[0].Rows.Count > 0)
        {
            Chart chartGD = this.ugrdKpiStatusTab.FindControl("chartGrade") as Chart;


            DataRow[] rows = dsGrd.Tables[0].Select(" C_RATE <> 0 ");

            if (rows.Length > 0)
            {
                chartGD.Visible = true;
            }

            MSCharts.DundasChartBase(chartGD, ChartImageType.Jpeg, chartWidth, chartHeight
                                     , BorderSkinStyle.Emboss, Color.FromArgb(181, 64, 1), 1
                                     , Color.FromArgb(0xFF, 0xFF, 0xFE)
                                     , Color.FromArgb(0xFF, 0xFF, 0xFE), Color.FromArgb(0x20, 0x80, 0xD0), ChartDashStyle.Solid
                                     , -1
                                     , ChartHatchStyle.None, MsGradientType.TopBottom, MsAntiAliasing.None);

            Series serCRate = MSCharts.CreateSeries(chartGD, "serA", "AreaGrade", "달성율", null, SeriesChartType.Doughnut, 0, GetChartColor(0), Color.FromArgb(180, 26, 59, 105), Color.FromArgb(64, 0, 0, 0), 1, 9, Color.FromArgb(64, 64, 64));
            chartGD.Legends[0].Enabled = false;
            serCRate.ToolTip           = "#VALY{P}";

            chartGD.ChartAreas["AreaGrade"].Area3DStyle.Enable3D = true;

            chartGD.DataSource     = dsGrd;
            serCRate.YValueMembers = "C_RATE";
            serCRate.XValueMember  = "THRESHOLD_ENAME";
            chartGD.DataBind();
        }
    }
コード例 #28
0
    protected void ugrdBudgetList_InitializeRow(object sender, Infragistics.WebUI.UltraWebGrid.RowEventArgs e)
    {
        DataRowView drw = (DataRowView)e.Data;

        Biz_Prj_Execution objExecution = new Biz_Prj_Execution();

        DataSet ds = objExecution.GetTotalSum(this.IPrjRefID, drw["BUDGET_YM"].ToString(), DataTypeUtility.GetToDecimal(drw["MONTHLY_AMOUNT"]));

        if (ds.Tables != null && ds.Tables[0].Rows.Count > 0)
        {
            e.Row.Cells.FromKey("AMOUNT").Value = ds.Tables[0].Rows[0]["AMOUNT"];
            e.Row.Cells.FromKey("RATE").Value   = ds.Tables[0].Rows[0]["RATE"];
        }
    }
コード例 #29
0
    protected void ibnAddEstData_Click(object sender, ImageClickEventArgs e)
    {
        //int cnt = UltraWebGrid1.Rows.Count;

        //string dept_ref_id_list = string.Empty;

        //for (int i = 0; i < cnt; i++)
        //{
        //    UltraGridRow row = UltraWebGrid1.Rows[i];

        //    TemplatedColumn selchk = (TemplatedColumn)row.Band.Columns.FromKey("selchk");
        //    CheckBox cBox = (CheckBox)((CellItem)selchk.CellItems[row.BandIndex]).FindControl("cBox");

        //    if (cBox.Checked)
        //    {
        //        dept_ref_id_list += "," + DataTypeUtility.GetValue(row.Cells.FromKey("DEPT_REF_ID").Value);
        //    }
        //}

        //if (dept_ref_id_list.Length > 0)
        //{
        //    dept_ref_id_list = dept_ref_id_list.Remove(0, 1);
        //}
        //else
        //{
        //    dept_ref_id_list = "-1";
        //}
        //DataTable dtEmp = DataTypeUtility.FilterSortDataTable(DT_ESTTARGETMAP, string.Format(" TGT_DEPT_ID  IN ({0}) AND DIRECTION_TYPE = '{1}' ", dept_ref_id_list, ConDIRECTION_TYPE));


        //전체 확정
        DataTable dtEmp = DataTypeUtility.FilterSortDataTable(DT_ESTTARGETMAP, string.Format(" DIRECTION_TYPE = '{0}' ", ConDIRECTION_TYPE));

        DataTable dtDel = DataTypeUtility.GetGroupByDataTable(dtEmp.Copy(), new string[] { "TGT_EMP_ID" });

        MicroBSC.Integration.EST.Biz.Biz_Est_Data bizEstData = new MicroBSC.Integration.EST.Biz.Biz_Est_Data();

        string okMsg = bizEstData.AddData(dtDel
                                          , dtEmp
                                          , COMP_ID
                                          , EST_ID
                                          , ESTTERM_REF_ID
                                          , ESTTERM_SUB_ID
                                          , ConESTTERM_STEP_ID
                                          , ConDIRECTION_TYPE
                                          , "N"
                                          , DateTime.Now
                                          , DateTime.Now
                                          , this.gUserInfo.Emp_Ref_ID);

        if (okMsg.Length == 0)
        {
            ltrScript.Text = JSHelper.GetAlertScript("정상 처리 되었습니다.", false);

            DoBinding_Dept();
            DEPT_REF_ID = -1;
        }
        else
        {
            ltrScript.Text = JSHelper.GetAlertScript(okMsg);
        }
    }
コード例 #30
0
ファイル: BSC_INTRO1.aspx.cs プロジェクト: schifflee/bscgit
    private void DisplayScore()
    {
        writeLog(string.Format("{0} : DisplayScore() Start", Request.PhysicalPath));

        string dept_id     = "";
        string dept_name   = "";
        string est_dept_id = "";

        string bdept_id     = "";
        string bdept_name   = "";
        string best_dept_id = "";


        string Jeonsa_id   = "";
        string Jeonsa_name = "";

        Biz_Bsc_Intro_Score bizDeptInfo   = new Biz_Bsc_Intro_Score();
        DataTable           dtbizDeptInfo = bizDeptInfo.GetJeonsaInfo(DataTypeUtility.GetToInt32(IEstTermRefID).ToString()
                                                                      );

        if (dtbizDeptInfo.Rows.Count > 0)
        {
            Jeonsa_id   = DataTypeUtility.GetString(dtbizDeptInfo.Rows[0][0]);
            Jeonsa_name = DataTypeUtility.GetString(dtbizDeptInfo.Rows[0][1]);
        }

        int score = 0;
        //MBO 점수 가져오기
        Biz_Bsc_Intro_Score bizScore   = new Biz_Bsc_Intro_Score();
        DataTable           dtbizScore = bizScore.GetMboScore(IEstTermRefID, IYmd, gUserInfo.LoginID);

        if (dtbizScore.Rows.Count > 0)
        {
            //lblUserName.Text = Utils.GetSubText(gUserInfo.Emp_Name, 4, true);
            //lblUserName.ToolTip = gUserInfo.Emp_Name;
            dept_id = dtbizScore.Rows[0][1].ToString();

            score = Convert.ToInt32(dtbizScore.Rows[0][3]);
            if (score < 0)
            {
                score = 0;
            }
        }
        //lblMBOscore.Text = String.Format("{0:##0}", score);
        //lblMBOscore.CssClass = searchColor(score);

        dtbizScore = null;
        dtbizScore = bizScore.GetDeptInfo(Convert.ToInt32(dept_id));

        if (dtbizScore.Rows.Count > 0)
        {
            est_dept_id = dtbizScore.Rows[0][0].ToString();
            dept_name   = dtbizScore.Rows[0][2].ToString();

            bdept_id     = "";
            best_dept_id = dtbizScore.Rows[0][7].ToString();

            bdept_name = dtbizScore.Rows[0][15].ToString();

            if (est_dept_id == best_dept_id)
            {
                best_dept_id = Jeonsa_id;
                bdept_name   = Jeonsa_name;
            }
        }

        score      = 0;
        dtbizScore = null;
        dtbizScore = bizScore.GetOrgScore("TS"
                                          , DataTypeUtility.GetToInt32(IEstTermRefID).ToString()
                                          , IYmd
                                          , DataTypeUtility.GetToInt32(est_dept_id).ToString());

        if (dtbizScore.Rows.Count > 0)
        {
            score = Convert.ToInt32(dtbizScore.Rows[0][6]);

            if (score < 0)
            {
                score = 0;
            }
        }
        lblTEAMname.Text    = dept_name;
        lblTEAMname.ToolTip = dept_name;

        lblTEAMscore.Text     = String.Format("{0:##0}", score);
        lblTEAMscore.CssClass = searchColor(score);

        score = 0;
        //dtbizScore = null;
        //dtbizScore = bizScore.GetOrgScore("TS"
        //                                 , DataTypeUtility.GetToInt32(IEstTermRefID).ToString()
        //                                 , IYmd
        //                                 , DataTypeUtility.GetToInt32(best_dept_id).ToString());

        //if (dtbizScore.Rows.Count > 0)
        //{
        //    lblBONBUname.Text = bdept_name;
        //    lblBONBUname.ToolTip = bdept_name;
        //    score = Convert.ToInt32(dtbizScore.Rows[0][6]);
        //    if (score < 0)
        //        score = 0;

        //}

        //lblBONBUscore.Text = String.Format("{0:##0}", score);
        //lblBONBUscore.CssClass = searchColor(score);

        writeLog(string.Format("{0} : DisplayScore() End", Request.PhysicalPath));
    }