Inheritance: INotifyPropertyChanged
Ejemplo n.º 1
0
        public void removeTerminal(AirportTerminalMVVM terminal)
        {
            Airport.RemoveTerminal(terminal.Terminal);

            Terminals.Remove(terminal);

            var contracts = new List<ContractMVVM>(Contracts);

            foreach (ContractMVVM contract in contracts)
            {
                if (!Airport.AirlineContracts.Exists(c=>contract.Contract == c))
                    Contracts.Remove(contract);
            }
        }
Ejemplo n.º 2
0
        //removes a terminal from the airport
        public void removeTerminal(AirportTerminalMVVM terminal)
        {
            this.Airport.removeTerminal(terminal.Terminal);

            this.Terminals.Remove(terminal);
        }
Ejemplo n.º 3
0
        public void purchaseTerminal(AirportTerminalMVVM terminal, Airline airline)
        {
            terminal.purchaseTerminal(airline);

            foreach (AirportContract contract in Airport.AirlineContracts)
            {
                if (Contracts.FirstOrDefault(c=>c.Contract == contract) == null)
                    Contracts.Add(new ContractMVVM(contract));

            }
        }