public void LoadOrders() { List <Order> orderList = new List <Order>(); orderList = logic.GetAllOrders(); var query = (from c in orderList select new { c.IdOrder, c.CustomerName, c.Quantity, c.ProductName, c.OrderDate }).ToList(); GridViewOrders.DataSource = query; GridViewOrders.Columns["IdOrder"].DisplayIndex = 0; }
public List <Order> GetAllOrders() { GetDataLogic logic = new GetDataLogic(); return(logic.GetAllOrders()); }