Exemplo n.º 1
0
        private void button2_Click(object sender, EventArgs e)
        {
            if (idBox.Text == "")
            {
                MessageBox.Show("Please select the row, which you wannt to delete!");
                return;
            }

            //string pos = posBox.Text;
            //Изпраща се завката за изтриване
            if (!DBConnection.DeletePosByName(posBox.Text))
            {
                MessageBox.Show("There is a problem with deleting this position! Maybe this position doesn't exist in the database. :(");
            }
            else
            {
                MessageBox.Show("The position is deleted successfully!");
            }


            //Премахва се от листбокса и от комбото
            //delCombo.Items.RemoveAt(delCombo.SelectedIndex);
            //dataGridView1.SelectedRows.delete
        }