Пример #1
0
 private void button7_Click(object sender, EventArgs e)
 {
     if (dataGridView1.Rows.Count > 0)
     {
         Profile client = new Profile(Int32.Parse(dataGridView1.Rows[dataGridView1.SelectedCells[0].RowIndex].Cells[0].Value.ToString()));
         if (DialogResult.Yes == MessageBox.Show("Are you sure you want to delete a profile " + client.Name + " ?", "Delete", MessageBoxButtons.YesNo, MessageBoxIcon.Question))
         {
             client.Delete();
             profilesTableAdapter.Fill(tDayDataSet.Profiles);
         }
     }
 }