Ejemplo n.º 1
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            // Create your application here
            SetContentView(Resource.Layout.activity_order_status);

            ISharedPreferences pref     = Application.Context.GetSharedPreferences("UserInfo", FileCreationMode.Private);
            string             userName = pref.GetString("Usermail", String.Empty);

            try
            {
                var query  = db.selectallUser();
                var query1 = query.Where(x => x.Email == userName).FirstOrDefault();
                int usrID  = query1.Uid;
                mOrderObject = new OrderObject(usrID);
            }

            catch (Exception ex)
            {
                Toast.MakeText(Application.Context, ex.ToString(), ToastLength.Short).Show();
            }


            mRecycleView = FindViewById <RecyclerView>(Resource.Id.listOrders);
            mRecycleView.HasFixedSize = true;
            mLayoutManager            = new LinearLayoutManager(this);
            mRecycleView.SetLayoutManager(mLayoutManager);
            mAdapter            = new OrderObjectAdapter(mOrderObject);
            mAdapter.ItemClick += MAdapter_ItemClick;
            mRecycleView.SetAdapter(mAdapter);
        }
Ejemplo n.º 2
0
 public OrderObjectAdapter(OrderObject odr)
 {
     mOrderObject = odr;
 }