private void btnRemove_Click(object sender, EventArgs e) { DialogResult result = MessageBox.Show("确定要删除吗?", "提示", MessageBoxButtons.OKCancel); if (result == DialogResult.Cancel) { return; } //获取编号 int oid = Convert.ToInt32(dgvOrderDetail.SelectedRows[0].Cells[0].Value); //执行删除 if (oiBll.DeleteDetailById(oid)) { LoadDetailList(); } }
private void btnRemove_Click(object sender, EventArgs e) { DialogResult result = MessageBox.Show("Are you sure to delete?", "tip", MessageBoxButtons.OKCancel); if (result == DialogResult.Cancel) { return; } //Get the number of cuisine to be deleted int oid = Convert.ToInt32(dgvOrderDetail.SelectedRows[0].Cells[0].Value); //Execeute the delete action if (oiBll.DeleteDetailById(oid)) { LoadDetailList(); } }