示例#1
0
 private void btnUpdateMusicInfo_Click(object sender, System.EventArgs e)
 {
     frmCommonInfo1.GetCommonInfo2(music);
     music.album  = cmbAlbum.SelectedValue.ToString();
     music.artist = cmbArtist.SelectedValue.ToString();
     musicControler.UpdateInfo(music);
 }
        private void btnUpdate_Click(object sender, System.EventArgs e)
        {
            //ID already available
            //Get common info from the CommonInfo usercontrol
            commonInfo.GetCommonInfo2(book);
            //Extends to book info
            book.title       = cboTitle.Text.Trim();
            book.authorID    = cboAuthor.SelectedValue.ToString();
            book.genreID     = cboGenre.SelectedValue.ToString();
            book.publisherID = cboPublisher.SelectedValue.ToString();
            book.year        = (int)udYear.Value;
            book.cover       = Encoding.UTF8.GetBytes("(No cover)");

            //Update it
            controller.UpdateInfo(book);
        }