예제 #1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        ltrScript.Text = "";

        // 웹 취약성 검사 때문에 처리
        if (EST_JOB_IDS.Equals("-0") ||
            EST_TGT_TYPE.Equals("-0"))
        {
            FormsAuthentication.SignOut();
            string login_page_url = WebUtility.GetConfig("Login_Page_Url", "~/base/Login.aspx");
            Response.Redirect(login_page_url);
        }


        EST_ID = "3N";



        IS_ADMIN = false;
        checkAdmin();



        if (!Page.IsPostBack)
        {
            DropDownListCommom.BindComp(ddlCompID, lblCompTitle);
            COMP_ID = WebUtility.GetIntByValueDropDownList(ddlCompID);

            DropDownListCommom.BindEstTerm(ddlEstTermRefID);
            ESTTERM_REF_ID = WebUtility.GetIntByValueDropDownList(ddlEstTermRefID);

            DropDownListCommom.BindEstTermSubByYearYN(ddlEstTermSubID, COMP_ID, "N");
            ESTTERM_SUB_ID = WebUtility.GetIntByValueDropDownList(ddlEstTermSubID);

            ESTTERM_STEP_ID = WebUtility.GetRequestByInt("ESTTERM_STEP_ID", -1);

            GridBidingData(COMP_ID
                           , EST_ID
                           , ESTTERM_REF_ID
                           , ESTTERM_SUB_ID
                           , ESTTERM_STEP_ID
                           , IS_ADMIN);
            if (Convert.ToInt32(lblRowCount.Text) > 0)
            {
                UltraWebGrid1.Rows[0].Cells[0].Activated = true;
            }
        }
        else
        {
            COMP_ID        = WebUtility.GetIntByValueDropDownList(ddlCompID);
            ESTTERM_REF_ID = WebUtility.GetIntByValueDropDownList(ddlEstTermRefID);
            ESTTERM_SUB_ID = WebUtility.GetIntByValueDropDownList(ddlEstTermSubID);
        }
        //평가 상태 범례
        HtmlScriptCommon.CreateStatusHtmlTable(tblViewStatus, EST_ID);


        setControlState();
    }
예제 #2
0
    /// <summary>
    /// 그리드 바인딩 메소드
    /// </summary>
    /// <param name="comp_id"></param>
    /// <param name="est_id"></param>
    /// <param name="estterm_ref_id"></param>
    /// <param name="estterm_sub_id"></param>
    /// <param name="estterm_step_id"></param>
    private void GridBidingData(int comp_id
                                , string est_id
                                , int estterm_ref_id
                                , int estterm_sub_id
                                , int estterm_step_id
                                , int est_emp_id
                                , bool isAll)
    {
        Biz_EstInfos estInfo = new Biz_EstInfos(comp_id, est_id);

        if (!estInfo.IsExists(comp_id, est_id))
        {
            ltrScript.Text = JSHelper.GetAlertScript("선택된 회사의 평가정보가 없습니다.");
            return;
        }

        DropDownListCommom.BindEstTermSub(ddlEstTermSubID, comp_id, est_id, "");
        DropDownListCommom.BindEstTermStep(ddlEstTermStepID, comp_id, est_id);

        // 처음 실행될때
        if (estterm_sub_id.Equals(0))
        {
            ESTTERM_SUB_ID = WebUtility.GetIntByValueDropDownList(ddlEstTermSubID);
        }

        // 만약 주기가 년간일 경우
        if (YEAR_YN.Equals("Y"))
        {
            ESTTERM_SUB_ID = BizUtility.GetEstTermSubIDByYearYN(COMP_ID);
        }

        // 만약 차수가 합산일 경우
        if (MERGE_YN.Equals("Y"))
        {
            ESTTERM_STEP_ID = BizUtility.GetEstTermStepIDByMergeYN(COMP_ID);
        }
        else
        {
            // 만약 모든 차수를 보여 줘야하는 경우
            if (ESTTERM_STEP_ALL_USE_YN.Equals("Y"))
            {
                ESTTERM_STEP_ID          = 0;
                ddlEstTermStepID.Visible = false;
            }
        }

        WebUtility.FindByValueDropDownList(ddlEstTermRefID, estterm_ref_id);

        if (ddlEstTermSubID.Visible)
        {
            WebUtility.FindByValueDropDownList(ddlEstTermSubID, estterm_sub_id);
        }

        if (ddlEstTermStepID.Visible)
        {
            WebUtility.FindByValueDropDownList(ddlEstTermStepID, estterm_step_id);
        }

        // 상태 html
        HtmlScriptCommon.CreateStatusHtmlTable(tblViewStatus, est_id);

        Biz_Prj_Data objPrjData = new Biz_Prj_Data();

        if (isAll)
        {
            est_emp_id = 0;
        }

        DataTable dt = objPrjData.GetPrjData(comp_id
                                             , est_id
                                             , estterm_ref_id
                                             , estterm_sub_id
                                             , estterm_step_id
                                             , 0
                                             , est_emp_id
                                             , 0
                                             , YEAR_YN
                                             , MERGE_YN).Tables[0];

        UltraWebGrid1.Clear();
        UltraWebGrid1.DataSource = dt;
        UltraWebGrid1.DataBind();

        lblRowCount.Text = dt.Rows.Count.ToString();
    }
예제 #3
0
    protected void Page_Load(object sender, EventArgs e)
    {
        EST_JOB_IDS             = WebUtility.GetRequest("EST_JOB_IDS");
        EST_TGT_TYPE            = WebUtility.GetRequest("EST_TGT_TYPE", "EST");
        YEAR_YN                 = WebUtility.GetRequest("YEAR_YN", "N");
        MERGE_YN                = WebUtility.GetRequest("MERGE_YN", "N");
        DEPT_COLUMN_NO_USE_YN   = WebUtility.GetRequest("DEPT_COLUMN_NO_USE_YN", "N");
        ESTTERM_SUB_ALL_USE_YN  = WebUtility.GetRequest("ESTTERM_SUB_ALL_USE_YN", "N");
        ESTTERM_STEP_ALL_USE_YN = WebUtility.GetRequest("ESTTERM_STEP_ALL_USE_YN", "N");

        if (!Page.IsPostBack)
        {
            DropDownListCommom.BindComp(ddlCompID, lblCompTitle);
            DropDownListCommom.BindEstTerm(ddlEstTermRefID);
            DropDownListCommom.BindDefaultValue(ddlEstTermSubID, "----------", "");
            DropDownListCommom.BindDefaultValue(ddlEstTermStepID, "----------", "");

            if (COMP_ID == 0)
            {
                COMP_ID = WebUtility.GetIntByValueDropDownList(ddlCompID);
            }

            if (ESTTERM_REF_ID == 0)
            {
                ESTTERM_REF_ID = WebUtility.GetIntByValueDropDownList(ddlEstTermRefID);
            }

            if (ESTTERM_SUB_ID == 0)
            {
                ESTTERM_SUB_ID = WebUtility.GetIntByValueDropDownList(ddlEstTermSubID);
            }

            if (ESTTERM_STEP_ID == 0)
            {
                ESTTERM_STEP_ID = WebUtility.GetIntByValueDropDownList(ddlEstTermStepID);
            }

            ibnSearch.Attributes.Add("onclick", "return Search();");
            ibnConfirmEstQ.Attributes.Add("onclick", "return confirm('질의평가를 확정하시겠습니까?');");
            ibnAggEstTermStep.Attributes.Add("onclick", "return confirm('평가차수 간에 가중치를 반영하여 점수를 집계하시겠습니까?');");
            ibnGetPrjPoint.Attributes.Add("onclick", "return confirm('프로젝트 점수를 반영하시겠습니까?');");
            ibnProjectToEmpData.Attributes.Add("onclick", "return confirm('사원별 점수로 반영하시겠습니까?');");

            if (!WebUtility.GetRequest("EST_ID").Equals(""))
            {
                txtSearchEstName.Visible = false;
                imgEstButton.Visible     = false;
                ibnSearch.Visible        = false;

                hdfSearchEstID.Value = WebUtility.GetRequest("EST_ID");
                EST_ID = hdfSearchEstID.Value;

                GridBidingData(COMP_ID
                               , EST_ID
                               , ESTTERM_REF_ID
                               , ESTTERM_SUB_ID
                               , ESTTERM_STEP_ID
                               , EMP_REF_ID
                               , SEARCH_ALL);

                BizUtility.SetButtonVisibleCommandNameByRolID(EMP_REF_ID, tdImgBox.Controls);

                BizUtility.SetButtonVisibleByEstJobID(EST_JOB_IDS
                                                      , tdImgBox.Controls
                                                      , COMP_ID
                                                      , hdfSearchEstID.Value
                                                      , ESTTERM_REF_ID
                                                      , ESTTERM_SUB_ID
                                                      , ESTTERM_STEP_ID);

                SetConfirmStatusHtml(EST_JOB_IDS);
            }
        }

        COMP_ID        = WebUtility.GetIntByValueDropDownList(ddlCompID);
        EST_ID         = hdfSearchEstID.Value;
        ESTTERM_REF_ID = WebUtility.GetIntByValueDropDownList(ddlEstTermRefID);

        if (YEAR_YN.Equals("Y"))
        {
            ESTTERM_SUB_ID = BizUtility.GetEstTermSubIDByYearYN(COMP_ID);
        }
        else
        {
            ESTTERM_SUB_ID = WebUtility.GetIntByValueDropDownList(ddlEstTermSubID);
        }

        if (MERGE_YN.Equals("Y"))
        {
            ESTTERM_STEP_ID = BizUtility.GetEstTermStepIDByMergeYN(COMP_ID);
        }
        else
        {
            if (ESTTERM_STEP_ALL_USE_YN.Equals("Y"))
            {
                ESTTERM_STEP_ID = 0;
            }
            else
            {
                ESTTERM_STEP_ID = WebUtility.GetIntByValueDropDownList(ddlEstTermStepID);
            }
        }

        ltrScript.Text = "";

        // 상태 html
        HtmlScriptCommon.CreateStatusHtmlTable(tblViewStatus, EST_ID);
    }
예제 #4
0
    protected void Page_Load(object sender, EventArgs e)
    {
        ltrScript.Text = "";

        /*
         *
         * 부서 타입 설정 갯수에 따라 유동적으로 동작하도록 하려 하였으나....일단 팀과 본부로 고정
         *
         */


        EST_ID = "3A";//조직KPI 평가


        //쿼리스트링으로 받은 부서타입을 배열로 변환
        DEPT_TYPE_REF_ID_LIST = "4, 7";
        DEPT_TYPE_REF_ID_LIST = DEPT_TYPE_REF_ID_LIST.Replace(" ", "");
        string[] tmp = DEPT_TYPE_REF_ID_LIST.Split(',');
        DEPT_TYPE_REF_ID = new int[tmp.Length];
        for (int i = 0; i < tmp.Length; i++)
        {
            if (tmp[i].Trim().Length > 0)
            {
                DEPT_TYPE_REF_ID[i] = DataTypeUtility.GetToInt32(tmp[i]);
            }
            else
            {
                //비정상 데이터
                this.ltrScript.Text = JSHelper.GetAlertScript("비정상 부서타입이 존재합니다.");
                return;
            }
        }



        IS_ADMIN = false;
        checkAdmin();



        UltraWebGrid1.DisplayLayout.Pager.CurrentPageIndex = CURRENT_PAGE;
        UltraWebGrid1.DisplayLayout.Pager.PageCount        = PAGE_CNT;



        if (!Page.IsPostBack)
        {
            DropDownListCommom.BindComp(ddlCompID, lblCompTitle);
            COMP_ID = WebUtility.GetIntByValueDropDownList(ddlCompID);

            DropDownListCommom.BindEstTerm(ddlEstTermRefID);
            ESTTERM_REF_ID = WebUtility.GetIntByValueDropDownList(ddlEstTermRefID);

            DropDownListCommom.BindEstTermSubByYearYN(ddlEstTermSubID, COMP_ID, "N");
            ESTTERM_SUB_ID = WebUtility.GetIntByValueDropDownList(ddlEstTermSubID);

            ESTTERM_STEP_ID = 1;

            GridBidingData(COMP_ID
                           , EST_ID
                           , ESTTERM_REF_ID
                           , ESTTERM_SUB_ID
                           , ESTTERM_STEP_ID);
        }
        else
        {
            COMP_ID        = WebUtility.GetIntByValueDropDownList(ddlCompID);
            ESTTERM_REF_ID = WebUtility.GetIntByValueDropDownList(ddlEstTermRefID);
            ESTTERM_SUB_ID = WebUtility.GetIntByValueDropDownList(ddlEstTermSubID);
        }

        HtmlScriptCommon.CreateStatusHtmlTable(tblViewStatus, EST_ID);// 상태 html
    }