async void OnAdd(object sender, System.EventArgs e) { var product = new Product_Retailer { ProductName = "Product" }; await conn.InsertAsync(product); _products.Add(product); }
async void AddProductClicked(object sender, System.EventArgs e) { await conn.CreateTableAsync <Product_Retailer>(); var product = new Product_Retailer { ProductID = Convert.ToInt32(ProductID.Text), ProductName = ProductName.Text, Price = float.Parse(Price.Text), Brand = Brand.Text, Category = Category.Text, ImageUrl = ImageUrl.Text, BigImageUrl = BigImageUrl.Text, RetailerID = Convert.ToInt32(RetailerID.Text), Retailer_Name = Retailer_Name.Text }; await conn.InsertAsync(product); await DisplayAlert("Successfully added to Product_Retailer", product.ProductName, "OK"); }
public ProductDetailPage(Product_Retailer product) { BindingContext = product; InitializeComponent(); }