﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web.Http;
using Mock_MisInfrastructure.Contracts;
using Mock_MisInfrastructure.Models;

namespace ReferralReboot.Controllers
{
    public class Mock_MisPastoralStaffController : ApiController
    {
        private readonly IMock_MisPastoralStaffService _misPastoralStaffService;

        public Mock_MisPastoralStaffController(IMock_MisPastoralStaffService misPastoralStaffService)
        {
            _misPastoralStaffService = misPastoralStaffService;
        }
        public IEnumerable<Mock_MisRegGroupSupervisor> GetAllRegGroupSupervisors()
        {
            return _misPastoralStaffService.AllRegGroupStaff().ToList();
        } 
        [Route("api/mispastoralstaff/getRegGroupSupervisors/{regGroup}")]
        public IEnumerable<Mock_MisRegGroupSupervisor> GetRegGroupSupervisors(string regGroup)
        {
            return _misPastoralStaffService.RegGroupStaffByForm(regGroup).ToList();
        }
        public IEnumerable<Mock_MisYearGroupSupervisor> GetAllYearGroupSupervisors()
        {
            return _misPastoralStaffService.AllYearGroupStaff().ToList();
        }
        [Route("api/mispastoralstaff/getYearGroupSupervisors/{yearGroup}")]
        public IEnumerable<Mock_MisYearGroupSupervisor> GetYearGroupSupervisors(string yearGroup)
        {
            return _misPastoralStaffService.YearGroupStaffByYear(yearGroup).ToList();
        } 
    }
}
