private void btnDelete_Click(object sender, EventArgs e) { DialogResult result1 = MessageBox.Show("정말로 삭제하시겠습니까?", "", MessageBoxButtons.YesNo); if (result1 == DialogResult.Yes) { try { wnDm wDm = new wnDm(); int rsNum = wDm.deleteNotice( textBox1.Text.ToString() ); DataTable dt = null; StringBuilder sb = new StringBuilder(); MessageBox.Show("삭제되었습니다"); } catch (Exception ex) { MessageBox.Show("시스템 오류" + e.ToString()); } } else { MessageBox.Show("취소하셨습니다"); } resetSetting(); }