예제 #1
0
 private void BtnAddForenty_Click(object sender, EventArgs e)
 {
     using (var forms = new frmPaisAdd(null, new PaisRepository(new BiblioteContext())))
     {
         var usercontrol = OpenFormsDialog.ShowForm(null, forms);
         if (usercontrol == DialogResult.OK)
         {
             Loader();
         }
     }
 }
예제 #2
0
 private void MenuEditar_Click(object sender, System.EventArgs e)
 {
     if (gridView1.FocusedRowHandle >= 0 || gridView1.SelectedRowsCount > 0)
     {
         using (var forms = new frmPaisAdd(paisModelsBindingSource.Current as PaisModels,
                                           new PaisRepository(new BiblioteContext())))
         {
             var usercontrol = OpenFormsDialog.ShowForm(null, forms);
             if (usercontrol == DialogResult.OK)
             {
                 Loader();
             }
         }
     }
 }