private void frmControlSubjects_Load(object sender, EventArgs e) { IRegistrationService registrationService = new RegistrationService(); string message = String.Empty; ControlStudent = registrationService.GetStudent(controlStudentId,ref message); StudentEnrollment enrStudent = new StudentEnrollment(); SY = GlobalClass.currentsy; enrStudent = registrationService.GetStudentEnrolled(controlStudentId,SY); ISubjectAssignmentService schedService = new SubjectAssignmentService(); sections = new List<GradeSection>(schedService.GetAllSections()); List<GradeSection> gs = new List<GradeSection>(); gs = sections.FindAll(s => s.GradeLevel == ControlStudent.GradeLevel); // cbSection.DataSource = gs; int index = gs.FindIndex(s => s.Section == ControlStudent.Section); gradeSectionCode = gs[index].GradeSectionCode; loadSched(); txtSection.Text = ControlStudent.Section; // cbSection.Text = ControlStudent.Section; txtSY.Text = SY; txtGradeLevel.Text = ControlStudent.GradeLevel; txtStudentId.Text = ControlStudent.StudentId; txtStudentName.Text = ControlStudent.LastName + "," + ControlStudent.FirstName + " " + ControlStudent.MiddleName; txtPrevGPA.Text = ControlStudent.Average.ToString(); txtUnitsFailed.Text = ControlStudent.UnitsFailedLastYear.ToString(); }
public Boolean EnrolStudent(StudentEnrollment studentEnr) { GradeSectionLogic gsl = new GradeSectionLogic(); StudentService ss = new StudentService(); StudentEnrollmentBDO studentBDO = new StudentEnrollmentBDO(); string message = string.Empty; List<GradeSectionBDO> sections = new List<GradeSectionBDO>(); string grade = studentEnr.GradeLevel; sections = (gsl.GetAllSectionsofGrade(grade)); int div = studentEnr.Rank / 20; div++; int index = sections.FindIndex(item => item.Class == div); studentEnr.GradeSectionCode = (int?)sections[index].GradeSectionCode; TranslatEnrolToEnrolBDO(studentEnr, studentBDO); if (sel.RegisterStudent(studentBDO, ref message)) { string section = String.Empty; studentBDO.GradeSectionCode = studentEnr.GradeSectionCode; index = sections.FindIndex(item => item.GradeSectionCode == studentEnr.GradeSectionCode); section = sections[index].Section; ss.UpdateStudent(studentEnr.StudentId, studentEnr.GradeLevel, studentEnr.Rank, section); ControlStudentCharacters(studentBDO); return true; } else return false; }
public bool EnrolIrregStudent(StudentEnrollment studentEnr) { GradeSectionLogic gsl = new GradeSectionLogic(); StudentService ss = new StudentService(); StudentEnrollmentBDO studentBDO = new StudentEnrollmentBDO(); TranslatEnrolToEnrolBDO(studentEnr, studentBDO); string message = string.Empty; if (sel.RegisterStudent(studentBDO, ref message)) { string section = String.Empty; int gsc = (int)studentEnr.GradeSectionCode; section = gsl.GetSection(gsc); ss.UpdateStudent(studentEnr.StudentId, studentEnr.GradeLevel, studentEnr.Rank, section); ControlStudentCharacters(studentBDO); return true; } else return false; }
private void AssessStudent_Load(object sender, EventArgs e) { IRegistrationService registrationService = new RegistrationService(); List<Fee> fees = new List<Fee>(); IScholarshipService scholarshipService = new ScholarshipService(); List<ScholarshipDiscount> scholarships = new List<ScholarshipDiscount>(); currentSY = registrationService.GetCurrentSY(); StudentAssessed = registrationService.GetStudentEnrolled(StudentId, currentSY.SY); txtGradeLevel.Text = StudentAssessed.GradeLevel; txtIDnum.Text = StudentAssessed.StudentId; txtName.Text = StudentAssessed.StudentName; txtSY.Text = currentSY.SY; lblSectionVal.Text = StudentAssessed.student.Section; fees = new List<Fee>(registrationService.GetStudentFees(StudentAssessed)); gvAssessment.DataSource = fees; fees.ToArray(); scholarships = new List<ScholarshipDiscount>(registrationService.GetScholarshipDiscounts()); int scholarshipDiscountId = StudentAssessed.DiscountId; ScholarshipDiscount sd = new ScholarshipDiscount(); sd = scholarships.Find(v => v.ScholarshipDiscountId == scholarshipDiscountId); fees[0].Amount = fees[0].Amount ?? 0; amountTuition = (double)fees[0].Amount; if (fees.Count > 1) { fees[1].Amount = fees[1].Amount ?? 0; enrollment = (double)fees[1].Amount; } // Read Only TextBox tuitionFee.ReadOnly = true; discountPercent.ReadOnly = true; totalLessDiscount.ReadOnly = true; enrollmentFee.ReadOnly = true; enrTotalTuitionFee.ReadOnly = true; subTotal.ReadOnly = true; discountbyAmountSubTotal.ReadOnly = true; //Total.ReadOnly = true; // Total Tuition Fee tuitionFee.Text = amountTuition.ToString("0.###"); // Percent Discount double perc = 0; double percRound = 0; double percInitial = 0; if (double.TryParse(fullPaymentDisc.Text, out fullPaymentDiscPar)) ; perc = (double)sd.Discount; if (sd.Discount == null) { discountPercent.Enabled = false; } else { discountPercent.Text = perc.ToString("0.##"); percRound = perc / 100; percInitial = amountTuition * percRound; percValue = amountTuition - percInitial; totalLessDisc = percValue; finalPercentDisc = totalLessDisc - fullPaymentDiscPar; } if (perc == 100) { fullPaymentDisc.ReadOnly = true; } /* Operations */ // Operation for Percent Discount if not null //Total Less Discount totalLessDiscount.Text = totalLessDisc.ToString("0.##"); // Enrollment Fee enrollmentFee.Text = enrollment.ToString(); // Total Tuition Fee enrTotalTuitionFee.Text = finalPercentDisc.ToString("0.##"); // Sub Total subTotalValue = enrollment + finalPercentDisc; subTotal.Text = subTotalValue.ToString("0.##"); // Sub Total discountbyAmountSubTotal.Text = subTotalValue.ToString("0.##"); listStudentAssessed = registrationService.GetStudentAssessment(StudentId, currentSY.SY); }
public void TranslateStudentTraitBDOToStudentTrait(StudentTraitBDO stb, StudentTrait st) { st.Description = stb.Trait.Description; st.FirstEntered = stb.FirstEntered; st.FirstLocked = stb.FirstLocked; st.FirstPeriodicRating = stb.FirstPeriodicRating; st.FourthEntered = stb.FourthEntered; st.FourthLocked = stb.FourthLocked; st.FourthPeriodicRating = stb.FourthPeriodicRating; st.GradeLevel = stb.GradeSection.GradeLevel; st.GradeSectionCode = (int)stb.GradeSectionCode; st.LockFirst = stb.LockFirst; st.LockFourth = stb.LockCFourth; st.LockSecond = stb.LockSecond; st.LockThird = stb.LockThird; st.SecondEntered = stb.SecondEntered; st.SecondLocked = stb.SecondLocked; st.SecondPeriodicRating = stb.SecondPeriodicRating; st.Section = stb.GradeSection.Section; RegistrationService r = new RegistrationService(); StudentEnrollment se = new StudentEnrollment(); r.TranslatEnrolBDOToEnrol(stb.StudentEnrollment, se); st.StudentEnr = se; st.StudentEnrTraitCode = stb.StudentEnrTraitCode; st.StudentId = se.StudentId; st.StudentName = se.StudentName; st.StudentSY = stb.StudentSY; st.TeacherId = stb.GradeSection.HomeRoomTeacherId; st.TeacherName = stb.GradeSection.HomeRoomTeacher.LastName + "," + stb.GradeSection.HomeRoomTeacher.FirstName; st.ThirdEntered = stb.ThirdEntered; st.ThirdLocked = stb.ThirdLocked; st.ThirdPeriodicRating = stb.ThirdPeriodicRating; st.TraitsID = stb.TraitsID; }
public void TranslateStudentSubjectBDOToStudentSubject(StudentSubjectBDO ssbdo, StudentSubject ss) { SubjectService s = new SubjectService(); Subject sub = new Subject(); s.TranslateSubjectBDOToSubject(ssbdo.Subject, sub); RegistrationService r = new RegistrationService(); StudentEnrollment se = new StudentEnrollment(); r.TranslatEnrolBDOToEnrol(ssbdo.StudentEnrollment, se); ss.StudentEnr = se; ss.Description = sub.Description; ss.FirstPeriodicRating = ssbdo.FirstPeriodicRating; ss.SecondPeriodicRating = ssbdo.SecondPeriodicRating; ss.ThirdPeriodicRating = ssbdo.ThirdPeriodicRating; ss.FourthPeriodicRating = ssbdo.FourthPeriodicRating; ss.FirstEntered = ssbdo.FirstEntered; ss.SecondEntered = ssbdo.SecondEntered; ss.ThirdEntered = ssbdo.ThirdEntered; ss.FourthEntered = ssbdo.FourthEntered; ss.LockFirst = (bool)ssbdo.LockFirst; ss.LockFourth = (bool)ssbdo.LockFourth; ss.LockSecond = (bool)ssbdo.LockSecond; ss.LockThird = (bool)ssbdo.LockThird; ss.FirstLocked = ssbdo.FirstLocked; ss.SecondLocked = ssbdo.SecondLocked; ss.ThirdLocked = ssbdo.ThirdLocked; ss.FourthLocked = ssbdo.FourthLocked; ss.Remarks = ssbdo.Remarks; ss.StudentEnrSubCode = ssbdo.StudentEnrSubCode; ss.StudentEnrSubCode = ssbdo.StudentEnrSubCode; ss.StudentSubjectsID = ssbdo.StudentSubjectsID; ss.StudentSY = ssbdo.StudentSY; ss.SubjectCode = ssbdo.SubjectCode; ss.StudentId = se.StudentId; ss.StudentName = se.StudentName; }
public List<Fee> GetStudentFees(StudentEnrollment student) { FeeService fs = new FeeService(); List<Fee> feeList = new List<Fee>(); //Changed feeList = fs.GetAllFeesForGradeLevel(student.GradeLevel, student.SY); feeList.Add(fs.GetFeeForAll(student.SY)); foreach (Fee f in feeList) { StudentAssessmentBDO sabdo = new StudentAssessmentBDO() { StudentSY = student.StudentSY, FeeID = f.FeeID, DiscountId = student.DiscountId }; } return feeList; }
public List<StudentEnrollment> GetCurrentStudents(string sy) { StudentEnrollmentLogic ser = new StudentEnrollmentLogic(); List<StudentEnrollmentBDO> selbdo = ser.GetEnrolledStudents(sy); List<StudentEnrollment> currentStudents = new List<StudentEnrollment>(); foreach (StudentEnrollmentBDO seb in selbdo) { StudentEnrollment se = new StudentEnrollment(); TranslatEnrolBDOToEnrol(seb, se); currentStudents.Add(se); } return currentStudents; }
public StudentEnrollment GetStudentEnrolled(string IDNum, string SY) { StudentEnrollment se = new StudentEnrollment(); TranslatEnrolBDOToEnrol(sel.GetStudentEnrolled(IDNum, SY), se); return se; }
public void TranslateStuSubjectsBDOToStuSubjects(StudentSubjectBDO sbdo, StudentSubject s) { SubjectService ss = new SubjectService(); Subject sub = new Subject(); ss.TranslateSubjectBDOToSubject(sbdo.Subject, sub); s.SubjectCode = sbdo.SubjectCode; s.Description = sub.Description; RegistrationService rs = new RegistrationService(); StudentEnrollment se = new StudentEnrollment(); rs.TranslatEnrolBDOToEnrol(sbdo.StudentEnrollment, se); s.StudentEnr = se; s.StudentSY = sbdo.StudentSY; s.StudentId = se.StudentId; s.StudentName = se.StudentName; s.StudentSubjectsID = sbdo.StudentSubjectsID; s.StudentEnrSubCode = sbdo.StudentEnrSubCode; s.Remarks = sbdo.Remarks; s.FirstPeriodicRating = sbdo.FirstPeriodicRating; s.SecondPeriodicRating = sbdo.SecondPeriodicRating; s.ThirdPeriodicRating = sbdo.ThirdPeriodicRating; s.FourthPeriodicRating = sbdo.FourthPeriodicRating; s.Description = sub.Description; s.SubjectAssignments = sbdo.SubjectAssignments; s.FirstEntered = sbdo.FirstEntered; s.FirstLocked = sbdo.FirstLocked; s.FourthEntered = sbdo.FourthEntered; s.FourthLocked = sbdo.FourthLocked; s.LockFirst = sbdo.LockFirst; s.LockFourth = sbdo.LockFourth; s.LockSecond = sbdo.LockSecond; s.LockThird = sbdo.LockThird; s.SecondEntered = sbdo.SecondEntered; s.SecondLocked = sbdo.SecondLocked; s.ThirdEntered = sbdo.ThirdEntered; s.ThirdLocked = sbdo.ThirdLocked; s.FinalRating = (double)sbdo.FourthPeriodicRating; if (s.FinalRating > 90) s.Proficiency = "O"; else if (s.FinalRating >= 85) s.Proficiency = "VS"; else if (s.FinalRating >= 80) s.Proficiency = "S"; else if (s.FinalRating >= 75) s.Proficiency = "FS"; else if (s.FinalRating <= 74) s.Proficiency = "D"; }
public void TranslatEnrolBDOToEnrol(StudentEnrollmentBDO seb, StudentEnrollment se) { StudentService ss = new StudentService(); Student stu = new Student(); ss.TranslateStudentBDOToStudentDTO(seb.Student, stu); se.StudentSY = seb.StudentSY; se.StudentId = seb.StudentId; se.SY = seb.SY; se.GradeLevel = seb.GradeLevel; se.GradeSectionCode = seb.GradeSectionCode; se.Dismissed = seb.Dismissed; se.Stat = seb.Stat; se.DiscountId = (int)seb.DiscountId; se.StudentName = stu.LastName + ", " + stu.FirstName + " " + stu.MiddleName; se.StudentEnrollmentsID = seb.StudentEnrollmentsID; se.student = stu; }
public void TranslatEnrolToEnrolBDO(StudentEnrollment se, StudentEnrollmentBDO seb) { seb.StudentSY = se.StudentSY; seb.StudentId = se.StudentId; seb.SY = se.SY; seb.GradeLevel = se.GradeLevel; seb.GradeSectionCode = se.GradeSectionCode; seb.Dismissed = se.Dismissed; seb.Stat = se.Stat; seb.DiscountId = se.DiscountId; seb.Rank = se.Rank; // seb.StudentEnrollmentsID = se.StudentEnrollmentsID }
public StudentEnrollment GetEnrolledStudent(string id, string sy) { StudentEnrollment se = new StudentEnrollment(); TranslatEnrolBDOToEnrol(sel.GetStudentEnrolled(id, sy), se); return se; }
public List<StudentAssessment> AssessMe(StudentEnrollment student) { FeeService fs = new FeeService(); List<Fee> feeList = new List<Fee>(); Fee FeeforAll = new Fee(); feeList = fs.GetAllFeesForGradeLevel(student.GradeLevel, student.SY); FeeforAll = fs.GetFeeForAll(student.SY); if (FeeforAll.Amount != null) feeList.Add(FeeforAll); foreach (Fee f in feeList) { StudentAssessmentBDO sabdo = new StudentAssessmentBDO() { StudentSY = student.StudentSY, FeeID = f.FeeID, DiscountId = student.DiscountId }; sal.AssessStudent(sabdo); } return GetStudentAssessment(student.StudentId, student.SY); }
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; }