private static int InsertRegistrationProfile(string uln) { var createRegistrationProfile = "Insert into TqRegistrationProfile values(" + uln + ", 'Db FirstName','Db LastName','2001-01-01',Null,Null,Null,Null,Null,GETDATE(),'System', GETDATE(),'System')"; var getRegProfileId = "Select top 1 id from TqRegistrationProfile where UniqueLearnerNumber='" + uln + "'"; SqlDatabaseConncetionHelper.ExecuteSqlCommand(createRegistrationProfile, ConnectionString); var profileId = SqlDatabaseConncetionHelper.ReadDataFromDataBase(getRegProfileId, ConnectionString); return((int)profileId.FirstOrDefault().FirstOrDefault()); }
private static int InsertSpecialismAssessment2(int specialismId) { var tlAssessmentSeriesId = Constants.TlAssessmentSeriesId; var createSpecialismAssessment = "Insert into TqSpecialismAssessment values('" + specialismId + "','" + tlAssessmentSeriesId + "',GETDATE(),Null,1,0,GETDATE(),'System',GETDATE(),'System')"; var getSpecialismAssessmentId = "select top 1 id from TqSpecialismAssessment where TqRegistrationSpecialismId = '" + specialismId + "'order by Id desc"; SqlDatabaseConncetionHelper.ExecuteSqlCommand(createSpecialismAssessment, ConnectionString); var specialismAssessmentId = SqlDatabaseConncetionHelper.ReadDataFromDataBase(getSpecialismAssessmentId, ConnectionString); return((int)specialismAssessmentId.FirstOrDefault().FirstOrDefault()); }
private static int InsertCoreAssessment(int pathwayId) { var pathwayAssessmentSeriesId = Constants.PathwayAssessmentSeriesId; var createPathwayAssessment = "Insert into TqPathwayAssessment values('" + pathwayId + "','" + pathwayAssessmentSeriesId + "',GETDATE(),NULL,1,0,GETDATE(),'System',Null,Null )"; var getRegPathwayId = "select top 1 id from TqPathwayAssessment where TqRegistrationPathwayId = '" + pathwayId + "'"; SqlDatabaseConncetionHelper.ExecuteSqlCommand(createPathwayAssessment, ConnectionString); var regPathwayId = SqlDatabaseConncetionHelper.ReadDataFromDataBase(getRegPathwayId, ConnectionString); return((int)regPathwayId.FirstOrDefault().FirstOrDefault()); }
private static int InsertRegistrationSpecialism2(int pathwayId) { var tlSpecialismId2 = Constants.VentilationSpecialismId; var createRegSpecialism = "Insert into TqRegistrationSpecialism values('" + pathwayId + "','" + tlSpecialismId2 + "',GETDATE(),NULL,1,0,GETDATE(),'System',Null,Null )"; var getSpecialismId = "select top 1 id from TqRegistrationSpecialism where TqRegistrationPathwayId = '" + pathwayId + "'order by Id desc"; SqlDatabaseConncetionHelper.ExecuteSqlCommand(createRegSpecialism, ConnectionString); var specialismId = SqlDatabaseConncetionHelper.ReadDataFromDataBase(getSpecialismId, ConnectionString); return((int)specialismId.FirstOrDefault().FirstOrDefault()); }
private static int InsertRegistrationPathway(int profileId) { var tqProviderId = Constants.CityAndGuildsProviderId; var createRegPathway = "Insert into TqRegistrationPathway values('" + profileId + "', '" + tqProviderId + "','2020', GETDATE(),NULL,1,1,GETDATE(),'System',NULL,NULL)"; var getRegPathwayId = "select top 1 id from TqRegistrationPathway where TqRegistrationProfileId = '" + profileId + "'"; SqlDatabaseConncetionHelper.ExecuteSqlCommand(createRegPathway, ConnectionString); var pathwayId = SqlDatabaseConncetionHelper.ReadDataFromDataBase(getRegPathwayId, ConnectionString); return((int)pathwayId.FirstOrDefault().FirstOrDefault()); }
protected static void RegisterWithdrawnLearnerWithAnotherAo(string uln) { var profileId = SqlQueries.ReturnRegistrationProfileID(uln); var createNewRegPathway = "Insert into TqRegistrationPathway values('" + profileId + "', '" + "15184" + "','2020', GETDATE(),NULL,1,1,GETDATE(),'System',NULL,NULL)"; SqlDatabaseConncetionHelper.ExecuteSqlCommand(createNewRegPathway, ConnectionString); //var profileId = SqlQueries.CreateRegistrationProfile(uln); //var pathwayId = SqlQueries.CreateRegistrationPathway(profileId); //SqlQueries.CreateRegSpecialism(pathwayId); //var pathwayAssessmentId = SqlQueries.CreatePathwayAssessment(pathwayId); //SqlQueries.CreatePathwayResult(pathwayAssessmentId); }
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); }
private static void InsertAssessmentResult(int specialismAssessmentId, int grade) { var createPathwayResult = "Insert into TqSpecialismResult values ('" + specialismAssessmentId + "','" + grade + "',GETDATE(),NULL,Null,1,0,GETDATE(),'SYSTEM',NULL,'SYSTEM')"; SqlDatabaseConncetionHelper.ExecuteSqlCommand(createPathwayResult, ConnectionString); }