Beispiel #1
0
 public Order(DateTime orderDate, Material product, StateTax stateTax, int orderNumber, string customerName, decimal area, decimal materialCost, decimal laborCost, decimal taxCost, decimal total)
 {
     OrderDate    = orderDate;
     Product      = product;
     StateTax     = stateTax;
     OrderNumber  = orderNumber;
     CustomerName = customerName;
     Area         = area;
     MaterialCost = materialCost;
     LaborCost    = laborCost;
     TaxCost      = taxCost;
     Total        = total;
 }
Beispiel #2
0
        public Order(DateTime date, Material product, StateTax tax, string name, decimal area)
        {
            OrderDate    = date;
            Product      = product;
            StateTax     = tax;
            CustomerName = name;
            Area         = area;

            MaterialCost = Math.Round((area * product.CostPerSquareFoot), 2);
            LaborCost    = Math.Round((area * product.LaborCostPerSquareFoot), 2);
            TaxCost      = Math.Round(((MaterialCost + LaborCost) * (tax.TaxRate / 100)), 2);
            Total        = Math.Round((MaterialCost + LaborCost + TaxCost), 2);
        }
Beispiel #3
0
        public Order(Order oldOrder, string name, StateTax tax, Material product, decimal area)
        {
            OrderDate    = oldOrder.OrderDate;
            OrderNumber  = oldOrder.OrderNumber;
            CustomerName = name;
            StateTax     = tax;
            Product      = product;
            Area         = area;

            MaterialCost = Math.Round((area * product.CostPerSquareFoot), 2);
            LaborCost    = Math.Round((area * product.LaborCostPerSquareFoot), 2);
            TaxCost      = Math.Round(((MaterialCost + LaborCost) * (tax.TaxRate / 100)), 2);
            Total        = Math.Round((MaterialCost + LaborCost + TaxCost), 2);
        }