public Student GetStudent(string id) { var errors = new List<string>(); var repository = new StudentRepository(); var service = new StudentService(repository); return service.GetStudent(id, ref errors); }
public List<Student> GetStudentList() { var errors = new List<string>(); var repository = new StudentRepository(); var service = new StudentService(repository); return service.GetStudentList(ref errors); }
public List<Enrollment> GetEnrollments(string id) { var errors = new List<string>(); var repository = new StudentRepository(); var service = new StudentService(repository); return service.GetEnrollments(id, ref errors); }
public string EnrollSchedule(string studentId, int scheduleId) { var errors = new List<string>(); var repository = new StudentRepository(this.entities); var service = new StudentService(repository); service.EnrollSchedule(studentId, scheduleId, ref errors); if (errors.Count == 0) { return "ok"; } return "error"; }
public string DeleteStudent(string id) { var errors = new List<string>(); var repository = new StudentRepository(this.entities); var service = new StudentService(repository); service.DeleteStudent(id, ref errors); if (errors.Count == 0) { return "ok"; } return "error"; }
public ActionResult AddStudentMark(StudentMark studentMark, int id) { try { StudentRepository studentRepository = new StudentRepository(); studentMark.RollNumber = id; studentRepository.AddStudentMark(studentMark); //ViewData["Message1"] = "Student Marks Inserted Sucessfully"; //return View(); return RedirectToAction("Search", "Student"); } catch (Exception ex) { ViewData["Message2"] = "Error in Inserting"; return View(); } }
//Created by Prasanaon 18.07.2013 /// <summary> /// Creates the student mark. /// </summary> /// <returns>StudentMark</returns> public static StudentMark CreateStudentMark() { StudentRepository studentRepository = new StudentRepository(); var studentMark = new StudentMark { RollNumber = 4, Language = 90, English = 90, Maths = 100, Science = 100, Social = 100, Result = 'P', Remarks = "Good", Total = 480, Percentage = 96, Created_By = 1 }; studentMark.StudentMarkId = studentRepository.AddStudentMark(studentMark); return studentMark; }
public SqlUnitOfWork(DbContext context) { _dbcontext = context; StudentMasters = new SqlRepository<StudentMaster>(context); AcademicYears = new AcademicYearRepository(context); AcademicTerms = new SqlRepository<AcademicTerm>(context); Students = new StudentRepository(context); ClassLabels = new SqlRepository<ClassLabel>(context); Classes = new SqlRepository<Class>(context); Subjects = new SqlRepository<Subject>(context); Activities = new SqlRepository<Activity>(context); DescriptiveIndicators = new SqlRepository<DescriptiveIndicator>(context); Exams = new SqlRepository<Exam>(context); AssessmentSchemas = new SqlRepository<AssessmentSchema>(context); ExamResults = new SqlRepository<ExamResult>(context); ActivityGrades = new SqlRepository<ActivityGrade>(context); ScholasticSections = new SqlRepository<ScholasticSection>(context); Houses = new SqlRepository<House>(context); ExamGradingSchemas = new SqlRepository<ExamGradingSchema>(context); ActivityGradingSchemas = new SqlRepository<ActivityGradingSchema>(context); Attendances = new SqlRepository<Attendance>(context); SelfAwarenesses = new SqlRepository<SelfAwareness>(context); HealthInformations = new SqlRepository<HealthInformation>(context); TeacherClassSubjectMaps = new SqlRepository<TeacherClassSubjectMap>(context); Teachers = new SqlRepository<Teacher>(context); ClassTeachers = new SqlRepository<ClassTeacher>(context); ActivityResults = new SqlRepository<ActivityResult>(context); Minorities = new SqlRepository<Minority>(context); Categories = new SqlRepository<Category>(context); StudentScores = new SqlRepository<StudentScore>(context); StudentAssignments = new SqlRepository<StudentAssignment>(context); SmsReports = new SqlRepository<SmsReport>(context); TeacherUploads = new SqlRepository<TeacherUpload>(context); Settings = new SqlRepository<Settings>(context); Menus = new SqlRepository<Menu>(context); StudentAttendances = new SqlRepository<StudentAttendances>(context); ExamSections = new SqlRepository<ExamSection>(context); ExamSectionResults = new SqlRepository<ExamSectionResult>(context); }
public string RequestPreReqOverride(PreReqOverride pr) { var errors = new List<string>(); var repository = new StudentRepository(this.entities); var service = new StudentService(repository); service.RequestPreReqOverride(pr.ScheduleId, pr.StudentId, ref errors); if (errors.Count == 0) { return "ok"; } return "error"; }
public string InsertStudent(Student student) { var errors = new List<string>(); var repository = new StudentRepository(this.entities); var service = new StudentService(repository); service.InsertStudent(student, ref errors); if (errors.Count == 0) { return "ok"; } return "error"; }
public float GetGpa(string id) { var errors = new List<string>(); var repository = new StudentRepository(this.entities); var service = new StudentService(repository); return service.CalculateGpa(id, ref errors); }
public string UpdateStudent(Student student) { var errors = new List<string>(); var repository = new StudentRepository(); var service = new StudentService(repository); service.UpdateStudent(student, ref errors); if (errors.Count == 0) { return "ok"; } return "error"; }
public string UpdateGradingOption(string studentId, int scheduleId, string gradingOpt) { var errors = new List<string>(); var repository = new StudentRepository(); var service = new StudentService(repository); service.UpdateGradingOption(studentId, scheduleId, gradingOpt, ref errors); if (errors.Count == 0) { return "ok"; } return "error"; }
public string UpdateGradeChangeRequest(string studentId, int scheduleId, bool requestChange) { var errors = new List<string>(); var repository = new StudentRepository(); var service = new StudentService(repository); service.UpdateGradeChangeRequest(studentId, scheduleId, requestChange, ref errors); if (errors.Count == 0) { return "ok"; } return "error"; }