private void butThuhoi_Click(object sender, EventArgs e) { if (l_id != 0 && cmbSophieu.Text != "") { if (d.get_data("select done from " + user + ".d_theodoiduyetdutru where id=" + l_id).Tables[0].Rows[0]["done"].ToString() == "2") { MessageBox.Show("Phiếu này đã được duyệt, không thể thu hồi !", d.Msg); return; } if (MessageBox.Show("Bạn muốn thu hồi phiếu " + cmbSophieu.Text + " ?", d.Msg, MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) { try { if (!d.huy_duyetdutrukho(l_id, l_iddutru, i_makho, decimal.Parse(cmbSophieu.Text))) { MessageBox.Show("Hủy duyệt không thành công !", d.Msg); return; } load_phieu(); cmbSophieu_SelectedIndexChanged(null, null); load_treeview(); } catch { } } } }