Example #1
0
 public ActionResult <SectionCreateDTO> SectionStudents(int id_section)
 {
     try
     {
         return(Ok(SqlSectionsRepository.GetAllStudents(id_section)));
     }
     catch (DatabaseException)
     {
         return(StatusCode(500));
     }
 }
Example #2
0
 public ActionResult <SectionCreateDTO> SectionDelete(SectionUpdateDTO s)
 {
     try
     {
         return(Ok(SqlSectionsRepository.SectionDelete(s.id)));
     }
     catch (DatabaseException)
     {
         return(StatusCode(500));
     }
 }
Example #3
0
 public ActionResult <IEnumerable <Section> > GetAllSections()
 {
     try
     {
         return(Ok(SqlSectionsRepository.GetAllSections()));
     }
     catch (DatabaseException)
     {
         return(StatusCode(500));
     }
 }
Example #4
0
 public ActionResult <InscriptionDTO> SectionUninscription(int id_section, InscriptionDTO ins)
 {
     try
     {
         return(Ok(SqlSectionsRepository.SectionUninscription(id_section, ins.id_person)));
     }
     catch (DatabaseException)
     {
         return(StatusCode(500));
     }
 }
Example #5
0
 public ActionResult <SectionUpdateDTO> SectionUpdate(SectionUpdateDTO s)
 {
     try
     {
         return(Ok(SqlSectionsRepository.SectionUpdate(s.id, s.uc, s.semester, s.ht, s.hp, s.hl, s.name,
                                                       s.description, s.type, s.fk_school)));
     }
     catch (DatabaseException)
     {
         return(StatusCode(500));
     }
 }