Exemple #1
0
        // Creates new ventilationaggregate and adds it to the ventilationaggregate repository
        // Sets and return selected ventilationaggregate to use in the MainViewModel
        public VentilationAggregate AddVentilationAggregate()
        {
            var agg = new VentilationAggregate();

            SelectedVentilationAggregate = agg;
            _ventilationAggregateRepository.AddVentilationAggregate(agg);
            // SelectedBuilding.AddVentilationAggregate(agg);
            return(SelectedVentilationAggregate);
        }
Exemple #2
0
        public bool AddVentilationAggregate(VentilationAggregate ag)
        {
            //foreach (VentilationAggregate aggregate in ventilationAggregates)
            //{
            //    if (aggregate.OrderNumber == ag.OrderNumber)
            //    {
            //        return false;
            //    }
            //}
            _ventilationAggregates.Add(ag);
            return(true);
            //string fileName = customer.Company + "_" + building + "_" + orderNumber + ".pdf";

            //aggregates.Add(new VentilationAggregate(modelNumber, orderNumber));
        }
Exemple #3
0
        public VentilationAggregate AddVentilationAggregate(string orderNumber, string fileName)
        {
            //foreach (VentilationAggregate aggregate in _ventilationAggregates)
            //{
            //    if (aggregate.OrderNumber == orderNumber)
            //    {
            //        return false;
            //    }
            //}
            VentilationAggregate thisAggreate = new VentilationAggregate(orderNumber, fileName);

            _ventilationAggregates.Add(thisAggreate);
            return(thisAggreate);
            //string fileName = customer.Company + "_" + building + "_" + orderNumber + ".pdf";

            //aggregates.Add(new VentilationAggregate(modelNumber, orderNumber));
        }
Exemple #4
0
        public void AddTest(string customer, string building, string aggregate)
        {
            var c = new Customer(name: customer);

            SelectedCustomer = c;
            _customerRepository.AddCustomer(c);
            var b = new Building(name: building);

            SelectedBuilding = b;
            SelectedCustomer.AddBuilding(b);
            _buildingRepository.AddBuilding(b);
            var ag1 = new VentilationAggregate(orderNumber: aggregate);

            //var ag2 = new VentilationAggregate("666");
            SelectedBuilding.AddVentilationAggregate(ag1);
            //selectedBuilding.AddVentilationAggregate(ag2);
            _ventilationAggregateRepository.AddVentilationAggregate(ag1);
            //ventilationAggregateRepository.AddVentilationAggregate(ag2);
        }
Exemple #5
0
 // Add a ventilation aggregate to the building
 public void AddVentilationAggregate(VentilationAggregate ventilationAggregate)
 {
     _ventilationAggregates.Add(ventilationAggregate);
 }