private void flow_del()
        {
            wnDm wDm   = new wnDm();
            int  rsNum = wDm.deleteFlow(txt_flow_cd.Text.ToString());

            if (rsNum == 0)
            {
                lbl_flow_gbn.Text           = "";
                txt_flow_cd.Text            = "";
                txt_flow_nm.Text            = "";
                cmb_stor.SelectedIndex      = 0;
                chk_flow_yn.Checked         = false;
                chk_item_gbn.Checked        = false;
                chk_flow_chk_yn.Checked     = false;
                chk_temp_yn.Checked         = false;
                chk_mold_yn.Checked         = false;
                cmb_poor_type.SelectedIndex = 0;
                chk_manager_yn.Checked      = false;
                cmb_manager.SelectedIndex   = 0;
                txt_flow_comment.Text       = "";

                flow_list();
                MessageBox.Show("성공적으로 삭제하였습니다.");
            }
            else if (rsNum == 1)
            {
                MessageBox.Show("삭제에 실패하였습니다.");
            }
        }
Esempio n. 2
0
        private void flow_del()
        {
            wnDm wDm = new wnDm();

            DataTable dt = wDm.select_all_flowCd(txt_flow_cd.Text.ToString());

            if (dt != null && dt.Rows.Count > 0)
            {
                MessageBox.Show("해당 공정의 사용내역이 있어서 삭제할 수 없습니다.");
                return;
            }



            int rsNum = wDm.deleteFlow(txt_flow_cd.Text.ToString());

            if (rsNum == 0)
            {
                lbl_flow_gbn.Text           = "";
                txt_flow_cd.Text            = "";
                txt_flow_nm.Text            = "";
                cmb_stor.SelectedIndex      = 0;
                chk_flow_yn.Checked         = false;
                chk_item_gbn.Checked        = false;
                chk_flow_chk_yn.Checked     = false;
                chk_temp_yn.Checked         = false;
                chk_mold_yn.Checked         = false;
                cmb_poor_type.SelectedIndex = 0;
                chk_manager_yn.Checked      = false;
                cmb_manager.SelectedIndex   = 0;
                txt_flow_comment.Text       = "";

                flow_list();
                MessageBox.Show("성공적으로 삭제하였습니다.");
            }
            else if (rsNum == 1)
            {
                MessageBox.Show("삭제에 실패하였습니다.");
            }
        }