예제 #1
0
        private void UpdateImageButton_OnClick(object sender, RoutedEventArgs e)
        {
            IList selectedImages = ImagesDataGrid.SelectedItems;
            int   imagesSize     = selectedImages.Count;

            for (var i = 0; i < imagesSize; i++)
            {
                DataRowView row    = (DataRowView)ImagesDataGrid.SelectedItems[i];
                string      textId = row["Id"].ToString();
                int         id     = Convert.ToInt32(textId);

                Imagine image = _client.FindImageById(id);
                image.Descriere = row["Descriere"].ToString();
                image.Data      = Convert.ToDateTime(row["Data"].ToString());
                image.Titlu     = row["Titlu"].ToString();

                _client.UpdateImageAsync(image);
            }

            ImagesTabItem_OnLoaded(sender, e);
        }