Exemple #1
0
        private void button7_Click_1(object sender, EventArgs e)//删除
        {
            string         id  = dataGridView1.Rows[dataGridView1.CurrentRow.Index].Cells[0].Value.ToString();
            ad_ServicesBLL bLL = new ad_ServicesBLL();

            if (bLL.RemoveStudata(id))
            {
                MessageBox.Show("删除成功", "提示", MessageBoxButtons.OK);
                ad_ServicesBLL BLL   = new ad_ServicesBLL();
                DataTable      table = BLL.SelectStubll();
                dataGridView1.DataSource = table;
            }
            else
            {
                MessageBox.Show("删除失败", "提示", MessageBoxButtons.OK);
            }
        }