public void InitOrder(ProductElementModel currentProduct) { Debug.Log(currentProduct.productName); if (CheckForProductInOrder(currentProduct) == null) { currentOrder.listOfProductInOrder.Add(currentProduct); } CalculatePrice(); }
public ProductElementModel CheckForProductInOrder(ProductElementModel _currentProduct) { foreach (var product in currentOrder.listOfProductInOrder) { if (product.productName == _currentProduct.productName) { return(product); } } return(null); }
public void SetProductData(ProductElementModel _product) { currentProduct = _product; SetUi(); }