public IList <OrderResponse> FilterOrder( [FromBody] OrderRequest request) { log.Info(string.Format(LogMessages.RequestMethod, RequestContext.Principal.Identity.Name, $"orders\\filter")); request = _repo.EditRequest(request, RequestContext.Principal.Identity.Name); return(OrderListAdapter.ConvertOrderList(_repo.GetOrders(request))); }
//Loading data public void InitData() { progress = new ProgressDialog(this, Resource.Style.StyledDialog); progress.Indeterminate = true; progress.SetMessage("Please wait..."); progress.SetCancelable(true); progress.Show(); orderListAdapter = new OrderListAdapter(this, OrderController.GetOrderList(StartDate)); orderListView.Adapter = orderListAdapter; this.mNotes.Text = OrderController.GetOrderNotes(StartDate); RegisterForContextMenu(orderListView); if (StartDate != Utility.GetTodayDate()) { this.buttonOrder.Visibility = ViewStates.Invisible; this.buttonSend.Visibility = ViewStates.Invisible; this.buttonAmend.Visibility = ViewStates.Invisible; } else { this.buttonOrder.Visibility = ViewStates.Visible; this.buttonSend.Visibility = ViewStates.Visible; if (!Settings.CKStaff) { this.buttonAmend.Visibility = ViewStates.Visible; } } progress.Dismiss(); }
private void InitData() { if (orders == null) { return; } OrderListAdapter adapter = new OrderListAdapter(orders); orderList.SetAdapter(adapter); }
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 override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { // Use this to return your custom view for this Fragment View v = inflater.Inflate(Resource.Layout.fragment_my_orders, container, false); ISharedPreferences pref = Application.Context.GetSharedPreferences("UserInfo", FileCreationMode.Private); userName = pref.GetString("Username", String.Empty); controller = new Controller(); mRecycleView = v.FindViewById <RecyclerView>(Resource.Id.ordersListRecyclerView); mLayoutManager = new LinearLayoutManager(Activity); mRecycleView.SetLayoutManager(mLayoutManager); ordersList = new OrdersList(userName); mAdapter = new OrderListAdapter(ordersList); mAdapter.ItemClick += MAdapter_ItemClick; mRecycleView.SetAdapter(mAdapter); return(v); }
//Loading data public void InitData(){ progress = new ProgressDialog (this,Resource.Style.StyledDialog); progress.Indeterminate = true; progress.SetMessage("Please wait..."); progress.SetCancelable (true); progress.Show (); orderListAdapter = new OrderListAdapter (this, OrderController.GetOrderList(StartDate)); orderListView.Adapter = orderListAdapter; this.mNotes.Text = OrderController.GetOrderNotes (StartDate); RegisterForContextMenu(orderListView); if (StartDate != Utility.GetTodayDate ()) { this.buttonOrder.Visibility = ViewStates.Invisible; this.buttonSend.Visibility = ViewStates.Invisible; this.buttonAmend.Visibility = ViewStates.Invisible; } else { this.buttonOrder.Visibility = ViewStates.Visible; this.buttonSend.Visibility = ViewStates.Visible; if(!Settings.CKStaff) this.buttonAmend.Visibility = ViewStates.Visible; } progress.Dismiss (); }
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 (); } }