protected static void CreateAndWithdrawRegBarnsley(string uln) { var profileId = SqlQueries.CreateRegistrationProfileForNonLRS(uln); var pathwayId = SqlQueries.CreateRegistrationPathwayForLrs(profileId); SqlQueries.CreateRegSpecialism(pathwayId); var pathwayAssessmentId = SqlQueries.CreatePathwayAssessment(pathwayId); SqlQueries.CreatePathwayResult(pathwayAssessmentId); SqlQueries.UpdateRegWithdrawn(uln); }
public void CreateDbRegWithResult(string uln) { //var uln = UlnHelper.GenerateUln().ToString(); var profileId = SqlQueries.CreateRegistrationProfile(uln); var pathwayId = SqlQueries.CreateRegistrationPathway(profileId); SqlQueries.CreateRegSpecialism(pathwayId); var pathwayAssessmentId = SqlQueries.CreatePathwayAssessment(pathwayId); SqlQueries.CreatePathwayResult(pathwayAssessmentId); }
public void CreateDbRegWithIpForLrs(string uln, int status) { var profileId = SqlQueries.CreateRegistrationProfileForLrsWithEM(uln); var pathwayId = SqlQueries.CreateRegistrationPathwayForLrs(profileId); SqlQueries.CreateRegSpecialismForLrs(pathwayId); var pathwayAssessmentId = SqlQueries.CreatePathwayAssessment(pathwayId); SqlQueries.CreatePathwayResult(pathwayAssessmentId); SqlQueries.CreateQualificationAcheivedForLrs(profileId); SqlQueries.CreateIndustryPlacement(pathwayId, status); }
public void CreateDbRegWithResultForLrs(string uln) { //var uln = UlnHelper.GenerateUln().ToString(); var profileId = SqlQueries.CreateRegistrationProfileForLrs(uln); var pathwayId = SqlQueries.CreateRegistrationPathwayForLrs(profileId); SqlQueries.CreateRegSpecialismForLrs(pathwayId); var pathwayAssessmentId = SqlQueries.CreatePathwayAssessment(pathwayId); SqlQueries.CreatePathwayResult(pathwayAssessmentId); SqlQueries.CreateQualificationAcheivedForLrs(profileId); }
protected static void CreateDbRegWithResultAndTwoAssessmentEntries(string uln) { var profileId = SqlQueries.CreateRegistrationProfile(uln); var pathwayId = SqlQueries.CreateRegistrationPathway(profileId); SqlQueries.CreateRegSpecialism(pathwayId); var pathwayAssessmentId = SqlQueries.CreatePathwayAssessment(pathwayId); SqlQueries.CreatePathwayResult(pathwayAssessmentId); SqlQueries.CreateSecondPathwayAssessmentEntry(pathwayId); //SqlQueries.CreatePathwayResult(pathwayAssessmentId1); }
protected static void CreateRegWithAppealState(string uln) { var profileId = SqlQueries.CreateRegistrationProfile(uln); var pathwayId = SqlQueries.CreateRegistrationPathway(profileId); SqlQueries.CreateRegSpecialism(pathwayId); var pathwayAssessmentId = SqlQueries.CreatePathwayAssessment(pathwayId); SqlQueries.CreatePathwayResult(pathwayAssessmentId); var updateResult = "update TqPathwayResult set EndDate = GETDATE() where TqPathwayAssessmentId='" + pathwayAssessmentId + "'"; SqlDatabaseConncetionHelper.UpdateSqlCommand(updateResult, ConnectionString); var insertAppealRow = "Insert into TqPathwayResult values('" + pathwayAssessmentId + "',2,GETDATE(),Null,3,1,0,GETDATE(),'System',GETDATE(),'System')"; SqlDatabaseConncetionHelper.ExecuteSqlCommand(insertAppealRow, ConnectionString); }
public void GivenIAttemptToDeleteAnActiveRegistrationWithoutAnActiveResultHoweverSomeoneElseHasJustAddedAResult() { var uln = scenarionContext["uln"] as string; WebDriver.FindElement(ResultsDashboardPage.BackToResultsBtn).Click(); ResultsLearnersResultsPage.ClickHomeBreadcrumb(); RegistrationsPage.ClickRegLink(); RegistrationsManualPage.ClickSearchForRegistrationLink(); RegistrationsSearchPage.SearchForULN(uln); RegistrationsSearchPage.VerifySearchResultPage(); RegistrationsSearchPage.ClickChangeStatusLink(); RegistrationDeletePage.ClickElement(RegistrationDeletePage.DeleteRadioBtn); RegistrationDeletePage.ClickElement(RegistrationDeletePage.ContinueBtn); int PAID = SqlQueries.RetrievePathwayAssessmentID(uln); SqlQueries.CreatePathwayResult(PAID); //RegistrationsActiveOptionPage.YesToCancelReg(); }
protected static void CreateDbRegistationForNonLrsCombination(string uln, string EmStatus, string IpStatus) { var ipStat = IpStatus switch { "IP completed" => 1, "IP completed with special consideration" => 2, _ => 3 }; switch (EmStatus) { case "MathEng achieved the minimum standard": var profileId = SqlQueries.CreateRegistrationProfileForLrsCombination(uln, "0", "1", "NULL", "1"); var pathwayId = SqlQueries.CreateRegistrationPathwayForLrsCombination(profileId); SqlQueries.CreateRegSpecialismForLrs(pathwayId); SqlQueries.CreateIndustryPlacement(pathwayId, ipStat); var pathwayAssessmentId = SqlQueries.CreatePathwayAssessment(pathwayId); SqlQueries.CreatePathwayResult(pathwayAssessmentId); break; case "MathEng achieved the minimum standard for learners with SEND": var profileId1 = SqlQueries.CreateRegistrationProfileForLrsCombination(uln, "0", "1", "1", "1"); var pathwayId1 = SqlQueries.CreateRegistrationPathwayForLrsCombination(profileId1); SqlQueries.CreateRegSpecialismForLrs(pathwayId1); SqlQueries.CreateIndustryPlacement(pathwayId1, ipStat); var pathwayAssessmentId1 = SqlQueries.CreatePathwayAssessment(pathwayId1); SqlQueries.CreatePathwayResult(pathwayAssessmentId1); break; case "MathEng not achieved the minimum standard": var profileId4 = SqlQueries.CreateRegistrationProfileForLrsCombination(uln, "0", "0", "NULL", "1"); var pathwayId4 = SqlQueries.CreateRegistrationPathwayForLrsCombination(profileId4); SqlQueries.CreateRegSpecialismForLrs(pathwayId4); SqlQueries.CreateIndustryPlacement(pathwayId4, ipStat); var pathwayAssessmentId4 = SqlQueries.CreatePathwayAssessment(pathwayId4); SqlQueries.CreatePathwayResult(pathwayAssessmentId4); break; } }
protected static void CreateDbRegistationForLrsCombination(string uln, string EmStatus, string IpStatus) { var ipStat = IpStatus switch { "IP completed" => 1, "IP completed with special consideration" => 2, _ => 3 }; switch (EmStatus) { case "MathEng not Achieved Min Standard Math-A Eng-NA": var profileId = SqlQueries.CreateRegistrationProfileForLrsCombination(uln, "NULL", "0", "NULL", "0"); var pathwayId = SqlQueries.CreateRegistrationPathwayForLrsCombination(profileId); SqlQueries.CreateRegSpecialismForLrs(pathwayId); SqlQueries.CreateQualificationAcheivedForLrsMathsAEnglishNA(profileId); SqlQueries.CreateIndustryPlacement(pathwayId, ipStat); var pathwayAssessmentId = SqlQueries.CreatePathwayAssessment(pathwayId); SqlQueries.CreatePathwayResult(pathwayAssessmentId); break; case "MathEng not Achieved Min Standard Math-NA Eng-A": var profileId1 = SqlQueries.CreateRegistrationProfileForLrsCombination(uln, "NULL", "0", "NULL", "0"); var pathwayId1 = SqlQueries.CreateRegistrationPathwayForLrsCombination(profileId1); SqlQueries.CreateRegSpecialismForLrs(pathwayId1); SqlQueries.CreateQualificationAcheivedForLrsMathsAEnglishNA(profileId1); SqlQueries.CreateIndustryPlacement(pathwayId1, ipStat); var pathwayAssessmentId1 = SqlQueries.CreatePathwayAssessment(pathwayId1); SqlQueries.CreatePathwayResult(pathwayAssessmentId1); break; case "MathEng not Achieved Min Standard Math-NA Eng-NA": var profileId4 = SqlQueries.CreateRegistrationProfileForLrsCombination(uln, "NULL", "0", "NULL", "0"); var pathwayId4 = SqlQueries.CreateRegistrationPathwayForLrsCombination(profileId4); SqlQueries.CreateRegSpecialismForLrs(pathwayId4); SqlQueries.CreateQualificationAcheivedForLrsMathsNaEnglishNa(profileId4); SqlQueries.CreateIndustryPlacement(pathwayId4, ipStat); var pathwayAssessmentId4 = SqlQueries.CreatePathwayAssessment(pathwayId4); SqlQueries.CreatePathwayResult(pathwayAssessmentId4); break; case "MathEng Achieved with SEND": var profileId2 = SqlQueries.CreateRegistrationProfileForLrsCombination(uln, "1", "1", "NULL", "0"); var pathwayId2 = SqlQueries.CreateRegistrationPathwayForLrsCombination(profileId2); SqlQueries.CreateRegSpecialismForLrs(pathwayId2); SqlQueries.CreateQualificationAcheivedForLrsSEND(profileId2); SqlQueries.CreateIndustryPlacement(pathwayId2, ipStat); var pathwayAssessmentId2 = SqlQueries.CreatePathwayAssessment(pathwayId2); SqlQueries.CreatePathwayResult(pathwayAssessmentId2); break; case "MathEng Achieved Min Standard": var profileId3 = SqlQueries.CreateRegistrationProfileForLrsCombination(uln, "NULL", "1", "NULL", "0"); var pathwayId3 = SqlQueries.CreateRegistrationPathwayForLrsCombination(profileId3); SqlQueries.CreateRegSpecialismForLrs(pathwayId3); SqlQueries.CreateQualificationAcheivedForLrs(profileId3); SqlQueries.CreateIndustryPlacement(pathwayId3, ipStat); var pathwayAssessmentId3 = SqlQueries.CreatePathwayAssessment(pathwayId3); SqlQueries.CreatePathwayResult(pathwayAssessmentId3); break; } }