Esempio n. 1
0
        private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            Point xy = dataGridView1.CurrentCellAddress;
            int   x  = xy.X;
            int   y  = xy.Y;

            if (x == 3)
            {
                List <string[]> res = bd.selectAllUsersAndResults();
                if (y < res.Count)
                {
                    string login = dataGridView1.Rows[y].Cells[0].Value.ToString();
                    bd.deleteSaveByLogin(login);
                    bd.deleteGameByLogin(login);
                    bd.deleteUsers(login);
                    dataGridView1.Rows.RemoveAt(y);
                }
            }
        }