예제 #1
0
        private void buttonUpdateImage_Click(object sender, EventArgs e)
        {
            foreach (DataGridViewRow row in dataGridViewDisplayImage.SelectedRows)
            {
                int     id    = Convert.ToInt32(row.Cells[0].Value);
                Imagine image = _carService.FindImageById(id);

                image.Titlu     = row.Cells[1].Value.ToString();
                image.Data      = Convert.ToDateTime(row.Cells[2].Value);
                image.Descriere = row.Cells[4].Value.ToString();

                _carService.UpdateImage(image);
            }

            // reload to view changes
            FormDisplayDetails_Load(sender, e);
        }
예제 #2
0
 public void UpdateImage(Imagine image)
 {
     _api.UpdateImage(image);
 }