예제 #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);
        }
예제 #2
0
        Photo InterfacePhoto.GetPhotosByIdWCF(int id)
        {
            ApiPhoto apiPhoto = new ApiPhoto();

            return(apiPhoto.GetPhotosById(id));
        }