Ejemplo n.º 1
0
        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();
        }