private void setDataSourceToGrid() { //here um setting the data source for this data grid dgvSemDetails.DataSource = null; systemManager objsystemManager = new systemManager(); dgvSemDetails.DataSource = objsystemManager.GetSemestersData(); }
public void setSemToCmb() { systemManager objsystemManager1 = new systemManager(); cmbSemesterSelect.DataSource = objsystemManager1.GetSemestersData(); cmbSemesterSelect.DisplayMember = "SemesterCode"; cmbSemesterSelect.ValueMember = "SemesterID"; cmbSemesterSelect.SelectedIndex = -1; }
//method which loads the semesters and name into the combobox. public void setcmbSemester() { systemManager objsystemManager = new systemManager(); cmbSemester.DataSource = objsystemManager.GetSemestersData(); cmbSemester.ValueMember = "SemesterID"; cmbSemester.DisplayMember = "SemesterCode"; //because of this department combo's display inedex will shown as a blank index cmbSemester.SelectedIndex = -1; }