public void LoadOrderList() { StartDate = Utility.GetTodayDate(); StartDatePicker.Text = StartDate.ToString("dd'/'MM'/'yyyy"); var items = Intent.GetParcelableArrayListExtra("key"); if (items != null) { items = items.Cast<OrderList1> ().ToArray (); List<OrderList> orderList = new List<OrderList> (); foreach (OrderList1 item in items) { OrderList order = new OrderList (); order.StockId = item.Id; order.StockName = item.StockName; order.Unit = item.Unit; order.ShouldNumber = item.ShouldNumber; order.StockNumber = item.StockNumber; order.OrderNumber = item.OrderNumber; if (item.IsSkip == 0) { order.IsSkip = false; } else order.IsSkip = true; orderList.Add (order); } orderListAdapter = new OrderListAdapter (this, orderList); orderListView.Adapter = orderListAdapter; this.mNotes.Text = OrderController.GetOrderNotes (Utility.GetTodayDate ()); } else { InitData (); } }
public int LoadOrderList() { this.EditType = Intent.GetStringExtra ("type"); var items = Intent.GetParcelableArrayListExtra("key"); if (items != null) { items = items.Cast<OrderList1> ().ToArray (); List<OrderList> orderList = new List<OrderList> (); foreach (OrderList1 item in items) { OrderList order = new OrderList (); order.StockId = item.Id; order.StockName = item.StockName; order.Unit = item.Unit; if (item.IsSkip == 0) { order.IsSkip = false; } else order.IsSkip = true; order.OrderNumber = item.OrderNumber; order.ShouldNumber = item.ShouldNumber; order.StockNumber = item.StockNumber; orderList.Add (order); } orderListAdapter = new OrderAddListAdapter (this, orderList); orderListView.Adapter = orderListAdapter; return 1; } else { return 0; } }