/// <summary> /// Initializes the singleton application object. This is the first line of authored code /// executed, and as such is the logical equivalent of main() or WinMain(). /// </summary> public App() { Microsoft.ApplicationInsights.WindowsAppInitializer.InitializeAsync( Microsoft.ApplicationInsights.WindowsCollectors.Metadata | Microsoft.ApplicationInsights.WindowsCollectors.Session); this.InitializeComponent(); this.Suspending += OnSuspending; using (var db3 = new RezervacijaDbContext()) { db3.Database.ApplyMigrations(); DefaultPodaciRezervacija.Initialize(db3); } using (var db1 = new LiceDbContext()) { db1.Database.ApplyMigrations(); DefaultPodaci.Initialize(db1); } /* using (var db2 = new FilmDbContext()) * { * db2.Database.ApplyMigrations(); * DefaultPodaciFilm.Initialize(db2); * } */ }
/// <summary> /// Initializes the singleton application object. This is the first line of authored code /// executed, and as such is the logical equivalent of main() or WinMain(). /// </summary> public App() { this.InitializeComponent(); this.Suspending += OnSuspending; using (var db = new KolekcijaDbContext()) { db.Database.ApplyMigrations(); DefaultPodaci.Initialize(db); } using (var db = new FilmDbContext()) { db.Database.ApplyMigrations(); DefaultPodaci.Initialize(db); } using (var db = new KorisnikDbContext()) { db.Database.ApplyMigrations(); DefaultPodaci.Initialize(db); } using (var db = new OcjenaDbContext()) { db.Database.ApplyMigrations(); DefaultPodaci.Initialize(db); } }
public async void AzurirajAsync(object o) { Uposlenik novi = new Uposlenik(ime, prezime, 1, datumRodjenja, datumZaposlenja); DefaultPodaci.AzurirajUposlenika(original, novi); var dialog1 = new MessageDialog("Azuriranje uspjesno!"); await dialog1.ShowAsync(); }
private void pretraga(object obj) { Uposlenik p = DefaultPodaci.nadjiUposlenika(imePrezimeID); if (p != null) { uposlenici.Clear(); uposlenici.Add(p); } }
private void pretraga(object obj) { OnlineKupac p = DefaultPodaci.nadjiKupca(imePrezimeID); if (p != null) { kupci.Clear(); kupci.Add(p); } }
/// <summary> /// Initializes the singleton application object. This is the first line of authored code /// executed, and as such is the logical equivalent of main() or WinMain(). /// </summary> public App() { this.InitializeComponent(); this.Suspending += OnSuspending; using (var db = new ZabavniParkDbContext()) { db.Database.ApplyMigrations(); DefaultPodaci.Initialize(db); } }
/// <summary> /// Initializes the singleton application object. This is the first line of authored code /// executed, and as such is the logical equivalent of main() or WinMain(). /// </summary> public App() { this.InitializeComponent(); this.Suspending += OnSuspending; using (var db = new HotelDbContext()) { db.Database.Migrate(); DefaultPodaci.Initialize(db); } }
public AzuriranjeUposlenikaViewModel(PretragaUposlenikaViewModel v) { navigationService = new NavigationService(); azurirajBtn = new RelayCommand <object>(AzurirajAsync); ime = v.odabrani._ime; prezime = v.odabrani._prezime; datumRodjenja = v.odabrani._datumRodjenja; datumZaposlenja = v.odabrani._datumZaposlenja; username = v.odabrani.username; password = v.odabrani.password; original = DefaultPodaci.nadjiUposlenika(ime, prezime, datumRodjenja, datumZaposlenja); //dodati ID }
public async void prijavaDostavljaca(object parameter) { dostavljac = (Dostavljac)DefaultPodaci.nadjiDostavljaca(username, password); if (dostavljac == null) { var dialog1 = new MessageDialog("Neispravni podaci!"); await dialog1.ShowAsync(); } else { navigationService.Navigate(typeof(DostavaProizvoda), new DostavaProizvodaViewModel(this)); } }
public App() { Microsoft.ApplicationInsights.WindowsAppInitializer.InitializeAsync( Microsoft.ApplicationInsights.WindowsCollectors.Metadata | Microsoft.ApplicationInsights.WindowsCollectors.Session); this.InitializeComponent(); this.Suspending += OnSuspending; using (var db = new RasporedIspitaPoSalamaDbContext()) { db.Database.ApplyMigrations(); DefaultPodaci.Initialize(db); } }
public App() { this.InitializeComponent(); this.Suspending += OnSuspending; ImeLogIn = ""; Mail = ""; Password = ""; using (var db = new KorisnikDbContext()) { db.Database.ApplyMigrations(); DefaultPodaci.Initialize(db); } }