Пример #1
0
        private void BtnPhotoErase_Click(object sender, EventArgs e)
        {
            if (DgwStudents.SelectedRows.Count == 0)
            {
                MessageBox.Show("Selezionere l'allievo del quale eliminare la foto");
                return;
            }
            DataGridViewCell c = DgwStudents.SelectedRows[0].Cells["IdStudent"];
            Student          s = db.GetStudent((int)c.Value);

            db.EraseStudentsPhoto((int)c.Value, CmbSchoolYear.Text);
            picStudent.Image = null;
        }