Ejemplo n.º 1
0
 private void LoadRecord()
 {
     //TODO LOAD DATA
     if (IsTeacher)
     {
         TeacherStep2View menu = Application.Current.Windows.OfType <TeacherStep2View>().SingleOrDefault(x => x.IsActive);
         var flyout            = menu.Flyouts.Items[0] as Flyout;
         getTeacherCollection();
         //  menu.Record.ItemsSource = Students;
         //  }
         if (flyout == null)
         {
             return;
         }
         flyout.IsOpen = !flyout.IsOpen;
     }
     else
     {
         StudentStep2View menu = Application.Current.Windows.OfType <StudentStep2View>().SingleOrDefault(x => x.IsActive);
         var flyout            = menu.Flyouts.Items[0] as Flyout;
         getStudentCollection();
         //   menu.Record.ItemsSource = Students;
         //  }
         if (flyout == null)
         {
             return;
         }
         flyout.IsOpen = !flyout.IsOpen;
     }
 }
Ejemplo n.º 2
0
        private void OpenAddStudentStep2()
        {
            DialogService    ms      = new DialogService("OpenAddStudent", DateTime.Now);
            var              message = new NotificationMessage <DialogService>(this, ms, "MenuOption");
            StudentStep2View menu    = new StudentStep2View();

            Messenger.Default.Send(message);
            _navigationService.OpenUI(menu);
        }
Ejemplo n.º 3
0
        private void Save()
        {
            //TODO progress Bar
            DialogService dia = new DialogService();

            if (_dialogService.getText() == "OpenAddTeacher")
            {
                TeacherStep2View menu = Application.Current.Windows.OfType <TeacherStep2View>().SingleOrDefault(x => x.IsActive);
                dia.ProgressDialog(menu, "Saving");
                AddNewRecord();
                SetIsEnabledDefaults();
                if (Response == "success")
                {
                    dia.progressTerminated(menu, "Saved");
                    CanSave       = true;
                    CanSave       = true;
                    CanViewRecord = true;
                    CanViewResult = true;
                    EnableFields();
                    Reset();
                    menu.TableRefresher();
                }
                else
                {
                }
            }
            else if (_dialogService.getText() == "OpenAddStudent")
            {
                StudentStep2View menu = Application.Current.Windows.OfType <StudentStep2View>().SingleOrDefault(x => x.IsActive);
                dia.ProgressDialog(menu, "Saving");
                AddNewRecord();
                SetIsEnabledDefaults();
                if (Response == "success")
                {
                    dia.progressTerminated(menu, "Saved");
                    CanSave       = true;
                    CanSave       = true;
                    CanViewRecord = true;
                    CanViewResult = true;
                    EnableFields();
                    Schedule.Clear();
                    // Schedule = data;
                    Reset();
                    menu.TableRefresher();
                }
            }
            //End Progress Bar
        }