Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
        String InterfacePhoto.DeletePhotoWCF(int id)
        {
            ApiPhoto apiPhoto = new ApiPhoto();

            return(apiPhoto.DeletePhoto(id));
        }