Example #1
0
 public IList <Subject> GetSubjectList()
 {
     try
     {
         return(_appService.GetAll());
     }
     catch (LibraryException ex)
     {
         throw ex;
     }
     catch (Exception)
     {
         throw new Exception("Internal Server Error");
     }
 }
 // GET: Grades/Create
 public ActionResult Create()
 {
     ViewBag.StudentId = new SelectList(_studentApp.GetAll(), "Id", "Name");
     ViewBag.SubjectId = new SelectList(_subjectApp.GetAll(), "Id", "Name");
     return(View());
 }
Example #3
0
        // GET: Subjects
        public ActionResult Index()
        {
            var subjectViewModel = Mapper.Map <IEnumerable <Subject>, IEnumerable <SubjectViewModel> >(_subjectApp.GetAll());

            return(View(subjectViewModel));
        }