C# 클래스 Engage.Survey.Entities.SurveyRepository

Provides access to store and retrieve surveys and related types
파일 보기 프로젝트 열기: EngageSoftware/Engage-Survey 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
SharedResourceFile string

공개 메소드들

메소드 설명
CreateAnswer ( int userId ) : Answer

Creates a new Answer instance, to be persisted when SubmitChanges is called.

CreateQuestion ( int userId ) : Question

Creates a new Question instance, to be persisted when SubmitChanges is called.

CreateResponse ( int responseHeaderId, int userId ) : Response

Creates a new Response instance, to be persisted when SubmitChanges is called.

CreateResponseHeader ( int userId ) : ResponseHeader

Creates a new ResponseHeader instance, to be persisted when SubmitChanges is called.

CreateSurvey ( int userId, int portalId, int moduleId ) : Survey

Creates a new Survey instance, to be persisted when SubmitChanges is called.

DeleteAnswers ( IEnumerable answers, bool pendForNextSubmit ) : void

Deletes the specified answers.

DeleteQuestion ( int questionId ) : void

Deletes the specified question.

DeleteReadOnlySurvey ( int responseHeaderId ) : void

Deletes the specified completed survey ResponseHeader and responses.

DeleteSurvey ( int surveyId, int moduleId ) : void

Deletes the specified survey.

GetModuleIdForQuestion ( int questionId ) : int

Gets the ID of the module that the given question belongs to.

GetModuleIdForSurvey ( int surveyId ) : int

Gets the ID of the module that the given survey belongs to.

LoadAnswerResponseCounts ( int surveyId ) : IQueryable>>>

Loads all of the questions, their answers, and the number of responses per answer for the given survey

LoadQuestions ( int surveyId ) : IQueryable

Loads all of the questions for the given survey (based on its current definition)

LoadReadOnlyAnswers ( int responseHeaderId, int questionId ) : IQueryable

Loads the completed answers for a given completed question.

LoadReadOnlyQuestion ( int responseHeaderId, int questionId ) : IQuestion

Loads the given completed question.

LoadReadOnlyQuestions ( int responseHeaderId, int sectionId ) : IQueryable

Loads the completed questions for a given completed section.

LoadReadOnlySection ( int responseHeaderId, int sectionId ) : ReadonlySection

Loads the given completed section.

LoadReadOnlySections ( int responseHeaderId, int surveyId ) : IQueryable

Loads the completed sections for a given completed survey.

LoadReadOnlySurvey ( int responseHeaderId, int moduleId ) : ReadonlySurvey

Loads a completed survey using the ResponseHeader ID for the User/Survey.

LoadResponses ( int surveyId ) : Response>>.IQueryable

Gets the responses for the given survey.

LoadSurvey ( int surveyId ) : Survey

Loads the survey.

LoadSurvey ( int surveyId, int moduleId ) : Survey

Loads the survey for the given module.

LoadSurveys ( int moduleId, bool getOutdatedSurveys ) : IQueryable

Loads all the surveys for a particular module instance.

LoadSurveysForPortal ( int portalId ) : IQueryable

Loads all the surveys for a particular portal instance.

SubmitChanges ( ) : void

Submits all changes for connected instances to the database.

SurveyRepository ( ) : System

Initializes a new instance of the SurveyRepository class.

UserHasTaken ( int userId, int surveyId ) : bool

Checks the database to determine if a user has taken the specified survey.

보호된 메소드들

메소드 설명
SurveyRepository ( SurveyModelDataContext context ) : System

Initializes a new instance of the SurveyRepository class.

비공개 메소드들

메소드 설명
LoadReadOnlySurveys ( ) : IQueryable

Loads all completed surveys.

메소드 상세

CreateAnswer() 공개 메소드

Creates a new Answer instance, to be persisted when SubmitChanges is called.
public CreateAnswer ( int userId ) : Answer
userId int The ID of the user creating the instance.
리턴 Answer

CreateQuestion() 공개 메소드

Creates a new Question instance, to be persisted when SubmitChanges is called.
public CreateQuestion ( int userId ) : Question
userId int The ID of the user creating the instance.
리턴 Question

CreateResponse() 공개 메소드

Creates a new Response instance, to be persisted when SubmitChanges is called.
public CreateResponse ( int responseHeaderId, int userId ) : Response
responseHeaderId int The ID of the that the instance is connected to.
userId int The ID of the user creating the instance.
리턴 Response

CreateResponseHeader() 공개 메소드

Creates a new ResponseHeader instance, to be persisted when SubmitChanges is called.
public CreateResponseHeader ( int userId ) : ResponseHeader
userId int The ID of the user creating the instance.
리턴 ResponseHeader

CreateSurvey() 공개 메소드

Creates a new Survey instance, to be persisted when SubmitChanges is called.
public CreateSurvey ( int userId, int portalId, int moduleId ) : Survey
userId int The ID of the user creating the instance.
portalId int The ID of the survey's portal.
moduleId int The ID of the module that owns the survey.
리턴 Survey

DeleteAnswers() 공개 메소드

Deletes the specified answers.
public DeleteAnswers ( IEnumerable answers, bool pendForNextSubmit ) : void
answers IEnumerable The answers to delete.
pendForNextSubmit bool /// if set to true pends the deletion to occur at the next call to ; /// otherwise, executes the deletion immediately (by calling ).
리턴 void

DeleteQuestion() 공개 메소드

Deletes the specified question.
public DeleteQuestion ( int questionId ) : void
questionId int The ID of the question.
리턴 void

DeleteReadOnlySurvey() 공개 메소드

Deletes the specified completed survey ResponseHeader and responses.
public DeleteReadOnlySurvey ( int responseHeaderId ) : void
responseHeaderId int The ID
리턴 void

DeleteSurvey() 공개 메소드

Deletes the specified survey.
public DeleteSurvey ( int surveyId, int moduleId ) : void
surveyId int The ID of the survey to delete.
moduleId int The ID of the module in which to find the survey.
리턴 void

GetModuleIdForQuestion() 공개 메소드

Gets the ID of the module that the given question belongs to.
public GetModuleIdForQuestion ( int questionId ) : int
questionId int The question's ID.
리턴 int

GetModuleIdForSurvey() 공개 메소드

Gets the ID of the module that the given survey belongs to.
public GetModuleIdForSurvey ( int surveyId ) : int
surveyId int The survey's ID.
리턴 int

LoadAnswerResponseCounts() 공개 메소드

Loads all of the questions, their answers, and the number of responses per answer for the given survey
public LoadAnswerResponseCounts ( int surveyId ) : IQueryable>>>
surveyId int The ID of the survey.
리턴 IQueryable>>>

LoadQuestions() 공개 메소드

Loads all of the questions for the given survey (based on its current definition)
public LoadQuestions ( int surveyId ) : IQueryable
surveyId int The ID of the survey.
리턴 IQueryable

LoadReadOnlyAnswers() 공개 메소드

Loads the completed answers for a given completed question.
public LoadReadOnlyAnswers ( int responseHeaderId, int questionId ) : IQueryable
responseHeaderId int The ID of the of the completed survey.
questionId int The ID of the question.
리턴 IQueryable

LoadReadOnlyQuestion() 공개 메소드

Loads the given completed question.
public LoadReadOnlyQuestion ( int responseHeaderId, int questionId ) : IQuestion
responseHeaderId int The ID of the of the completed survey.
questionId int The ID of the question.
리턴 IQuestion

LoadReadOnlyQuestions() 공개 메소드

Loads the completed questions for a given completed section.
public LoadReadOnlyQuestions ( int responseHeaderId, int sectionId ) : IQueryable
responseHeaderId int The ID of the of the completed survey.
sectionId int The ID of the section.
리턴 IQueryable

LoadReadOnlySection() 공개 메소드

Loads the given completed section.
public LoadReadOnlySection ( int responseHeaderId, int sectionId ) : ReadonlySection
responseHeaderId int The ID of the of the completed survey.
sectionId int The ID of the section.
리턴 ReadonlySection

LoadReadOnlySections() 공개 메소드

Loads the completed sections for a given completed survey.
public LoadReadOnlySections ( int responseHeaderId, int surveyId ) : IQueryable
responseHeaderId int The ID of the of the completed survey.
surveyId int The ID of the survey.
리턴 IQueryable

LoadReadOnlySurvey() 공개 메소드

Loads a completed survey using the ResponseHeader ID for the User/Survey.
public LoadReadOnlySurvey ( int responseHeaderId, int moduleId ) : ReadonlySurvey
responseHeaderId int The ID.
moduleId int The module ID.
리턴 ReadonlySurvey

LoadResponses() 공개 메소드

Gets the responses for the given survey.
public LoadResponses ( int surveyId ) : Response>>.IQueryable
surveyId int The ID of the survey for which to get responses.
리턴 Response>>.IQueryable

LoadSurvey() 공개 메소드

Loads the survey.
public LoadSurvey ( int surveyId ) : Survey
surveyId int The survey id.
리턴 Survey

LoadSurvey() 공개 메소드

Loads the survey for the given module.
public LoadSurvey ( int surveyId, int moduleId ) : Survey
surveyId int The survey ID.
moduleId int The module ID.
리턴 Survey

LoadSurveys() 공개 메소드

Loads all the surveys for a particular module instance.
public LoadSurveys ( int moduleId, bool getOutdatedSurveys ) : IQueryable
moduleId int The ID of the module by which surveys should be filtered.
getOutdatedSurveys bool Whether to retrieve surveys whose or is out of range for the current date
리턴 IQueryable

LoadSurveysForPortal() 공개 메소드

Loads all the surveys for a particular portal instance.
public LoadSurveysForPortal ( int portalId ) : IQueryable
portalId int The ID of the portal by which surveys should be filtered.
리턴 IQueryable

SubmitChanges() 공개 메소드

Submits all changes for connected instances to the database.
public SubmitChanges ( ) : void
리턴 void

SurveyRepository() 공개 메소드

Initializes a new instance of the SurveyRepository class.
public SurveyRepository ( ) : System
리턴 System

SurveyRepository() 보호된 메소드

Initializes a new instance of the SurveyRepository class.
protected SurveyRepository ( SurveyModelDataContext context ) : System
context SurveyModelDataContext The data context.
리턴 System

UserHasTaken() 공개 메소드

Checks the database to determine if a user has taken the specified survey.
public UserHasTaken ( int userId, int surveyId ) : bool
userId int The id of the user.
surveyId int The id of the survey.
리턴 bool

프로퍼티 상세

SharedResourceFile 공개적으로 정적으로 프로퍼티

The path to the resource file in which localized content for this class exists
public static string SharedResourceFile
리턴 string