private void btnIrNota_Click(object sender, EventArgs e) { int f = dgvDocumentos.CurrentRow.Index; if (dgvDocumentos.Rows.Count >= 1) { if (dgvDocumentos.Rows[f].Cells[tipo.Name].Value.ToString() == "NI") { frmNotaIngreso form = new frmNotaIngreso(); form.MdiParent = this.MdiParent; form.CodNota = notaI.CodNotaIngreso; form.Proceso = this.Proceso; form.Show(); } else { frmNotaSalida form = new frmNotaSalida(); form.MdiParent = this.MdiParent; form.CodNota = notaS.CodNotaSalida; form.Proceso = this.Proceso; form.Show(); } } }
private void dgvDocumentos_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { if (dgvDocumentos.Rows.Count >= 1 && e.RowIndex != -1) { if (dgvDocumentos.Rows[e.RowIndex].Cells[tipo.Name].Value.ToString() == "NI") { frmNotaIngreso form = new frmNotaIngreso(); form.MdiParent = this.MdiParent; form.CodNota = notaI.CodNotaIngreso; form.Proceso = this.Proceso; form.Show(); //form.ShowDialog(); } else { frmNotaSalida form = new frmNotaSalida(); form.MdiParent = this.MdiParent; form.CodNota = notaS.CodNotaSalida; form.Proceso = this.Proceso; form.Show(); //form.ShowDialog(); } } }