Exemplo n.º 1
0
 private void BtnAddForenty_Click(object sender, EventArgs e)
 {
     using (var forms = new frmAutorAdd(null, new AutorRepositoty(new BiblioteContext())))
     {
         var usercontrol = OpenFormsDialog.ShowForm(null, forms);
         if (usercontrol == DialogResult.OK)
         {
             Loader();
         }
     }
 }
Exemplo n.º 2
0
 private void MenuEditar_Click(object sender, System.EventArgs e)
 {
     if (gridView1.FocusedRowHandle >= 0 || gridView1.SelectedRowsCount > 0)
     {
         using (var forms = new frmAutorAdd(autorModelsBindingSource.Current as AutorModels,
                                            new AutorRepositoty(new BiblioteContext())))
         {
             var usercontrol = OpenFormsDialog.ShowForm(null, forms);
             if (usercontrol == DialogResult.OK)
             {
                 Loader();
             }
         }
     }
 }