private void _dgvIntervalos_SelectionChanged(object sender, EventArgs e) { if (_dgvIntervalos.SelectedRows.Count > 0) { DataRow r = (_dgvIntervalos.SelectedRows[0].DataBoundItem as DataRowView).Row; _intervaloMaestro = new MC_IntervaloMaestro(r); _ctrlIntervalo.Visualizar(_intervaloMaestro); _dgvDetalleIntervalo.DataSource = MC_IntervaloDetalleMgr.Instancia.GetPorPkCodMaestro(_intervaloMaestro.PkCodIntervaloMaestro); } }
private void _btnAdicionar_Click(object sender, EventArgs e) { _anterior = _intervaloMaestro; _intervaloMaestro = new MC_IntervaloMaestro(); _intervaloMaestro.EsNuevo = true; _intervaloMaestro.DCodEstado = 1; _ctrlIntervalo.Visualizar(_intervaloMaestro); _ctrlIntervalo.HabilitarEdicion(); HabilitarBotonesEdicion(); }
private void _btnCancelar_Click(object sender, EventArgs e) { _ctrlIntervalo.DeshabilitarEdicion(); if (_intervaloMaestro.EsNuevo) { _intervaloMaestro = _anterior; } _ctrlIntervalo.Visualizar(_intervaloMaestro); DeshabilitarBotonesEdicion(); }
public void Visualizar(MC_IntervaloMaestro i) { _intervaloMaestro = i; VisualizarActual(); }