Esempio n. 1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            quizWeight = new DataTable();
        }


        COMP_ID         = WebUtility.GetRequestByInt("COMP_ID");
        EST_ID          = WebUtility.GetRequest("EST_ID");
        ESTTERM_REF_ID  = WebUtility.GetRequestByInt("ESTTERM_REF_ID");
        ESTTERM_SUB_ID  = WebUtility.GetRequestByInt("ESTTERM_SUB_ID");
        ESTTERM_STEP_ID = WebUtility.GetRequestByInt("ESTTERM_STEP_ID");
        EST_DEPT_ID     = WebUtility.GetRequestByInt("EST_DEPT_ID");
        EST_EMP_ID      = WebUtility.GetRequestByInt("EST_EMP_ID");
        PRJ_REF_ID      = WebUtility.GetRequestByInt("PRJ_REF_ID");
        EST_TGT_TYPE    = WebUtility.GetRequest("EST_TGT_TYPE", "EST");


        TGT_DEPT_ID = WebUtility.GetRequestByInt("TGT_DEPT_ID", 0);
        TGT_EMP_ID  = WebUtility.GetRequestByInt("TGT_EMP_ID", 0);


        READ_ONLY_YN = WebUtility.GetRequest("READ_ONLY_YN", "N");

        _estInfos           = new Biz_EstInfos(COMP_ID, EST_ID);
        _q_item_desc_use_yn = _estInfos.Q_Item_Desc_Use_YN;

        //PRJ_TYPE
        Biz_Prj_Info objPrjInfo = new Biz_Prj_Info(PRJ_REF_ID);

        PRJ_TYPE = objPrjInfo.IPrj_Type;

        if (READ_ONLY_YN.Equals("N"))
        {
            Biz_TermInfos termInfos   = new Biz_TermInfos(ESTTERM_REF_ID);
            Biz_TermSubs  termSubs    = new Biz_TermSubs(COMP_ID, ESTTERM_SUB_ID);
            Biz_TermSteps termSteps   = new Biz_TermSteps(COMP_ID, ESTTERM_STEP_ID);
            Biz_EmpInfos  estEmpInfos = new Biz_EmpInfos(EST_EMP_ID);
            Biz_EmpInfos  tgtEmpInfos = new Biz_EmpInfos(TGT_EMP_ID);

            //Biz_DeptInfos estDeptInfo = new Biz_DeptInfos(EST_DEPT_ID);
            MicroBSC.Integration.COM.Biz.Biz_Com_Dept_Info bizComDeptInfo = new MicroBSC.Integration.COM.Biz.Biz_Com_Dept_Info(EST_DEPT_ID);
            MicroBSC.Integration.COM.Biz.Biz_Com_Dept_Info tgtDeptInfo    = new MicroBSC.Integration.COM.Biz.Biz_Com_Dept_Info(TGT_DEPT_ID);


            //Biz_Prj_Data data = new Biz_Prj_Data(COMP_ID
            //                                    , EST_ID
            //                                    , ESTTERM_REF_ID
            //                                    , ESTTERM_SUB_ID
            //                                    , ESTTERM_STEP_ID
            //                                    , EST_DEPT_ID
            //                                    , EST_EMP_ID
            //                                    , PRJ_REF_ID);



            _status_style_id = _estInfos.Status_Style_ID;

            Biz_Prj_QuestionPrjMap objQuestionPrjMap = new Biz_Prj_QuestionPrjMap(COMP_ID
                                                                                  , ESTTERM_REF_ID
                                                                                  , ESTTERM_SUB_ID
                                                                                  , 0
                                                                                  , EST_ID
                                                                                  , ""
                                                                                  , PRJ_REF_ID);

            if (objQuestionPrjMap.Q_Obj_ID == null)
            {
                ltrScript.Text = JSHelper.GetAlertScript("프로젝트사업명에 대한 평가질의서가 매핑되지 않았습니다.", true);
                return;
            }


            // 창을 띄은 사람이 평가자 인지 체크
            if (EST_EMP_ID == EMP_REF_ID)
            {
                _status_id         = "P";
                ibnSaveEst.Visible = true;
            }
            //else
            //{
            //    ibnSaveEst.Visible = false;

            //    // 롤에 따른 버튼 권한이 있는지 확인
            //    //BizUtility.SetButtonVisibleCommandNameByRolID(EMP_REF_ID, ibnSaveEst);
            //}



            Q_OBJ_ID          = objQuestionPrjMap.Q_Obj_ID;
            EST_NAME          = _estInfos.Est_Name;
            ESTTERM_REF_NAME  = termInfos.EstTerm_Name;
            ESTTERM_SUB_NAME  = termSubs.EstTerm_Sub_Name;
            ESTTERM_STEP_NAME = termSteps.EstTerm_Step_Name;
            EST_EMP_NAME      = estEmpInfos.Emp_Name;
            EST_DEPT_NAME     = bizComDeptInfo.DEPT_NAME; //estDeptInfo.Dept_Name;
            TGT_EMP_NAME      = tgtEmpInfos.Emp_Name;
            TGT_DEPT_NAME     = tgtDeptInfo.DEPT_NAME;    //tgtDeptInfo.Dept_Name;
            PRJ_NAME          = objPrjInfo.IPrj_Name;
            PRJ_CODE          = objPrjInfo.IPrj_Code;
        }
        else
        {
            Q_OBJ_ID           = WebUtility.GetRequest("Q_OBJ_ID");
            ibnSaveEst.Visible = false;
        }

        if (!Page.IsPostBack)
        {
            SetLabelText();

            //임의수정
            Biz_Prj_Data bizPrjData = new Biz_Prj_Data();
            DataTable    dt         = bizPrjData.GetPrjData(COMP_ID, EST_ID, ESTTERM_REF_ID, ESTTERM_SUB_ID, ESTTERM_STEP_ID, EST_DEPT_ID, EST_EMP_ID, TGT_DEPT_ID, TGT_EMP_ID, PRJ_REF_ID, "", "").Tables[0];
            string       Status_ID  = "";
            if (dt != null && dt.Rows.Count > 0)
            {
                Status_ID = dt.Rows[0]["STATUS_ID"].ToString();
            }

            if (Status_ID.Equals("E"))
            {
                ibnSaveEst.Visible = false;
            }

            DataListBinding(dt);

            ibnSaveEst.Attributes.Add("onclick", "if(confirm('평가내용을 저장하시겠습니까?')) return ConfirmQuesiton();else return false;");
        }

        ltrScript.Text = "";
    }
Esempio n. 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();
    }