Exemplo n.º 1
0
        private void load_spiner_tests()
        {
            string dpPath = Path.Combine(System.Environment.GetFolderPath(System.Environment.SpecialFolder.Personal), "Blood_Tests.sqlite");
            var    db     = new SQLiteConnection(dpPath);
            var    data_s = db.Query <Tbl_Tests>("select *  from Tbl_Tests");

            List_Tests = data_s;
            Blood_Test_New.Resources.Adapter_Tests da = new Resources.Adapter_Tests(this, List_Tests);
            spinner_tests.Adapter = da;
        }
Exemplo n.º 2
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            Xamarin.Essentials.Platform.Init(this, savedInstanceState);
            SetContentView(Resource.Layout.activity_main);
            btn_create = FindViewById <Button>(Resource.Id.btn_new_test);

            Lv_tests = FindViewById <ListView>(Resource.Id.lv_tests);


            btn_create.Click += btn_create_Click;

            string dpPath = Path.Combine(System.Environment.GetFolderPath(System.Environment.SpecialFolder.Personal), "Blood_Tests.sqlite");
            var    db     = new SQLiteConnection(dpPath);

            db.CreateTable <Tbl_Tests>();
            var data_s = db.Query <Tbl_Tests>("select *  from Tbl_Tests");

            List_Tests = data_s;
            Blood_Test_New.Resources.Adapter_Tests da = new Resources.Adapter_Tests(this, List_Tests);
            Lv_tests.Adapter = da;
        }