Beispiel #1
0
 /// <summary>
 /// Supprime l'auteur de la liste des auteurs du nouveau volume.
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void dgvItems_MouseDoubleClick(object sender, MouseEventArgs e)
 {
     ServiceReference.Author authorToRemove = _newAuthors.SingleOrDefault(a => a.PersId == (int)dgvItems.SelectedRows[0].Cells["PersId"].Value);
     if (authorToRemove != null)
     {
         _newAuthors.Remove(authorToRemove);
         _bsDataGridView.ResetBindings(false);// Sinon ne mets pas l'affichage à jour.
     }
 }
Beispiel #2
0
 /// <summary>
 /// Rajoute un auteur à la liste provisoire.
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btAddAuthor_Click(object sender, EventArgs e)
 {
     if
     (
         CheckInputStrg.Check(CheckInputStrg.InputType.Name, tbFirstName.Text) == true &&
         CheckInputStrg.Check(CheckInputStrg.InputType.Name, tbLastName.Text)
     )
     {
         ServiceReference.Author newAuthor = new ServiceReference.Author();
         newAuthor.FirstName = tbFirstName.Text;
         newAuthor.LastName  = tbLastName.Text;
         _newAuthors.Add(newAuthor);
     }
 }