void ShowtheTables() { ///Select all from Teacher ISingleResult <Teacher_SelectResult> selectResults1 = universityData.Teacher_Select(); dataGridView1.DataSource = selectResults1; ///Select all from Teacher where Department = EEE //ISingleResult<Teacher_SpScResult> selectResults2 = universityData.Teacher_SpSc(null); ISingleResult <Teacher_SpScResult> selectResults2 = universityData.Teacher_SpSc("EEE"); dataGridView2.DataSource = selectResults2; }
private void LinqToSQL_3_Load(object sender, EventArgs e) { universityData = new UniversityDataDataContext(); ///Select all from Teacher ISingleResult <Teacher_SelectResult> selectResults1 = universityData.Teacher_Select(); dataGridView1.DataSource = selectResults1; ///Select all from Teacher where Department = EEE //ISingleResult<Teacher_SpScResult> selectResults2 = universityData.Teacher_SpSc(null); ISingleResult <Teacher_SpScResult> selectResults2 = universityData.Teacher_SpSc("EEE"); dataGridView2.DataSource = selectResults2; }