public void Ref() { DBUtils.StudentDataSource(); DBUtils.TeacherDataSource(); lbStudents.DataSource = Students.Items.ToList(); lbTeachers.DataSource = Teachers.Items.ToList(); }
private void MainForm_Load(object sender, EventArgs e) { if (!File.Exists(DBUtils.DB[0])) { DBUtils.CreateNewDatabase(DBUtils.DB[0]); } label1.Text = string.Format("Вы вошли как: {0}", TeacherName); //TODO: Run once : DBUtils.CreateTable(DBUtils.QuerryStudent,DBUtils.StudentSqLiteConnection); DBUtils.StudentDataSource(); Ref(); }
private void AdminPanel_Load(object sender, EventArgs e) { if (!File.Exists(DBUtils.DB[0])) { DBUtils.CreateNewDatabase(DBUtils.DB[0]); } //TODO: Run once : DBUtils.CreateTable(DBUtils.QuerryStudent, DBUtils.StudentSqLiteConnection); //TODO: Run once : DBUtils.CreateTable(DBUtils.QuerryTeachers, DBUtils.Teacherconn); DBUtils.StudentDataSource(); DBUtils.TeacherDataSource(); Ref(); }