Exemple #1
0
        private async void BtnSave_Clicked(object sender, EventArgs e)
        {
            Data.ProductManager PM = new Data.ProductManager();

            await PM.Add(
                new Data.Product
            {
                ID           = int.Parse(entryID.Text),
                Name         = entryName.Text,
                UnitsInStock = int.Parse(entryUnits.Text),
                Price        = decimal.Parse(entryPrice.Text)
            });
        }
        private async void BtnGetProducts_Clicked(object sender, EventArgs e)
        {
            Data.ProductManager PM = new Data.ProductManager();

            listView.ItemsSource = await PM.GetAllProducts();
        }