/// <summary> /// </summary> /// <param name="options"> the user custom options for search, sort ,filter page</param> /// <param name="type"> one element of the enumeration to distinguish multiple type of url to create</param> /// <returns></returns> private string CreateUriTraineeship(TraineeshipSSFP options, RessourceUriType type) { switch (type) { case RessourceUriType.PreviousPage: return(Url.Link("GetAllTraineeShipAsync", new { PageNumber = options.PageNumber - 1, options.PageSize, options.SortBy, options.FilterBy })); case RessourceUriType.NextPage: return(Url.Link("GetAllTraineeShipAsync", new { PageNumber = options.PageNumber + 1, options.PageSize, options.SortBy, options.FilterBy })); default: return(Url.Link("GetAllTraineeShipAsync", new { options.PageNumber, options.PageSize, options.SortBy, options.FilterBy })); } }
private string CreateResourceUri(PilotSSFP options, RessourceUriType type) { switch (type) { case RessourceUriType.PreviousPage: return(Url.Link("GetAllPilotsAsync", new { PageNumber = options.PageNumber - 1, options.PageSize, options.SortBy, options.FilterBy, options.SearchBy, options.LicenseID })); case RessourceUriType.NextPage: return(Url.Link("GetAllPilotsAsync", new { PageNumber = options.PageNumber + 1, options.PageSize, options.SortBy, options.FilterBy, options.SearchBy, options.LicenseID })); default: return(Url.Link("GetAllPilotsAsync", new { options.PageNumber, options.PageSize, options.SortBy, options.FilterBy, options.SearchBy, options.LicenseID })); } }
private string CreateUriParagliderModel(ParagliderModelsSSFP options, RessourceUriType type) { switch (type) { case RessourceUriType.PreviousPage: return(Url.Link("GetAllModelParaglidersAsync", new { PageNumber = options.PageNumber - 1, options.PageSize, options.FilterBy, options.SearchBy, options.Pilotweight })); case RessourceUriType.NextPage: return(Url.Link("GetAllModelParaglidersAsync", new { PageNumber = options.PageNumber + 1, options.PageSize, options.FilterBy, options.SearchBy, options.Pilotweight })); default: return(Url.Link("GetAllModelParaglidersAsync", new { options.PageNumber, options.PageSize, options.FilterBy, options.SearchBy, options.Pilotweight })); } }
/// <summary> /// Pagination /// </summary> /// <param name="options"> PosessionSSFP for search, sort, filter and pagination feature> </param> /// <returns> private string CreateResourceUri(PossessionSSFP options, RessourceUriType type) { switch (type) { case RessourceUriType.PreviousPage: return(Url.Link("GetAllPossessionsAsync", new { PageNumber = options.PageNumber - 1, options.PageSize, options.FilterBy, options.LevelOfPilot, options.PossessionYear })); case RessourceUriType.NextPage: return(Url.Link("GetAllPossessionsAsync", new { PageNumber = options.PageNumber + 1, options.PageSize, options.FilterBy, options.LevelOfPilot, options.PossessionYear })); default: return(Url.Link("GetAllPilotsAsync", new { options.PageNumber, options.PageSize, options.FilterBy, options.LevelOfPilot, options.PossessionYear })); } }