protected override void OnNavigatedTo(NavigationEventArgs e) { base.OnNavigatedTo(e); string value = NavigationContext.QueryString["summary"]; string[] tab = value.Split(new char[] { '/' }); this.DataContext = new StudentsListPageViewModel(LibrusFactory.CreateLibrusManager(), tab[0], tab[1]); }
protected override void OnNavigatedTo(NavigationEventArgs e) { base.OnNavigatedTo(e); string value = NavigationContext.QueryString["ID"]; string[] tab = value.Split(new char[] { '/' }); int id = Convert.ToInt32(tab[0]); this.DataContext = new InformationAboutPresencesViewModel(LibrusFactory.CreateLibrusManager(), id, tab[1]); }
private void ZapiszButtonClick(object sender, RoutedEventArgs e) { string name = this.Name.Text; string surname = this.Surname.Text; bool gender = this.checkGender.IsChecked.Value ? true : false; if (name != "" && surname != "") { IClassRepository claassRepository = LibrusFactory.CreateClassRepository(); ClassEntity clazz = claassRepository.GetById(this.value); StudentEntity student = new StudentEntity(name, surname, clazz, gender); IStudentRepository studentRepository = LibrusFactory.CreateStudentRepository(); studentRepository.AddNew(student); NavigationService.GoBack(); } }
protected override void OnNavigatedTo(NavigationEventArgs e) { base.OnNavigatedTo(e); string value = string.Empty; if (NavigationContext.QueryString.TryGetValue("msg", out value)) { string[] tab = value.Split(new char[] { '/' }); this.DataContext = new PresencePageViewModel(LibrusFactory.CreateLibrusManager(), tab[0], tab[1], tab[2]); } if (this.State.ContainsKey("presences")) { string[] tab = ((string)this.State["presences"]).Split(new char[] { '/' }); int i = 0; foreach (var p in this.ViewModel.Presences) { p.Present = Convert.ToBoolean(tab[i]); i++; } } }
public void Test() { LibrusFactory.InsertTestData(); }
public SelectionPage() { InitializeComponent(); this.manager = LibrusFactory.CreateLibrusManager(); this.DataContext = new SelectionPageViewModel(LibrusFactory.CreateLibrusManager()); }
public AddNewSubjectPage() { InitializeComponent(); manager = LibrusFactory.CreateLibrusManager(); }
// Code to execute when the application is launching (eg, from Start) // This code will not execute when the application is reactivated private void Application_Launching(object sender, LaunchingEventArgs e) { LibrusFactory.InsertTestData(); }