private void frmStudentDetails_Load(object sender, EventArgs e) { pvStudent.SelectedPage = pvStudent.Pages[0]; IGradeLevelService glService = new GradeLevelService(); gradeLevel = new List<GradeLevel>(glService.GetAllGradeLevels()); if (gradeLevel.Count > 0) gradeLevel[0].Description = "None"; cmbGradeLevel.DataSource = gradeLevel; cmbGradeLevel.ValueMember = "GradeLev"; cmbGradeLevel.DisplayMember = "Description"; if (Op.Equals("new")) { GenerateStudentID(); cmbGradeLevel.SelectedIndex = 0; btnEditID.Visible = false; } if (Op.Equals("edit")) { SetFields(); } }
public void LoadStudents() { IGradeLevelService glService = new GradeLevelService(); gradeLevel = new List<GradeLevel>(glService.GetAllGradeLevels()); if (gradeLevel.Count > 0) gradeLevel[0].Description = "None"; IGradeSectionService sectionService = new GradeSectionService(); sections = new List<GradeSection>(sectionService.GetAllGradeSections()); IRegistrationService registrationService = new RegistrationService(); RegisteredStudents= new List<string>(registrationService.GetEnrolledStudents(GlobalClass.currentsy)); IStudentService studentService = new StudentService(); string message = String.Empty; try { var students = studentService.GetAllStudents(); studentList = new List<Student>(students); gvStudent.DataSource = students; gvStudent.Refresh(); if (gvStudent.RowCount != 0) gvStudent.Rows[0].IsSelected = true; } catch (Exception ex) { message = "Error Loading Student List"; MessageBox.Show(ex.ToString()); } }
public Boolean UpdateStudentCharacters(Trait tbdo) { SchoolYear sy = new SchoolYear(); sy = GetCurrentSY(); IGradeLevelService gradeLevelService = new GradeLevelService(); List <GradeLevel> gradeLevelList = new List <GradeLevel>(gradeLevelService.GetAllGradeLevels()); List <GradeLevel> gradeLevelCategory = new List <GradeLevel>(); gradeLevelCategory = gradeLevelList.FindAll(x => x.Category == tbdo.Category); Boolean ret = false; List <string> studentIDs = new List <string>(); foreach (GradeLevel gl in gradeLevelCategory) { studentIDs.AddRange(GetEnrolledStudentsforNewTraits(gl.GradeLev, sy.SY)); } foreach (string studentID in studentIDs) { StudentEnrollment se = new StudentEnrollment(); se = GetEnrolledStudent(studentID, sy.SY); StudentTrait st = new StudentTrait { StudentSY = se.StudentSY, TraitsID = tbdo.TraitsID, StudentEnrTraitCode = se.StudentSY + tbdo.TraitsID, GradeSectionCode = (int)se.GradeSectionCode, LockFirst = false, LockSecond = false, LockFourth = false, LockThird = false }; string message = string.Empty; StudentTraitBDO stb = new StudentTraitBDO(); NewTraitsTranslateStuTraitsToStuTraitsBDO(st, stb); ret = stl.AddStudentCharacters(stb, ref message); } return(ret); }
public List <GradeLevel> GetAllGradeLevels() { GradeLevelService gs = new GradeLevelService(); return(gs.GetAllGradeLevels()); }
public List<GradeLevel> GetAllGradeLevels() { GradeLevelService gs = new GradeLevelService(); return gs.GetAllGradeLevels(); }
private void frmManageSubject_Load(object sender, EventArgs e) { ILearningAreaService laService = new LearningAreaService(); IGradeLevelService glService = new GradeLevelService(); gradeLevel = new List<GradeLevel>(glService.GetAllGradeLevels()); colGradeLevel = new GridViewComboBoxColumn("GradeLevel"); colGradeLevel.HeaderText = "Grade Level"; colGradeLevel.FieldName = "GradeLevel"; colGradeLevel.ValueMember = "GradeLev"; colGradeLevel.DisplayMember = "Description"; colGradeLevel.Width = 110; colGradeLevel.DataSource = gradeLevel; gvSubjects.Columns.Add(colGradeLevel); if (Op.Equals("edit")) { SetFields(); SetSubjectGrid(); this.Size = new Size(812, 571); } if (Op.Equals("new")) { BindSubjectGrid(); gvSubjects.Enabled = false; btnSave.Enabled = false; this.Size = new Size(812, 209); } }
public Boolean UpdateStudentCharacters(Trait tbdo) { SchoolYear sy = new SchoolYear(); sy = GetCurrentSY(); IGradeLevelService gradeLevelService = new GradeLevelService(); List<GradeLevel> gradeLevelList = new List<GradeLevel>(gradeLevelService.GetAllGradeLevels()); List<GradeLevel> gradeLevelCategory = new List<GradeLevel>(); gradeLevelCategory = gradeLevelList.FindAll(x => x.Category == tbdo.Category); Boolean ret = false; List<string> studentIDs = new List<string>(); foreach (GradeLevel gl in gradeLevelCategory) { studentIDs.AddRange(GetEnrolledStudentsforNewTraits(gl.GradeLev, sy.SY)); } foreach (string studentID in studentIDs) { StudentEnrollment se = new StudentEnrollment(); se = GetEnrolledStudent(studentID, sy.SY); StudentTrait st = new StudentTrait { StudentSY = se.StudentSY, TraitsID = tbdo.TraitsID, StudentEnrTraitCode = se.StudentSY + tbdo.TraitsID, GradeSectionCode = (int)se.GradeSectionCode, LockFirst = false, LockSecond = false, LockFourth = false, LockThird = false }; string message = string.Empty; StudentTraitBDO stb = new StudentTraitBDO(); NewTraitsTranslateStuTraitsToStuTraitsBDO(st, stb); ret = stl.AddStudentCharacters(stb, ref message); } return ret; }