/// <summary>
 /// Loads the orders.
 /// </summary>
 private void LoadOrders()
 {
     OrderCollection orderCollection = new OrderController().FetchOrdersForUser(ddlCustomer.SelectedValue);
       orderCollection.Sort(Order.Columns.CreatedOn, false);
       dgOrders.DataSource = orderCollection;
       dgOrders.ItemDataBound += new DataGridItemEventHandler(dgOrders_ItemDataBound);
       dgOrders.Columns[0].HeaderText = LocalizationUtility.GetText("hdrDetails");
       dgOrders.Columns[1].HeaderText = LocalizationUtility.GetText("hdrOrderNumber");
       dgOrders.Columns[2].HeaderText = LocalizationUtility.GetText("hdrTotal");
       dgOrders.Columns[3].HeaderText = LocalizationUtility.GetText("hdrStatus");
       dgOrders.Columns[4].HeaderText = LocalizationUtility.GetText("hdrOrderDate");
       dgOrders.DataBind();
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Loads the orders.
 /// </summary>
 private void LoadOrders()
 {
     Query query = new Query(Order.Schema).AddWhere(Order.Columns.OrderStatusDescriptorId, Comparison.NotEquals, (int)OrderStatus.NotProcessed);
       OrderCollection orderCollection = new OrderController().FetchByQuery(query);
       orderCollection.Sort(Order.Columns.ModifiedOn, false);
       BindOrderCollection(orderCollection);
 }