private void dataGridView1_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { enterinvoice frm = new enterinvoice(); DataGridViewRow act = dataGridView1.Rows[e.RowIndex]; frm.idonsys.Text = act.Cells["ID"].Value.ToString(); frm.datebill.Text = act.Cells["Fecha"].Value.ToString(); frm.paymeth.Text = act.Cells["Metodo"].Value.ToString(); frm.MdiParent = this.MdiParent; frm.Show(); }
private void dataGridView1_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { DataGridViewRow act = dataGridView1.Rows[e.RowIndex]; enterinvoice f = new enterinvoice(); f.idprovider.Text = act.Cells["ID"].Value.ToString(); f.nameprovider.Text = act.Cells["Nombre"].Value.ToString(); //getdate c = new getdate(); //c.getdatep(id, name, frm.idprovider, frm.nameprovider); f.MdiParent = this.MdiParent; f.Show(); this.Close(); }
private void entradaDeFacturaToolStripMenuItem1_Click(object sender, EventArgs e) { enterinvoice f = new enterinvoice(); try { Form frm2 = Application.OpenForms.Cast <Form>().FirstOrDefault(x => x is enterinvoice); if (frm2 != null) { frm2.BringToFront(); MessageBox.Show("Esta ventana ya esta abierta.", "Error"); return; } else { f.MdiParent = this; f.Show(); } } catch (Exception ex) { MessageBox.Show("No se puede abrir el ventana solicitado. Razón: " + ex.Message, "Error al abrir la ventana.", MessageBoxButtons.OK, MessageBoxIcon.Error); } }