private void dtgCabeceraCotizacion_Click(object sender, EventArgs e) { //PRIMERO DEBEMOS DE VERIFICAR SI EXISTEN ELEMENTOS EN NUESTRO DATAGRIDVIEW if (Convert.ToInt32(DatosCabeceraCot.SelectedRowsCount) >= 1) { datCotizaciones oDatCotizacion = new datCotizaciones(); int numero = Convert.ToInt32(DatosCabeceraCot.GetFocusedRowCellValue(colNumero)); int id_empresa = Convert.ToInt32(DatosCabeceraCot.GetFocusedRowCellValue(colidEmpresa)); dtgDetalleCotizacion.DataSource = oDatCotizacion.DetalleCotizacionVista(numero, id_empresa); } }
private void btnConsultarPedido_Click(object sender, EventArgs e) { datCotizaciones oDatCotizacion = new datCotizaciones(); frmConsultaCotizacion f = new frmConsultaCotizacion(); f.ShowDialog(); txtNumero.Text = frmConsultaCotizacion.numero.ToString(); cmbEstado.SelectedIndex = frmConsultaCotizacion.estado - 1; cmbEstado.Enabled = false; dtgCotizacionDet.DataSource = oDatCotizacion.DetalleCotizacionVista(frmConsultaCotizacion.numero,frmConsultaCotizacion.id_empresa); }