private void btnAgregar_Click(object sender, EventArgs e) { using (var context = new Base_Servicio_PracticasEntities(CadenaConexion)) { using (var a = new AgregarReporte(CadenaConexion, ID_EST)) { a.ShowDialog(); } } }
private void Button3_Click(object sender, EventArgs e) { int?id = GetID(); if (id != null) { using (var context = new Base_Servicio_PracticasEntities(cadenaconexion)) { using (var a = new AgregarReporte(cadenaconexion, id.GetValueOrDefault())) { a.ShowDialog(); } } } }