Esempio n. 1
0
    private void DoConfig()
    {
        string strStatusStyleID = "0004";

        DropDownListCommom.BindComp(ddlCompID, lblCompTitle);
        DropDownListCommom.BindEstTerm(ddlEstTermRefID);
        DropDownListCommom.BindEstTermSubByYearYN(ddlEstTermSubID
                                                  , WebUtility.GetIntByValueDropDownList(ddlCompID)
                                                  , "N");

        TreeViewCommom.BindEst(TreeView1, WebUtility.GetIntByValueDropDownList(ddlCompID));

        Biz_Status status = new Biz_Status();
        DataSet    ds     = status.GetStatuses(strStatusStyleID);

        UltraWebGrid1.Columns.FromKey("STATUS_YN").ValueList.DataSource    = ds.Tables[0];
        UltraWebGrid1.Columns.FromKey("STATUS_YN").ValueList.DisplayMember = "STATUS_NAME";
        UltraWebGrid1.Columns.FromKey("STATUS_YN").ValueList.ValueMember   = "STATUS_ID";
        UltraWebGrid1.Columns.FromKey("STATUS_YN").ValueList.DataBind();

        Biz_TermSteps termStep = new Biz_TermSteps();
        DataSet       dsStep   = termStep.GetTermSteps(WebUtility.GetIntByValueDropDownList(ddlCompID), "Y");

        UltraWebGrid1.Columns.FromKey("STEP_ID").ValueList.DataSource    = dsStep.Tables[0];
        UltraWebGrid1.Columns.FromKey("STEP_ID").ValueList.DisplayMember = "ESTTERM_STEP_NAME";
        UltraWebGrid1.Columns.FromKey("STEP_ID").ValueList.ValueMember   = "ESTTERM_STEP_ID";
        UltraWebGrid1.Columns.FromKey("STEP_ID").ValueList.DataBind();
        UltraWebGrid1.Columns.FromKey("STEP_ID").ValueList.ValueListItems.RemoveAt(0);
        UltraWebGrid1.Columns.FromKey("STEP_ID").ValueList.ValueListItems.Insert(0, new ValueListItem("-", 0));
    }
Esempio n. 2
0
    public static void BindStatus(DropDownList ddl, string strStatusStyleID)
    {
        Biz_Status status = new Biz_Status();

        ddl.DataSource     = status.GetStatuses(strStatusStyleID);
        ddl.DataTextField  = "STATUS_NAME";
        ddl.DataValueField = "STATUS_ID";
        ddl.DataBind();
    }
Esempio n. 3
0
    private void GridBinding()
    {
        Biz_Status status = new Biz_Status();
        DataSet    ds     = status.GetStatuses("");

        UltraWebGrid1.DataSource = ds;
        UltraWebGrid1.DataBind();

        lblRowCount.Text = ds.Tables[0].Rows.Count.ToString();
    }
Esempio n. 4
0
    private void DoInitControl()
    {
        tblViewStatus.CellPadding = 0;
        tblViewStatus.CellSpacing = 0;
        tblViewStatus.BorderWidth = 0;

        TableRow  tblRow  = new TableRow();
        TableCell tblCell = null;

        tblViewStatus.Rows.Add(tblRow);

        Biz_Status bizStatus = new Biz_Status();
        DataSet    dsStatus  = bizStatus.GetStatuses("0003");

        foreach (DataRow dataRow in dsStatus.Tables[0].Rows)
        {
            tblCell = new TableCell();
            tblCell.Style.Add("padding-right", "5px");
            tblCell.Text = string.Format("<img src='{0}' alt='{1}' /> {2} ", dataRow["STATUS_IMG_PATH"], dataRow["STATUS_DESC"], dataRow["STATUS_NAME"]);
            tblRow.Cells.Add(tblCell);
        }

        DropDownListCommom.BindComp(ddlCompID, lblCompTitle);
        ICOMP_ID = GetRequestByInt("COMP_ID", PageUtility.GetIntByValueDropDownList(ddlCompID));
        PageUtility.FindByValueDropDownList(ddlCompID, ICOMP_ID);

        DropDownListCommom.BindEstTerm(ddlEstTerm);
        IESTTERM_REF_ID = GetRequestByInt("ESTTERM_REF_ID", PageUtility.GetIntByValueDropDownList(ddlEstTerm));
        PageUtility.FindByValueDropDownList(ddlEstTerm, IESTTERM_REF_ID);

        DropDownListCommom.BindEstTermSubByYearYN(ddlEstTermSubID
                                                  , ICOMP_ID
                                                  , "N");
        IESTTERM_SUB_ID = GetRequestByInt("ESTTERM_SUB_ID", PageUtility.GetIntByValueDropDownList(ddlEstTermSubID));
        PageUtility.FindByValueDropDownList(ddlEstTermSubID, IESTTERM_SUB_ID);

        DropDownListCommom.BindEstTermStep(ddlEstTermStepID, ICOMP_ID, IEST_ID, "N");
        if (ddlEstTermStepID.Items.Count > 0)
        {
            ddlEstTermStepID.Items.Insert(0, new ListItem("::전체::", "0"));
            ddlEstTermStepID.SelectedIndex = 0;
            ESTTERM_STEP_ID = PageUtility.GetIntByValueDropDownList(ddlEstTermStepID);
        }

        WebCommon.SetComDeptDropDownList(ddlComDept, true);
        //PageUtility.FindByValueDropDownList(ddlComDept, BizUtility.GetDeptID(gUserInfo.Emp_Ref_ID));
    }
Esempio n. 5
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);
    }