// productos: private void monedaToolStripMenuItem_Click(object sender, EventArgs e) { if (prod == null) { prod = new frm_productos(); prod.MdiParent = this; //prod.FormClosed += new FormClosedEventHandler(Prov_FormClosed); //prov.FormClosed += Prov_FormClosed(Prov_FormClosed); prod.FormClosed += new FormClosedEventHandler(Prod_FormClosed); prod.Show(); } }
private void Prod_FormClosed(object sender, FormClosedEventArgs e) { prod = null; }
private void Form1_Load(object sender, EventArgs e) { // conexion odbc //try //{ // seguridad.Conexion.DSN = "crm"; // seguridad.Conexion.PassWord = "******"; //} //catch (Exception ex) //{ // MessageBox.Show(ex.Message); //} BloquearMDI(); Bloqueo.DesbloquearMDI(menuStrip1); //------------------------ tipo = OpBD.VerificarTipoUsuario(); if (tipo == "administrador") { //estadisticasToolStripMenuItem.Enabled = false; seguridadToolStripMenuItem.Enabled = true; foreach (ToolStripMenuItem item_seg in seguridadToolStripMenuItem.DropDownItems) { item_seg.Enabled = true; } } caso = null; bitacora = null; ap = null; modap = null; crearu = null; edi = null; desh = null; asper = null; edper = null; elper = null; camb = null; cliente_form = null; prov = null; prod = null; soli = null; fac = null; bita_v = null; bita_c = null; if (ini == null) { ini = new Form_inicio(); ini.MdiParent = this; ini.FormClosed += new FormClosedEventHandler(frm_inicio_FormClosed); ini.Show(); } }