Exemplo n.º 1
0
 private void btnAgregar_Click(object sender, EventArgs e)
 {
     using (FormVehiculoMarcaAddEdit form = new FormVehiculoMarcaAddEdit(null))
     {
         if (form.ShowDialog() == DialogResult.OK)
         {
             marcaVehiculoBindingSource.DataSource = db.Marca_Vehiculo.ToList();
         }
     }
 }
Exemplo n.º 2
0
        private void btnEditar_Click(object sender, EventArgs e)
        {
            var m = marcaVehiculoBindingSource.Current;

            if (m == null)
            {
                return;
            }

            using (FormVehiculoMarcaAddEdit form = new FormVehiculoMarcaAddEdit(m as Marca_Vehiculo))
            {
                if (form.ShowDialog() == DialogResult.OK)
                {
                    marcaVehiculoBindingSource.DataSource = db.Marca_Vehiculo.ToList();
                }
            }
        }