예제 #1
0
        public MainWindow()
        {
            InitializeComponent();
            string connectionstring = ConfigurationManager.ConnectionStrings["studentDB.Properties.Settings.StudentDBConnectionString"].ConnectionString;
            StudentDataClasses1DataContext dataContext = new StudentDataClasses1DataContext(connectionstring);

            students = new StudentClass(dataContext);

            SelectUniversityList.ItemsSource = students.AllUniversity();
            ShowAllStudentsList.ItemsSource  = students.displayAllStudents();
            SelectClassList.ItemsSource      = students.AllClass();
        }
예제 #2
0
        /// <summary>
        /// Default constructor
        /// </summary>
        /// <param name="datcon"></param>

        public StudentClass(StudentDataClasses1DataContext datcon) => this.dataContext = datcon;