private void LoadMe(object sender, EventArgs e) { //FeeServiceClient feeService = new FeeServiceClient(); //gradeLevels = new List<GradeLevel>(feeService.GetAllGradeLevels()); //schoolYears = new List<SchoolYear>(feeService.GetLastFiveSY()); //cmbGradeLevel.DataSource = gradeLevels; //cmbGradeLevel.ValueMember = "GradeLev"; //cmbGradeLevel.DisplayMember = "Description"; //cmbSY.DataSource = schoolYears; //cmbSY.ValueMember = "SY"; //cmbSY.DisplayMember = "SY"; GradeSectionServiceClient gService = new GradeSectionServiceClient(); teachers = new List<Teacher>(gService.GetAllTeachers()); cmbTeacher.DataSource = teachers; cmbTeacher.ValueMember = "TeacherID"; cmbTeacher.DisplayMember = "TeacherName"; }
private void SetComboBoxes() { GradeSectionServiceClient gService = new GradeSectionServiceClient(); gLevels= new List<GradeLevel>(gService.GetAllGradeLevels()); teachers = new List<Teacher>(gService.GetAllTeachers()); sys = new List<SchoolYear>(gService.GetAllSchoolYears()); rooms = new List<Room>(gService.GetAllRooms()); List<int> classNum = new List<int>() { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 }; cmbClass.DataSource = classNum; cmbGradeLevel.DataSource = gLevels; cmbGradeLevel.ValueMember = "GradeLev"; cmbGradeLevel.DisplayMember = "Description"; cmbRoom.DataSource = rooms; cmbRoom.ValueMember = "RoomId"; cmbRoom.DisplayMember = "RoomCode"; cmbSchoolYear.DataSource = sys; cmbSchoolYear.ValueMember = "SY"; cmbSchoolYear.DisplayMember = "SY"; cmbTeacher.DataSource = teachers; cmbTeacher.ValueMember = "TeacherID"; cmbTeacher.DisplayMember = "TeacherName"; }