Exemplo n.º 1
0
        //--------------------------------------------------------------------

        /*
         * Constructeur
         */
        public BedroomViewModel()
        {
            bedroomRepository = new BedroomRepository();
            Bedrooms          = bedroomRepository.GetBedrooms();
            Floors            = bedroomRepository.GetEtages();
            Floors.Add(0);
            Statuts = bedroomRepository.GetStatuts();
            Statuts.Add("");
            BedroomType = bedroomRepository.GetBedroomType();
            BedroomType.Add(new bedroom_type());
        }
Exemplo n.º 2
0
        static void Main(string[] args)
        {
            // Dependencies
            BedroomRepository bedroomRepository = new BedroomRepository( );
            BedroomBusiness   bedroomBusiness   = new BedroomBusiness(bedroomRepository);

            ClientRepository clientRepository = new ClientRepository( );
            ClientBusiness   clientBusiness   = new ClientBusiness(clientRepository);

            Menu menu = new Menu(new BedroomService(bedroomBusiness), new ClientService(clientBusiness));

            menu.Run( );
        }
Exemplo n.º 3
0
 /*
  * Constructeur
  */
 public ShowBedroomViewModel(int bedroom_number)
 {
     // TODO Gestion d'erreur si la chambre est n'existe pas
     this.bedroomRepository = new BedroomRepository();
     this._bedroom          = bedroomRepository.GetBedroom(bedroom_number);
 }