Пример #1
0
        private void button5_Click(object sender, EventArgs e)//删除
        {
            string         teano = Teagridview.Rows[Teagridview.CurrentRow.Index].Cells[0].Value.ToString();
            ad_ServicesBLL bLL   = new ad_ServicesBLL();

            if (bLL.RemoveTeadata(teano))
            {
                MessageBox.Show("删除成功", "提示", MessageBoxButtons.OK);
                ad_ServicesBLL BLL   = new ad_ServicesBLL();
                DataTable      table = BLL.SelectTeabll();
                Teagridview.DataSource = table;
            }
            else
            {
                MessageBox.Show("删除失败", "提示", MessageBoxButtons.OK);
            }
        }