public CreateAlbumPage CrearAlbum(Album album) { foreach (var input in AllForm) { input.Clear(); } Thread.Sleep(1000); NameInput.SendKeys(album.Name); Thread.Sleep(1000); ArtistInput.SendKeys(album.Artist); Thread.Sleep(1000); YearInput.SendKeys(album.Year.ToString()); Thread.Sleep(1000); GenresInput.SendKeys(album.Genres); Thread.Sleep(1000); SubGenresInput.SendKeys(album.SubGenres); Thread.Sleep(1000); return(this); }
public ArtistInput getArtist(int id) { var ArtistTMP = _contx.Artist.Where(e => e.IdArtist == id).FirstOrDefault(); if (ArtistTMP == null) { throw new Exc_SthMissing("Artist with this ID is not existing"); } ArtistInput res = new ArtistInput() { IdArtist = ArtistTMP.IdArtist, NickName = ArtistTMP.NickName }; var Event = from art in _contx.Artist join art_evn in _contx.ArtistEvent on art.IdArtist equals art_evn.IdArtist join evn in _contx.Event on art_evn.IdEvent equals evn.IdEvent where art.IdArtist == ArtistTMP.IdArtist orderby evn.StartDate select new { evn.IdEvent, evn.Name, evn.StartDate, evn.EndDate }; if (!Event.Any()) { throw new Exc_SthMissing("Artist with this ID havent participated in any event yet"); } foreach (var x in Event) { EventInput eventInput = new EventInput() { IdEvent = x.IdEvent, Name = x.Name, StartDate = x.StartDate, EndDate = x.EndDate }; res.EventParticipate.Add(eventInput); } return(res); }