コード例 #1
0
        public ViewResult Details(int?id)
        {
            HomeDetailsViewModel viewmodel = new HomeDetailsViewModel()
            {
                student   = _er.GetStudent(id ?? 1),
                PageTitle = "Student Details"
            };

            return(View(viewmodel));
        }
コード例 #2
0
        public IActionResult Index(int?StudentId)
        {
            ViewBag.studentid   = StudentId;
            ViewBag.StudentName = student_repo.GetStudent(StudentId);
            List <Payment> _payment = payRepo.GetAllStudentPayments(StudentId);

            return(View(_payment));
        }
コード例 #3
0
        public async Task <IActionResult> Get(Guid studentId)
        {
            var student = _studentRepository.GetStudent(studentId);

            if (student != null)
            {
                return(Ok(student));
            }
            else
            {
                return(BadRequest());
            }
        }
コード例 #4
0
        public ViewResult Details(int id)
        {
            List <Guarantor> guard = _guarantorRepo.GetGuarantor(id).ToList();
            List <Payment>   pay   = _payment.GetPayments(id).ToList();

            HomeDetailsViewModel viewmodel = new HomeDetailsViewModel()
            {
                student    = _er.GetStudent(id),
                guarantors = guard,
                payment    = pay,
                PageTitle  = "Student Details"
            };

            return(View(viewmodel));
        }
コード例 #5
0
 public Student GetStudent(int studentId)
 {
     return(_studentRepo.GetStudent(studentId));
 }
コード例 #6
0
 public IActionResult Edit(int studentid)
 {
     return(View(studentService.GetStudent(studentid)));
 }