示例#1
0
        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;
        }
示例#2
0
        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();
            }
        }
示例#3
0
 public ArtistEdit(Artist p_oArtist)
 {
     SetupData(p_oArtist);
 }