Ejemplo n.º 1
0
 public ReceptionVM(LogInVM parent)
 {
     using (var db = new HotelDbContext())
     {
         RezervacijeLista = new ObservableCollection <Rezervacija>(db.Rezervacije.OrderBy(c => c.Cijena).ToList());
         Cekirane         = new ObservableCollection <Rezervacija>();
         Odcekirane       = new ObservableCollection <Rezervacija>();
         List <Rezervacija> pomocna = db.Rezervacije.ToList();
         for (int i = 0; i < pomocna.Count(); i++)
         {
             if (pomocna[i].IsCheckedIn)
             {
                 Cekirane.Add(pomocna[i]);
             }
             else
             {
                 Odcekirane.Add(pomocna[i]);
             }
         }
     }
     Parent            = parent;
     NavigationService = new NavigationService();
     PrikaziCekirane   = new RelayCommand <object>(cekirane, parametar => true);
     PrikaziOdcekirane = new RelayCommand <object>(odcekirane, parametar => true);
     LogOut            = new RelayCommand <object>(izadji, parametar => true);
     Profil            = new RelayCommand <object>(pogledajProfil, parametar => true);
     Cekiraj           = new RelayCommand <object>(checkin, parametar => true);
     Odcekiraj         = new RelayCommand <object>(checkout, parametar => true);
 }
Ejemplo n.º 2
0
 public RoomCleaningVM(LogInVM parent)
 {
     Parent = parent;
     using (var db = new HotelDbContext())
     {
         SobeListe = new ObservableCollection <Soba>(db.Sobe.OrderBy(c => c.Broj).ToList());
         Ciste     = new ObservableCollection <Soba>();
         Neciste   = new ObservableCollection <Soba>();
         List <Soba> pomocna = db.Sobe.ToList();
         for (int i = 0; i < pomocna.Count(); i++)
         {
             if (pomocna[i].Ociscena)
             {
                 Ciste.Add(pomocna[i]);
             }
             else
             {
                 Neciste.Add(pomocna[i]);
             }
         }
     }
     NavigationService = new NavigationService();
     PrikaziNeociscene = new RelayCommand <object>(neociscene, p => true);
     PrikaziOciscene   = new RelayCommand <object>(ociscene, p => true);
     LogOut            = new RelayCommand <object>(izadji, p => true);
     Profil            = new RelayCommand <object>(profil, p => true);
     Ocisti            = new RelayCommand <object>(clean, p => true);
 }
Ejemplo n.º 3
0
 public GuestPanelVM(LogInVM parent)
 {
     Parent            = parent;
     Naslov            = KreirajNaslov();
     NavigationService = new NavigationService();
     Rezervacije       = new RelayCommand <object>(Rez, parametar => true);
     NovaRezervacija   = new RelayCommand <object>(novarez, parametar => true);
     Mapa   = new RelayCommand <object>(mapa, parametar => true);
     Profil = new RelayCommand <object>(Prof, parametar => true);
     LogOut = new RelayCommand <object>(Izadji, parametar => true);
 }
Ejemplo n.º 4
0
 public AdminPanelVM(LogInVM parent)
 {
     Parent            = parent;
     Naslov            = KreirajNaslov();
     NavigationService = new NavigationService();
     Rezervacije       = new RelayCommand <object>(Rez, parametar => true);
     Osoblje           = new RelayCommand <object>(Osob, parametar => true);
     Sobe      = new RelayCommand <object>(Soba, parametar => true);
     Gosti     = new RelayCommand <object>(Gost, parametar => true);
     Izvjestaj = new RelayCommand <object>(Izv, parametar => true);
     Profil    = new RelayCommand <object>(Prof, parametar => true);
     LogOut    = new RelayCommand <object>(Izadji, parametar => true);
 }