예제 #1
0
        private void user_del()
        {
            wnDm wDm   = new wnDm();
            int  rsNum = wDm.deleteStaff(txt_user_cd.Text.ToString());

            if (rsNum == 0)
            {
                lbl_user_gbn.Text      = "";
                btnDelete.Enabled      = false;
                txt_user_cd.Enabled    = true;
                txt_user_cd.Text       = "";
                txt_user_nm.Text       = "";
                cmb_dept.SelectedIndex = 0;
                cmb_pos.SelectedIndex  = 0;
                cmb_stor.SelectedIndex = 0;
                txt_phone.Text         = "";
                txt_login.Text         = "";
                txt_pw.Text            = "";
                cmb_auth.SelectedIndex = 0;
                txt_user_cmt.Text      = "";
                user_list();
                MessageBox.Show("성공적으로 삭제하였습니다.");
            }
            else if (rsNum == 1)
            {
                MessageBox.Show("삭제에 실패하였습니다");
            }
            else
            {
                MessageBox.Show("Exception 에러");
            }
        }
예제 #2
0
        private void user_del()
        {
            if (MessageBox.Show("삭제하려는 계정으로 등록된 데이터들이 손상될 수 있습니다. 정말로 삭제하시겠습니까?", "YesOrNo", MessageBoxButtons.YesNo) == DialogResult.Yes)
            {
                wnDm wDm   = new wnDm();
                int  rsNum = wDm.deleteStaff(txt_user_cd.Text.ToString());
                if (rsNum == 0)
                {
                    lbl_user_gbn.Text      = "";
                    btnDelete.Enabled      = false;
                    txt_user_cd.Enabled    = true;
                    txt_user_cd.Text       = "";
                    txt_user_nm.Text       = "";
                    txt_dept.Text          = "";
                    txt_pos.Text           = "";
                    cmb_stor.SelectedIndex = -1;

                    txt_phone.Text = "";
                    txt_login.Text = "";
                    txt_pw.Text    = "";

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