private void AddPhoto() { AddEditPhoto DLG = new AddEditPhoto(false); if (DLG.ShowDialog() == DialogResult.OK) { DLG.Photo.OwnerId = Logged_User.Id; DBPhotosWebServices.CreatePhoto(DLG.Photo); LoadPhoto(); } }
// Stocker une nouvelle image // Retourne le GUID de l'image créée public string Add(Image image) { Photo photo = new Photo { Title = "DB_Image", Shared = true, OwnerId = User.Id }; photo.SetImage(image); photo = DBPhotosWebServices.CreatePhoto(photo); DB_Photos.Add(photo); return(photo.ImageGUID); }
private void SubmitTask() { if (photo == null) { Photo photo = new Photo(); photo.SetImage(IBX_photo.BackgroundImage); photo.CreationDate = dateTimePicker1.Value; photo.Description = RTBX_description.Text; photo.Keywords = TB_keyword.Text; photo.Shared = CB_Shared.Checked; photo.Title = TB_title.Text; photo.OwnerId = User.Id; photo = DBPhotosWebServices.CreatePhoto(photo); } }