Exemplo n.º 1
0
    protected void ibnSave_Click(object sender, ImageClickEventArgs e)
    {
        string pos_id   = txtPosID.Text.Trim();
        string pos_name = txtPosName.Text.Trim();

        Biz_Positions positions = new Biz_Positions("EST_POSITION_" + hdfPosInfoID.Value, hdfPosInfoID.Value);

        if (PageWriteMode == WriteMode.New)
        {
            bool bDuplicate = positions.IsExist(pos_id);

            if (bDuplicate == true)
            {
                ltrScript.Text = JSHelper.GetAlertScript("중복되었습니다.", false);
                return;
            }

            bool bResult = positions.AddPositions(pos_id
                                                  , pos_name
                                                  , DateTime.Now
                                                  , EMP_REF_ID);

            if (bResult == true)
            {
                DetailGridBinding(hdfPosInfoID.Value);
                InitForm();
            }
            else
            {
                ltrScript.Text = JSHelper.GetAlertBackScript("등록되지 않았습니다.");
                return;
            }
        }
        else if (PageWriteMode == WriteMode.Modify)
        {
            bool bIsExist = positions.IsExist(pos_id);

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

            bool bResult = positions.ModifyPositions(pos_id
                                                     , pos_name
                                                     , DateTime.Now
                                                     , EMP_REF_ID);

            if (bResult == true)
            {
                DetailGridBinding(hdfPosInfoID.Value);
                InitForm();
            }
            else
            {
                ltrScript.Text = JSHelper.GetAlertBackScript("수정되지 않았습니다.");
                return;
            }
        }
    }
Exemplo n.º 2
0
    protected void ibnDelete_Click(object sender, ImageClickEventArgs e)
    {
        string strPos_id = hdfPosID.Value.Trim();

        Biz_Positions positions = new Biz_Positions("EST_POSITION_" + hdfPosInfoID.Value, hdfPosInfoID.Value);
        bool          bIsExist  = positions.IsExist(strPos_id);

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

        bool bResult = positions.RemovePositions(strPos_id);

        if (bResult)
        {
            DetailGridBinding(hdfPosInfoID.Value);
            InitForm();
        }
        else
        {
            ltrScript.Text = JSHelper.GetAlertBackScript("삭제되지 않았습니다.");
            return;
        }
    }
Exemplo n.º 3
0
    protected void ibnCheckID_Click(object sender, ImageClickEventArgs e)
    {
        string pos_id = txtPosID.Text.Trim();

        if (pos_id.Length == 0)
        {
            ltrScript.Text = JSHelper.GetAlertScript("POS_ID를 입력해주세요.");
            return;
        }

        Biz_Positions positions  = new Biz_Positions("EST_POSITION_" + hdfPosInfoID.Value, hdfPosInfoID.Value);
        bool          bDuplicate = positions.IsExist(pos_id);

        if (bDuplicate)
        {
            ltrScript.Text = JSHelper.GetAlertScript("존재하는 POS_ID가 있습니다.");
        }
        else
        {
            ltrScript.Text = JSHelper.GetAlertScript("사용가능한 POS_ID 입니다.");
        }
    }