private void DgvClientes_CellContentClick(object sender, DataGridViewCellEventArgs e) { string CLIENTE_ID = DgvClientes.Rows[e.RowIndex].Cells["Column1"].Value.ToString(); frmCustomer frmCustomer = Application.OpenForms["frmCustomer"] as frmCustomer; if (frmCustomer != null) { frmCustomer.WindowState = FormWindowState.Normal; frmCustomer.BringToFront(); frmCustomer.Activate(); } else { frmCustomer = new frmCustomer(CLIENTE_ID); frmCustomer.MdiParent = this.ParentForm; frmCustomer.Dock = DockStyle.Fill; frmCustomer.Show(); } }
private void btnContacto_Click(object sender, EventArgs e) { frmCustomer frmCustomer = new frmCustomer("0"); frmCustomer.ShowDialog(); }