示例#1
0
        private void deleteButton_Click(object sender, EventArgs e)
        {
            if (String.IsNullOrEmpty(idTextBox.Text))
            {
                MessageBox.Show("Id cant be Empty");
                return;
            }
            string id = (idTextBox.Text);

            if (_mangerItem.DeleteData((id)))
            {
                MessageBox.Show("Deleted");
                displayDataGridView.DataSource = _mangerItem.ShowAllInformation();
            }
            else
            {
                MessageBox.Show("Not Deleted");
            }
        }