private void LimpiarCampos() { ObservacionesTextBox.Text = string.Empty; ProblemasTextBox.Text = string.Empty; DgvProductosOrden.DataSource = null; DgvProductosOrden.Refresh(); CodOrdenCompraLabel.Text = "---"; ProveedorLabel.Text = "---"; FechaEmisionLabel.Text = "---"; FechaRecepcionLabel.Text = "---"; CodFacLabel.Text = "---"; ImporteLabel.Text = "---"; }
private void CargarDatosInforme(int codOrdenCompra) { informeRecep = new DInformeRecep(); dPedido = new DPedidoReaprov(); dStockPedido = new DStockPedidoReaprov(); var dt = informeRecep.GetDatosInformeByCodOrdenCompra(codOrdenCompra); var codPR = dPedido.GetCodPedidoReaprovByCodOrdenCompra(codOrdenCompra); var dt2 = dStockPedido.GetStockEnPedidoReaprov(codPR); CodOrdenCompraLabel.Text = dt.Rows[0]["CodOrdenCompra"].ToString(); ProveedorLabel.Text = dt.Rows[0]["RazonSocial"].ToString(); FechaEmisionLabel.Text = dt.Rows[0]["FechaEmision"].ToString(); CodFacLabel.Text = dt.Rows[0]["CodFac"].ToString(); FechaRecepcionLabel.Text = dt.Rows[0]["FechaRecep"].ToString(); ImporteLabel.Text = dt.Rows[0]["Importe"].ToString(); try { ObservacionesTextBox.Text = dt.Rows[0]["Observaciones"].ToString(); } catch (Exception) { ObservacionesTextBox.Text = string.Empty; } DgvProductosOrden.DataSource = dt2; DgvProductosOrden.Refresh(); //var nRows = DgvProductosOrden.RowCount; //for (int i = 0; i < nRows / 2; i++) //{ // DgvProductosOrden.Rows.RemoveAt(nRows - 1); //} }