コード例 #1
0
        public AppViewModel()
        {
            NextSubjectViewModel = new NextSubjectViewModel
            {
                AddSubjectCommand = new Command(AddSubject, true)
            };
            SaveToCsvCommand = new Command(SaveSubjects, true);

            ExportPath = Directory.GetCurrentDirectory() + @"\export.csv";
            SortOrders = new List <string>()
            {
                "Имя, фамилия, отчество, д. р."
            };
            SelectedOrder = SortOrders[0];
        }
コード例 #2
0
 private void AddSubject(object parameter)
 {
     _model.Subjects.Add(new Subject(NextSubjectViewModel.Name, NextSubjectViewModel.Surname,
                                     NextSubjectViewModel.Patronymic, NextSubjectViewModel.PassportNumber, NextSubjectViewModel.Birthday));
     NextSubjectViewModel.ClearInputs();
 }