private void presentacionesToolStripMenuItem_Click(object sender, EventArgs e) { frmPresentacion frm = new frmPresentacion(); frm.MdiParent = this; frm.Show(); }
public static frmPresentacion GetInstancia() { if (Instancia == null) { Instancia = new frmPresentacion(); } return(Instancia); }
//HABILITAR TODOS LOS CONTROLES, INCLUYENDO BOTONES private void HabilitarBotones() { switch (ctrlSeleccionado) { case 0: //NUEVO Habilitar(true); btnInsertar.Visible = true; btnNuevo.Visible = false; btnEditar.Visible = false; btnNuevo.Visible = false; btnCancelar.Visible = true; IdPresentacion = 0; Presentacion = string.Empty; Descripcion = string.Empty; lblAgregandoPresentacion.Text = "Agregando presentación"; break; case 1: //EDITAR Habilitar(true); btnEditar.Visible = false; btnInsertar.Enabled = true; btnInsertar.Visible = true; btnNuevo.Visible = false; btnCancelar.Visible = true; lblAgregandoPresentacion.Text = "Detalles"; break; case 2: //CONSULTAR Habilitar(false); btnEditar.Visible = true; btnInsertar.Visible = false; btnNuevo.Visible = true; lblAgregandoPresentacion.Text = "Detalles"; frmPresentacion formPresentacion = frmPresentacion.GetInstancia(); IdPresentacion = formPresentacion.IdPresentacion; Presentacion = formPresentacion.Presentacion; Descripcion = formPresentacion.Descripcion; txtIdPresentacion.Text = Convert.ToString(IdPresentacion); txtPresentacion.Text = Presentacion; txtDescripcion.Text = Descripcion; break; case 3: //CANCELAR Habilitar(false); btnCancelar.Visible = false; btnNuevo.Visible = true; btnInsertar.Visible = false; btnEditar.Visible = true; lblAgregandoPresentacion.Text = "Detalles"; txtIdPresentacion.Text = Convert.ToString(IdPresentacion); txtPresentacion.Text = Presentacion; txtDescripcion.Text = Descripcion; break; } }
private void presentacionesToolStripMenuItem_Click(object sender, EventArgs e) { frmPresentacion frm = new frmPresentacion(); frm.MdiParent = this; frm.Show(); }
private void frmPresentacion_FormClosed(object sender, FormClosedEventArgs e) { _myFormPresentation = null; }
private void frmPresentacion2_FormClosing(object sender, FormClosingEventArgs e) { Instancia = null; }