예제 #1
0
        public void delete_sel(DataGridView data_gv)
        {
            DialogResult dr = MessageBox.Show("确定删除吗", "提醒", MessageBoxButtons.OKCancel);

            if (data_gv.SelectedRows.Count > 0)
            {
                for (int i = 0; i < data_gv.SelectedRows.Count; i++)
                {
                    data_gv.Rows.RemoveAt(data_gv.SelectedRows[i].Index);
                    SelItemsDAO ma = new SelItemsDAO();
                    ma.update_delete();
                }
            }
        }
예제 #2
0
        public void delete_sel(DataGridView data_gv)
        {
            DialogResult dr = MessageBox.Show("确定删除吗", "提醒", MessageBoxButtons.OKCancel);

            if (data_gv.SelectedRows.Count > 0)
            {
                for (int i = 0; i < data_gv.SelectedRows.Count; i++)
                {
                    data_gv.Rows.RemoveAt(data_gv.SelectedRows[i].Index);
                    SelItemsDAO ma = new SelItemsDAO();
                    ma.update_delete();
                }
            }
        }