Exemple #1
0
 private void MI_Delete_Click(object sender, EventArgs e)
 {
     if (PhotoBrowser.SelectedPhoto != null && PhotoBrowser.SelectedPhoto.OwnerId == Logged_User.Id)
     {
         DBPhotosWebServices.DeletePhoto(PhotoBrowser.SelectedPhoto);
         PhotoBrowser.DeleteSelectedPhoto();
     }
 }
Exemple #2
0
        private void DeletePhoto_Click(object sender, EventArgs e)
        {
            var confirmResult = MessageBox.Show("Are you sure to delete this item ??", "Confirm Delete!!", MessageBoxButtons.YesNo);

            if (confirmResult == DialogResult.Yes)
            {
                DBPhotosWebServices.DeletePhoto(PhotoBrowser.SelectedPhoto);
                PhotoBrowser.DeleteSelectedPhoto();
            }
        }