Ejemplo n.º 1
0
    protected void ibnCheckID_Click(object sender, ImageClickEventArgs e)
    {
        Biz_ColumnInfos columnInfos = new Biz_ColumnInfos();
        bool            bDuplicate  = columnInfos.IsExist(COMP_ID, EST_ID, txtColKey.Text.Trim());

        if (bDuplicate)
        {
            ltrScript.Text = JSHelper.GetAlertScript("동일한 컬럼키가 존재합니다.");
            return;
        }
        else
        {
            ltrScript.Text = JSHelper.GetAlertScript("사용가능한 컬럼키입니다.");
            return;
        }
    }
Ejemplo n.º 2
0
    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;
            }
        }
    }