Esempio n. 1
0
        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]);
        }
Esempio n. 2
0
        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]);
        }
Esempio n. 3
0
        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();
            }
        }
Esempio n. 4
0
        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++;
                }
            }
        }
Esempio n. 5
0
 public void Test()
 {
     LibrusFactory.InsertTestData();
 }
Esempio n. 6
0
 public SelectionPage()
 {
     InitializeComponent();
     this.manager     = LibrusFactory.CreateLibrusManager();
     this.DataContext = new SelectionPageViewModel(LibrusFactory.CreateLibrusManager());
 }
Esempio n. 7
0
 public AddNewSubjectPage()
 {
     InitializeComponent();
     manager = LibrusFactory.CreateLibrusManager();
 }
Esempio n. 8
0
 // 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();
 }