private void btnSave_Click(object sender, System.EventArgs e) { var photo = new ServiceReference1.Photos { Id = Guid.NewGuid(), Name = tbName.Text, Path = lblPath.Text, CreationDate = DateTime.Now }; var personId = ((ServiceReference1.Person)cbPersons.SelectedItem).Id; photo.People[photo.People.Length] = _service.GetPersonById(personId); var typeId = ((ServiceReference1.Type)cbTypes.SelectedItem).Id; photo.Types[photo.Types.Length] = _service.GetTypeById(typeId); var eventId = ((ServiceReference1.Event)cbEvent.SelectedItem).Id; photo.Event = _service.GetEventById(eventId); var placeId = ((Places)cbPlaces.SelectedItem).Id; photo.Places[photo.Places.Length] = _service.GetPlaceById(placeId); _service.AddPhoto(photo); Close(); }
public System.Threading.Tasks.Task UpdatePhotoAsync(ServiceReference1.Photos oldEntity, ServiceReference1.Photos newEntity) { return(base.Channel.UpdatePhotoAsync(oldEntity, newEntity)); }
public System.Threading.Tasks.Task AddPhotoAsync(ServiceReference1.Photos entity) { return(base.Channel.AddPhotoAsync(entity)); }