Example #1
0
        private void btnVerDetalle_Click(object sender, EventArgs e)
        {
            if ((dgvDocumentos.CurrentCell != null) || (dgvDocumentos.SelectedRows.Count >0))
            {
                int fila = 0;
                if (dgvDocumentos.CurrentCell != null)
                {
                    fila = dgvDocumentos.CurrentCell.RowIndex;
                }
                else
                    fila = dgvDocumentos.CurrentRow.Index;

                string movimiento = dgvDocumentos.CurrentRow.Cells["TipoMovimiento"].Value.ToString();
                int nroDocumento = int.Parse(dgvDocumentos.CurrentRow.Cells["NroDocumento"].Value.ToString());
                if (movimiento.Equals("Transferencia"))
                {
                    transferencia = transferencia = new TransferenciaBL().cargarTransferencia(nroDocumento);
                    frmDetalleSalida ventDetalle = new frmDetalleSalida(transferencia);
                }
                else
                {//es incidencia
                    incDevolucion = new IncidenciaBL().CargarIncidencia(nroDocumento);
                    frmDetalleSalida ventDetalle = new frmDetalleSalida(incDevolucion);
                }

            }
        }
Example #2
0
        private void btnVerDetalle_Click(object sender, EventArgs e)
        {
            if (dgvDocumentos.CurrentRow != null)
            {
                int fila = dgvDocumentos.CurrentRow.Index;
                string movimiento = dgvDocumentos.CurrentRow.Cells["TipoMovimiento"].Value.ToString();
                int nroDocumento = int.Parse(dgvDocumentos.CurrentRow.Cells["NroDocumento"].Value.ToString());
                if (movimiento.Equals("Transferencia"))
                {
                    transferencia = transferencia = new TransferenciaBL().cargarTransferencia(nroDocumento);
                    if (transferencia != null)
                    {
                        frmDetalleSalida ventDetalle = new frmDetalleSalida(transferencia);
                        ventDetalle.ShowDialog(this);
                    }

                }
                else
                {//es incidencia
                    incDevolucion = new IncidenciaBL().cargarIncidencia(nroDocumento);
                    if (incDevolucion != null)
                    {
                        frmDetalleSalida ventDetalle = new frmDetalleSalida(incDevolucion);
                        ventDetalle.ShowDialog(this);
                    }
                }
            }
            else Utils.Utils.Error(this, "Seleccione el documento que desea revisar");
        }