예제 #1
0
        public MainWindow()
        {
            InitializeComponent();

            //import system.configuration from references
            string connectionstring = ConfigurationManager.ConnectionStrings["LinqToSQL.Properties.Settings.ZooConnectionString"].ConnectionString;

            dataContext = new LinqToSqlDataClassesDataContext(connectionstring);

            //InsertUniversities();

            //InsertStudents();

            //insertLectures();

            //InsertStudentLectureAssociations();

            //GetUniversityOfTOni();

            //GetLectureOfTooni();

            //GetAllStudentsFromYale();

            //GetAllUniversitiesWithTransgenders();

            //GetAllLecturesFromNeijingTech();

            //UpdateToni();

            DeleteJame();
        }
예제 #2
0
        public MainWindow()
        {
            InitializeComponent();

            string connectionString = ConfigurationManager.ConnectionStrings["LinqToSQL.Properties.Settings.CSharpTutorialConnectionString"].ConnectionString;

            dataContext = new LinqToSqlDataClassesDataContext(connectionString);

            //InsertStudents();
            //InsertStudentLectureAssociations();
            //GetStudentsWithMath();
            //UpdateJohn();
            DeleteMark();
        }
예제 #3
0
        public void DeleteJame()
        {
            Student Jame = dataContext.Students.FirstOrDefault(st => st.Name == "Jame");

            dataContext.Students.DeleteOnSubmit(Jame);
            dataContext.SubmitChanges();

            //MainDataGrid.ItemsSource = dataContext.Students;
            // bellow is in case you run into an error
            string connectionString = ConfigurationManager.ConnectionStrings["LinqToSQL.Properties.Settings.FabioCsharpDBConnectionString"].ConnectionString;

            LinqToSqlDataClassesDataContext db = new LinqToSqlDataClassesDataContext(connectionString);

            MainDataGrid.ItemsSource = db.Students;
        }
        public MainWindow()
        {
            InitializeComponent();

            string connectionString = ConfigurationManager.ConnectionStrings["LinqToSQL.Properties.Settings.CSMasterClassDBConnectionString"].ConnectionString;

            dataContext = new LinqToSqlDataClassesDataContext(connectionString);

            //InsertStudentLectureAssociations();
            //GetUniversityOfTonie();
            //GetLecturesFromTonie();
            //GetAllStudentsFromYale();
            //GetAllUniversitiesWithFemales();
            //GetAllLecturesFromMIT();
            //UpdateTonie();
            //DeleteJames();
        }
예제 #5
0
        public MainWindow()
        {
            InitializeComponent();
            string connectionString = ConfigurationManager.ConnectionStrings["LinqToSQL.Properties.Settings.PeemasitDBConnectionString"].ConnectionString;

            dataContext = new LinqToSqlDataClassesDataContext(connectionString);
            //InsertUniversities();
            //InsertStudent();
            //InsertLecture();
            //InsertStudentLectureAssociations();
            //GetUniversityOfJohn();
            //GetLectureFromJohn();
            //GetAllStudentFromYale();
            //GetAllUniversitiesWithTransgenders();
            //GetAllLectureFromCambridge();
            //UpdateJohn();
            //DeleteJame();
        }
        public MainWindow()
        {
            InitializeComponent();

            string connectionString = ConfigurationManager.ConnectionStrings["LinqToSQL.Properties.Settings.PanjutorialsDB1ConnectionString"].ConnectionString;

            dataContext = new LinqToSqlDataClassesDataContext(connectionString);

            //InsertUniversities();
            //InsertStudent();
            //InsertLectures();
            //InsertStudentLectureAssociations();
            //GetUniversityOfToni();
            //GetLecturesFromToni();
            //GetAllStudentsFromYale();
            //GetAllUniversitiesWithTransgenders();
            //GetAllLecturesFromBeijingTech();
            // UpdateToni();
            DeleteJame();
        }