Exemple #1
0
        // SUBJECTS - START
        public void getAllSubjects()
        {
            this.dbConnection.Open();
            // Clear the air
            this.subjectsList.Items.Clear();

            try
            {
                SubjectsProvider.GetSubjectsListView()
                .ForEach(
                    subject => this.subjectsList.Items.Add(subject)
                    );

                this.subjectsList.FullRowSelect = true;
                this.subjectsList.View          = View.Details;
            }
            catch (SQLiteException exception)
            {
                SimpleMessage result = new SimpleMessage(exception.ToString(), "Blad odczytu listy przedmiotow");
            }
            finally
            {
                this.dbConnection.Close();
            }
        }
Exemple #2
0
 public StartLesson(MainWindow mainWindow)
 {
     InitializeComponent();
     this.classesList.DataSource = StudentClassProvider.GetClasess();
     this.subjectsList.Items.Clear();
     this.subjectsList.DataSource = SubjectsProvider.GetSubjectsNameList();
 }