private void LoadGrid() { var lista = business.GetAll(); metroGrid1.DataSource = lista; metroGrid1.Columns[0].HeaderText = "Marca"; metroGrid1.Columns[1].HeaderText = "Tipo"; metroGrid1.Columns[2].HeaderText = "ID Producto"; metroGrid1.Columns[3].HeaderText = "Precio"; metroGrid1.Columns[4].HeaderText = "Precio Unitario"; metroGrid1.Columns[5].HeaderText = "Stock"; metroGrid1.Columns[6].HeaderText = "Stock Mínimo"; metroGrid1.Columns[7].Visible = false; }
private void Caja_Load(object sender, EventArgs e) { try { cmbProveedor.DataSource = provBusiness.getAll(); cmbProveedor.DisplayMember = "Nombre"; cmbProveedor.ValueMember = "ID"; metroGrid2.DataSource = business.GetHistorico("COMPRA_HISTORICO"); metroGrid3.DataSource = business.GetHistorico("VENTA_HISTORICO"); FormatGridHistorico(metroGrid2); FormatGridHistorico(metroGrid3); VentasGrid.DataSource = prodBusiness.GetAll(); } catch (Exception ex) { MetroMessageBox.Show(Owner, ex.Message, "Error"); } }
public IEnumerable <Producto> Get() { productoBusiness = new ProductoBusiness(configuration.GetConnectionString("VideoContext").ToString()); return(productoBusiness.GetAll()); }