|
|
|
@ -106,7 +106,7 @@ namespace IO.Swagger.Controllers |
|
|
|
|
{ |
|
|
|
|
//TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ... |
|
|
|
|
IEnumerable<FormationDTO> formations = formationService.GetFormationAnnulees(asc, numPage, parPAge, idAgence, texte, tri); |
|
|
|
|
if (formations.Count() == 0) |
|
|
|
|
if (formations == null) |
|
|
|
|
{ |
|
|
|
|
ErreurDTO erreur = new ErreurDTO() |
|
|
|
|
{ |
|
|
|
@ -175,7 +175,7 @@ namespace IO.Swagger.Controllers |
|
|
|
|
{ |
|
|
|
|
//TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ... |
|
|
|
|
IEnumerable<FormationDTO> formations = formationService.GetFormationRealisee(asc, numPage, parPAge, idAgence, texte, tri); |
|
|
|
|
if (formations.Count() == 0) |
|
|
|
|
if (formations == null) |
|
|
|
|
{ |
|
|
|
|
ErreurDTO erreur = new ErreurDTO() |
|
|
|
|
{ |
|
|
|
@ -213,7 +213,7 @@ namespace IO.Swagger.Controllers |
|
|
|
|
{ |
|
|
|
|
//TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ... |
|
|
|
|
IEnumerable<FormationDTO> formations = formationService.GetFormations(asc, numPage, parPAge, idAgence, texte, tri); |
|
|
|
|
if (formations.Count() == 0) |
|
|
|
|
if (formations == null) |
|
|
|
|
{ |
|
|
|
|
ErreurDTO erreur = new ErreurDTO() |
|
|
|
|
{ |
|
|
|
@ -243,7 +243,7 @@ namespace IO.Swagger.Controllers |
|
|
|
|
{ |
|
|
|
|
//TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ... |
|
|
|
|
IEnumerable<ModeFormationDTO> modeFormations = formationService.GetModesFormation(); |
|
|
|
|
if (modeFormations.Count() == 0) |
|
|
|
|
if (modeFormations == null) |
|
|
|
|
{ |
|
|
|
|
ErreurDTO erreur = new ErreurDTO() |
|
|
|
|
{ |
|
|
|
@ -273,7 +273,7 @@ namespace IO.Swagger.Controllers |
|
|
|
|
{ |
|
|
|
|
//TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ... |
|
|
|
|
IEnumerable<OrigineFormationDTO> origineFormations = formationService.GetOriginesFormation(); |
|
|
|
|
if (origineFormations.Count() == 0) |
|
|
|
|
if (origineFormations == null) |
|
|
|
|
{ |
|
|
|
|
ErreurDTO erreur = new ErreurDTO() |
|
|
|
|
{ |
|
|
|
@ -311,7 +311,7 @@ namespace IO.Swagger.Controllers |
|
|
|
|
{ |
|
|
|
|
//TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ... |
|
|
|
|
IEnumerable<FormationDTO> formations = formationService.GetProchainesFormation(asc, numPage, parPAge, idAgence, texte, tri); |
|
|
|
|
if (formations.Count() == 0) |
|
|
|
|
if (formations == null) |
|
|
|
|
{ |
|
|
|
|
ErreurDTO erreur = new ErreurDTO() |
|
|
|
|
{ |
|
|
|
@ -341,7 +341,7 @@ namespace IO.Swagger.Controllers |
|
|
|
|
{ |
|
|
|
|
//TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ... |
|
|
|
|
IEnumerable<StatutFormationDTO> statutFormations = formationService.GetStatutsFormation(); |
|
|
|
|
if (statutFormations.Count() == 0) |
|
|
|
|
if (statutFormations == null) |
|
|
|
|
{ |
|
|
|
|
ErreurDTO erreur = new ErreurDTO() |
|
|
|
|
{ |
|
|
|
@ -371,7 +371,7 @@ namespace IO.Swagger.Controllers |
|
|
|
|
{ |
|
|
|
|
//TODO: Uncomment the next line to return response 200 or use other options such as return this.NotFound(), return this.BadRequest(..), ... |
|
|
|
|
IEnumerable<TypeFormationDTO> typeFormations = formationService.GetTypesFormation(); |
|
|
|
|
if (typeFormations.Count() == 0) |
|
|
|
|
if (typeFormations == null) |
|
|
|
|
{ |
|
|
|
|
ErreurDTO erreur = new ErreurDTO() |
|
|
|
|
{ |
|
|
|
@ -401,7 +401,7 @@ namespace IO.Swagger.Controllers |
|
|
|
|
[SwaggerResponse(statusCode: 403, type: typeof(ErreurDTO), description: "Acces interdit")] |
|
|
|
|
public virtual IActionResult UpdateFormation([FromBody] FormationDTO body, [FromRoute][Required] long? idFormation) |
|
|
|
|
{ |
|
|
|
|
FormationDTO formation = formationService.UpdateFormation(body); |
|
|
|
|
FormationDTO formation = formationService.UpdateFormation(idFormation, body); |
|
|
|
|
if (formation == null) |
|
|
|
|
{ |
|
|
|
|
formation = formationService.AddFormation(body); |
|
|
|
|