Пример #1
0
 private void btnAgregar_Click(object sender, EventArgs e)
 {
     try
     {
         CategoriasEdicion f = new CategoriasEdicion();
         f.ShowDialog();
         Cargar();
     }
     catch
     {
     }
 }
Пример #2
0
 private void btnEditar_Click(object sender, EventArgs e)
 {
     try
     {
         if (MessageBox.Show("¿Realmente desea EDITAR el registro seleccionado?", "Pregunta", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
         {
             CategoriasEdicion f = new CategoriasEdicion();
             f.txtIDCategoria.Text = dtgCategorias.CurrentRow.Cells["IDCategoria"].Value.ToString();
             f.txtCategoria.Text   = dtgCategorias.CurrentRow.Cells["Categoria"].Value.ToString();
             f.ShowDialog();
             Cargar();
         }
     }
     catch
     {
     }
 }