Пример #1
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            SetContentView(Resource.Layout.ReportDetails);

            database = new ItemRepositoryNotAsync();

            var itemId = Intent.GetIntExtra("ItemId", 0);

            if (itemId == 0)
            {
                // TODO: handle error
            }
            item = database.GetItem(itemId);

            if (item == null)
            {
                // TODO: Handle error
            }

            LoadViewItems();
            LoadValues();

            btnEdit.Click += BtnEdit_Click;
        }
Пример #2
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            SetContentView(Resource.Layout.Day);

            database = new ItemRepositoryNotAsync();

            LoadViews();

            btnPickDate.Click += BtnPickDate_Click;
        }
Пример #3
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            SetContentView(Resource.Layout.ListReports);

            database = new ItemRepositoryNotAsync();

            items = new List <Item>();
            GetItems();

            itemListView            = FindViewById <ListView>(Resource.Id.itemListView);
            adapter                 = new ListReportsAdapter(this, items);
            itemListView.Adapter    = adapter;
            itemListView.ItemClick += ItemListView_Click;
        }