Exemple #1
0
 private void btnUpdate_Click(object sender, EventArgs e)
 {
     LibraryEntity.Genre ge = new LibraryEntity.Genre();
     ge.MaTL  = (int)dgvGenre.SelectedRows[0].Cells["MaTL"].Value;
     ge.TenTL = dgvGenre.SelectedRows[0].Cells["TenTL"].Value.ToString();
     (new Genre.frmEditGenre(ge)).ShowDialog();
     dgvGenre.Refresh();
 }
        public frmEditGenre(LibraryEntity.Genre genre)
        {
            InitializeComponent();

            genreID                = genre.MaTL;
            txtGenreName.Text      = genre.TenTL;
            lblGenreNameError.Text = "";
            txtGenreName.Focus();
        }