public List <AmendmentReason> GetAmendmentReasons(AmendmentType amendmentType) { var results = _apiClient.GetAmendmentReasonsAsync(amendmentType, CheckingWindow).GetAwaiter() .GetResult(); return(results.Result.ToList()); }
public static rscd_Amendmenttype ToCRMAmendmentType(this AmendmentType amendmentType) { switch (amendmentType) { case AmendmentType.AddPupil: return(rscd_Amendmenttype.Addapupil); case AmendmentType.RemovePupil: return(rscd_Amendmenttype.Removeapupil); default: throw new ApplicationException(); } }
public IActionResult GetAmendmentReasons( [FromRoute][SwaggerParameter("The type of amendment", Required = true)] AmendmentType amendmentType, [FromRoute][SwaggerParameter("The checking window to request amendments from", Required = true)] CheckingWindow checkingWindow ) { var list = _dataService.GetAmendmentReasons(checkingWindow, amendmentType); var response = new GetResponse <IEnumerable <AmendmentReason> > { Result = list, Error = new Error() }; return(Ok(response)); }
private IAmendmentBuilder RetrieveBuilderForAmendment(AmendmentType amendmentType) { return(_amendmentBuilders.FirstOrDefault(x => x.AmendmentType == amendmentType)); }
public IList <AmendmentReason> GetAmendmentReasons(CheckingWindow checkingWindow, AmendmentType amendmentType) { return(new List <AmendmentReason> { new AmendmentReason { Description = "Admitted following permanent exclusion from a maintained school", ReasonId = 10, AmendmentType = AmendmentType.RemovePupil }, new AmendmentReason { Description = "Admitted from abroad with English not first language", ReasonId = 8, AmendmentType = AmendmentType.RemovePupil }, new AmendmentReason { Description = "Deceased", ReasonId = 12, AmendmentType = AmendmentType.RemovePupil }, new AmendmentReason { Description = "Permanently left England", ReasonId = 11, AmendmentType = AmendmentType.RemovePupil }, new AmendmentReason { Description = "Dual registration", ReasonId = 13, AmendmentType = AmendmentType.RemovePupil }, new AmendmentReason { Description = "Other", ReasonId = 19, AmendmentType = AmendmentType.RemovePupil }, new AmendmentReason { Description = "Other - EAL exceptional circumstances", ReasonId = 1901, ParentReasonId = 19, AmendmentType = AmendmentType.RemovePupil }, new AmendmentReason { Description = "Other - Elective home education", ReasonId = 1902, ParentReasonId = 19, AmendmentType = AmendmentType.RemovePupil }, new AmendmentReason { Description = "Other - In prison/remand centre/secure unit", ReasonId = 1903, ParentReasonId = 19, AmendmentType = AmendmentType.RemovePupil }, new AmendmentReason { Description = "Other - Permanently excluded from this school", ReasonId = 1904, ParentReasonId = 19, AmendmentType = AmendmentType.RemovePupil }, new AmendmentReason { Description = "Other - Police involvement/bail restrictions", ReasonId = 1905, ParentReasonId = 19, AmendmentType = AmendmentType.RemovePupil }, new AmendmentReason { Description = "Other - Pupil missing in education", ReasonId = 1906, ParentReasonId = 19, AmendmentType = AmendmentType.RemovePupil }, new AmendmentReason { Description = "Other - Safeguarding/FAP", ReasonId = 1907, ParentReasonId = 19, AmendmentType = AmendmentType.RemovePupil }, new AmendmentReason { Description = "Other - Terminal/Long illness", ReasonId = 1908, ParentReasonId = 19, AmendmentType = AmendmentType.RemovePupil } }.Where(x => x.AmendmentType == amendmentType).ToList()); }
public List <AmendmentReason> GetAmendmentReasons(AmendmentType amendmentType) { return(_cache.GetOrCreate("GetAmendmentReasons" + CheckingWindow + amendmentType, () => _service.GetAmendmentReasons(amendmentType), null, databaseId: RedisDb.General)); }