Beispiel #1
0
        private Order GetUserOrderData()
        {
            Order newOrder = new Order();
            Calculator calculator = new Calculator();

            GetOrderName(newOrder);

            GetOrderArea(newOrder);

            GetStateAndTax(newOrder);

            GetProductAndCostAndLaborPerSqFt(newOrder);

            calculator.CalcuateValues(newOrder);

            DisplayOrderSummary(newOrder);

            return newOrder;
        }
        private void UpdateCosts(Order choice)
        {
            
            var prodList = _productManager.GetAllProducts();
            var prod = prodList.Find(y => y.ProductType == choice.ProductType);
            var c = new Calculator();
            c.CalculateValues(choice, prod);

        }
        private void UpdateProductInfo(Order selectedOrder)
        {
            var p = new ProductRespository();
            var prodList = p.LoadProductsFromFile();
            var prod = prodList.Find(y => y.ProductType.ToUpper() == selectedOrder.ProductType.ToUpper());
            selectedOrder.ProductType = prod.ProductType;

            selectedOrder.CostPerSquareFoot = prod.CostPerSqauareFoot;
            selectedOrder.LaborCostPerSquareFoot = prod.LaborCostPerSquareFoot;

            var c = new Calculator();
            c.CalcuateValues(selectedOrder);
        }
        private void UpDateProductInfo(Order choice)
        {


         

            var prodList = _productManager.GetAllProducts();
            var prod = prodList.Find(y => y.ProductType == choice.ProductType);

            choice.CostPerSquareFoot = prod.CostPerSquareFoot;
            choice.LaborCostPerSquareFoot = prod.LaborCostPerSquareFoot;

            var c = new Calculator();
            c.CalculateValues(choice, prod);
        }
 private void UpdateCosts(Order selectedOrder)
 {
     var c = new Calculator();
     c.CalcuateValues(selectedOrder);
 }