示例#1
0
    protected void getEstSelfData()
    {
        Biz_Est_Self_Data bizEstSelfData = new Biz_Est_Self_Data();

        DT_EST_SELF_DATA = bizEstSelfData.Get_Self_Est_Question(COMP_ID
                                                                , EST_ID
                                                                , ESTTERM_REF_ID
                                                                , ESTTERM_SUB_ID
                                                                , ESTTERM_STEP_ID
                                                                , TGT_DEPT_ID
                                                                , TGT_EMP_ID);
    }
示例#2
0
    protected bool doSave()
    {
        Biz_Est_Self_Data bizEstSelfData = new Biz_Est_Self_Data();

        Biz_QuestionDatas questionDatas = new Biz_QuestionDatas();
        Biz_Datas         datas         = new Biz_Datas();

        Biz_EstInfos bizEstInfo = new Biz_EstInfos(COMP_ID, EST_ID);

        int est_dept_id = TGT_DEPT_ID;
        int est_emp_id  = TGT_EMP_ID;

        string status_style_id = DataTypeUtility.GetString(bizEstInfo.Status_Style_ID);

        Biz_Status self_status = new Biz_Status();
        DataTable  dt_status   = self_status.GetStatuses(status_style_id).Tables[0];

        string status_id = DataTypeUtility.GetString(DataTypeUtility.FilterSortDataTable(dt_status, "SEQ=2").Rows[0]["STATUS_ID"]);

        DataTable dtQData       = Get_SaveDT_EstQuestion();
        DataTable dtEstData     = AddNewEstDataRow(datas.GetDataTableSchema(), status_id);
        DataTable dtEstSelfData = Get_SaveDT_EstComment();

        //------------------------- 상태 순서 체크 시작 ----------------------------------------

        if (dtEstData.Rows.Count > 0)
        {
            if (datas.IsExist(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))
            {
                datas = new Biz_Datas(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);

                Biz_Status status_data = new Biz_Status(datas.Status_ID, status_style_id);
                Biz_Status status_new  = new Biz_Status(DataTypeUtility.GetValue(dtEstData.Rows[0]["STATUS_ID"]), status_style_id);

                if (status_data.Seq + 1 != status_new.Seq &&
                    status_data.Seq != status_new.Seq)
                {
                    ltrScript.Text = JSHelper.GetAlertScript(string.Format(@"[{0}] 단계에서 [{1}] 단계로 진행될 수 없어 정상적으로 처리할 수 없습니다."
                                                                           , status_data.Status_Name
                                                                           , status_new.Status_Name)
                                                             , true);
                    return(false);
                }
            }
            else
            {
                Biz_Status status_new = new Biz_Status(DataTypeUtility.GetValue(dtEstData.Rows[0]["STATUS_ID"]), status_style_id);

                if (status_new.Seq != 2)
                {
                    ltrScript.Text = JSHelper.GetAlertScript(string.Format(@"[{0}] 단계은 두번째 단계가 아니여서 정상적으로 처리할 수 없습니다."
                                                                           , status_new.Status_Name)
                                                             , true);
                    return(false);
                }
            }
        }

        //------------------------- 상태 순서 체크 끝 ----------------------------------------



        bool isSuccessed = bizEstSelfData.Save_Self_Est(dtEstData, dtQData, dtEstSelfData, gUserInfo.Emp_Ref_ID);

        return(isSuccessed);
    }