private void btnAdd_Click(object sender, EventArgs e) { ProductViewModel productViewModel = cbproducts.SelectedItem as ProductViewModel; carItemSale = productViewModel.ConvertToCarItem(); carItemSale.Quantity = int.Parse(txtQuantity.Text); carItemSale.Fkuser = SessionUser.Instance.Currentuser.Id; shoppingSale.AddSale(carItemSale, int.Parse(productViewModel.Stock)); RefreshData(); }