Exemplo n.º 1
0
 // Creates new building and adds it to the building repository
 // Sets and return selected building to use in the MainViewModel
 public Building AddBuilding(string name)
 {
     SelectedBuilding = new Building(name);
     _buildingRepository.AddBuilding(SelectedBuilding);
     SelectedCustomer.AddBuilding(SelectedBuilding);
     return(SelectedBuilding);
 }
Exemplo n.º 2
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);
        }