Пример #1
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            SetContentView(Resource.Layout.Relatorio);
            var mConn  = new SQLiteConnection(Connect.getPath());
            var select = mConn.Query <Classes.Relatorio>("select * from vwRelatorio");

            codigo = new string[select.Count];
            var imagemMain = FindViewById <ImageView>(Resource.Id.imageView1);

            imagemMain.Click += ImagemMain_Click;
            for (int i = 0; i < select.Count; i++)
            {
                codigo[i] = select[i].mesano;
                ListItemValue l = new ListItemValue(select[i].data);
                relatorio.Add(l);
            }
            var sortedContacts = relatorio.GetSortedYear();
            var adapter        = CreateAdapter(sortedContacts);

            ListAdapter = adapter;
        }