private void DeletePhoto_Click(object sender, EventArgs e)
        {
            msgLabel.Text = "";
            if (SelectedPhotoid == -1)
            {
                msgLabel.Text = "Please select a photo to delete.";
                return;
            }

            var p = apiPhoto.GetPhotosById(SelectedPhotoid);

            if (p[0].Deleted == false)
            {
                msgLabel.Text = "Photot not marked";
                return;
            }
            var result = apiPhoto.DeletePhoto(SelectedPhotoid);

            SelectedPhotoid   = -1;
            SelectedPhotoPath = null;
            //write label result
            msgLabel.Text = result;

            ShowAllPhotos_Click(sender, e);
        }
Beispiel #2
0
        Photo InterfacePhoto.GetPhotosByIdWCF(int id)
        {
            ApiPhoto apiPhoto = new ApiPhoto();

            return(apiPhoto.GetPhotosById(id));
        }