Exemple #1
0
    protected void ibnCheckID_Click(object sender, ImageClickEventArgs e)
    {
        if (txtEstScheID.Text.Trim().Length == 0)
        {
            ltrScript.Text = JSHelper.GetAlertScript("일정 ID를 입력해주세요.");
            return;
        }

        string        strEstScheID = txtEstScheID.Text.Trim();
        Biz_ScheInfos scheInfos    = new Biz_ScheInfos();
        bool          bDuplicate   = scheInfos.IsExist(COMP_ID, strEstScheID);

        if (bDuplicate)
        {
            ltrScript.Text = JSHelper.GetAlertScript("존재하는 일정 ID가 있습니다.");
        }
        else
        {
            ltrScript.Text = JSHelper.GetAlertScript("사용가능한 일정 ID 입니다.");
        }
    }
Exemple #2
0
    protected void ibnSave_Click(object sender, ImageClickEventArgs e)
    {
        string est_sche_id = txtEstScheID.Text.Trim();

        if (est_sche_id.Length == 0)
        {
            est_sche_id = hdfEstScheId.Value.Trim();
        }

        string up_est_sche_id = hdfUpEstScheID.Value.Trim();
        string est_sche_name  = txtEstScheName.Text.Trim();
        string est_sche_desc  = txtEstScheDesc.Text.Trim();
        int    sort_order     = DataTypeUtility.GetToInt32(txtSortOrder.Text);
        string est_id         = hdfEstID.Value.Trim();

        Biz_ScheInfos scheInfos = new Biz_ScheInfos();

        if (PageWriteMode == WriteMode.New)
        {
            bool bDuplicate = scheInfos.IsExist(COMP_ID, est_sche_id);

            if (bDuplicate == true)
            {
                ltrScript.Text = JSHelper.GetAlertScript("존재하는 일정 ID가 있습니다.", false);
                return;
            }

            bool bResult = scheInfos.AddScheInfo(COMP_ID
                                                 , est_sche_id
                                                 , up_est_sche_id
                                                 , est_sche_name
                                                 , est_sche_desc
                                                 , sort_order
                                                 , est_id
                                                 , DateTime.Now
                                                 , gUserInfo.Emp_Ref_ID
                                                 );

            if (bResult == true)
            {
                ltrScript.Text = JSHelper.GetAlertScript("정상적으로 저장되었습니다.");
                BindGrid(COMP_ID);
                ButtonStatusByInit();
            }
            else
            {
                ltrScript.Text = JSHelper.GetAlertScript("처리 중 오류가 발생하였습니다.");
                return;
            }
        }
        else if (PageWriteMode == WriteMode.Modify)
        {
            bool bIsExist = scheInfos.IsExist(COMP_ID, est_sche_id);

            if (bIsExist == false)
            {
                ltrScript.Text = JSHelper.GetAlertScript("해당 자료가 없습니다.");
                return;
            }

            bool bResult = scheInfos.ModifyScheInfo(COMP_ID
                                                    , est_sche_id
                                                    , up_est_sche_id
                                                    , est_sche_name
                                                    , est_sche_desc
                                                    , sort_order
                                                    , est_id
                                                    , DateTime.Now
                                                    , gUserInfo.Emp_Ref_ID
                                                    );

            if (bResult == true)
            {
                ltrScript.Text = JSHelper.GetAlertScript("정상적으로 수정되었습니다.");
                BindGrid(COMP_ID);
                ButtonStatusByInit();
            }
            else
            {
                ltrScript.Text = JSHelper.GetAlertBackScript("수정되지 않았습니다.");
                return;
            }
        }
    }