private void dgb_stock_CellClick(object sender, DataGridViewCellEventArgs e) { try { var BL = new tb_60movimientosdetBL(); var BE = new tb_60movimientosdet(); if (dgb_stock.CurrentRow != null) { var xproductid = string.Empty; xproductid = dgb_stock.Rows[e.RowIndex].Cells["productid"].Value.ToString().Trim(); BE.moduloid = modulo; BE.productid = xproductid.ToString(); BE.filtro = "2"; TablaHistorial = BL.GetAll_HistorialxProducto(EmpresaID, BE).Tables[0]; if (TablaHistorial.Rows.Count > 0) { dgb_historial.DataSource = TablaHistorial; } else { dgb_historial.DataSource = TablaHistorial; } } } catch (Exception ex) { } }
private void btn_busqueda_Click(object sender, EventArgs e) { var BL = new tb_60movimientosdetBL(); var BE = new tb_60movimientosdet(); BE.moduloid = modulo; BE.productid = productid.Text.ToString(); BE.filtro = "1"; TablaStock = BL.GetAll_HistorialxProducto(EmpresaID, BE).Tables[0]; if (TablaStock.Rows.Count > 0) { dgb_stock.DataSource = TablaStock; } else { dgb_stock.DataSource = TablaStock; } Dgb_historial(); }
private void Dgb_historial() { var BL = new tb_60movimientosdetBL(); var BE = new tb_60movimientosdet(); BE.moduloid = modulo; BE.productid = productid.Text.ToString(); BE.filtro = "2"; TablaHistorial = BL.GetAll_HistorialxProducto(EmpresaID, BE).Tables[0]; if (TablaHistorial.Rows.Count > 0) { dgb_historial.DataSource = TablaHistorial; } else { dgb_historial.DataSource = TablaHistorial; } }