Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 89864

Linq and change Label text

$
0
0

Hi I'm trying to write code to change Label text after succesful barcode scanning. Code below:

    void SearchBarcodeFromDB()
    {
        using (SQLiteConnection conn = new SQLiteConnection(App.dbPath))
        {
            conn.CreateTable<Products>();
            var dbList = conn.Table<Products>().ToList();

            var row = from x in dbList
                      where x.Barcode == barcodeResult
                      select x.Product;

            resultDB_LBL.Text = row;

        }
    }

I used SingleOrDefault(), Single(), ToString() with no result
Can someone help me with this?


Viewing all articles
Browse latest Browse all 89864

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>