private void BtnEditarProveedor_Click(object sender, EventArgs e) { foreach (Form formulario in this.formsAbiertos) { if (formulario is FrmObservarProveedores castForm) { castForm.WindowState = FormWindowState.Normal; castForm.Text = "Seleccione un proveedor"; castForm.editarProveedor = true; castForm.ondgvDoubleClick += CastForm_ondgvDoubleClick; castForm.Show(); castForm.Activate(); return; } } FrmObservarProveedores form = new FrmObservarProveedores { StartPosition = FormStartPosition.CenterScreen, editarProveedor = true, Text = "Seleccione un proveedor", Name = "FrmObservarProveedores" }; form.ondgvDoubleClick += CastForm_ondgvDoubleClick; form.FormClosed += Frm_FormClosed; form.Show(); Form frm = (Form)form; this.formsAbiertos.Add(frm); }
private void BtnObservarProveedores_Click(object sender, EventArgs e) { foreach (Form formulario in this.formsAbiertos) { if (formulario is FrmObservarProveedores castForm) { castForm.WindowState = FormWindowState.Normal; castForm.Show(); castForm.Activate(); return; } } FrmObservarProveedores form = new FrmObservarProveedores { StartPosition = FormStartPosition.CenterScreen, Name = "FrmObservarProveedores" }; form.FormClosed += Frm_FormClosed; form.Show(); Form frm = (Form)form; this.formsAbiertos.Add(frm); }
private void TxtProveedor_Click(object sender, EventArgs e) { FrmObservarProveedores frmObservarProveedores = new FrmObservarProveedores { StartPosition = FormStartPosition.CenterScreen, nuevoArticulo = true }; frmObservarProveedores.ondgvDoubleClick += FrmObservarProveedores_ondgvDoubleClick; frmObservarProveedores.Show(); }