public void SetupData(Artist p_oArtist) { txtArtist.Text = p_oArtist.ArtistName; txtBioInfo.Text = p_oArtist.Description; txtGenre.Text = p_oArtist.Genre; grdAlbums.DataSource = p_oArtist.Albums; }
public void SaveData() { Artist oArtist = new Artist(); oArtist.ArtistName = txtArtist.Text; oArtist.Description = txtBioInfo.Text; oArtist.Genre = txtGenre.Text; oArtist.LastUpdate = DateTime.Now; using (VinylDBContext db = new VinylDBContext()) { db.Artists.Add(oArtist); db.SaveChanges(); } }
public ArtistEdit(Artist p_oArtist) { SetupData(p_oArtist); }