C# Class Rock.Model.DiscService

DISC Class for administering and scoring a DISC Assessment
Exibir arquivo Open project: NewSpring/Rock Class Usage Examples

Public Methods

Method Description
DetermineNaturalPersonalityType ( AssessmentResults results ) : string

Determines the natural personality type. This is the highest score and the next highest if the score is over the midline (we're definining midline as over 24).

GetResponses ( ) : List

Fetch a List of ResponseItem for display/processing.

GetResponsesByQuestion ( ) : ].String[

Returns the datasource. Each row is a question, comprised of four responses followed by a 'more' and 'less' score.

LoadSavedAssessmentResults ( Person person ) : AssessmentResults

Loads and returns saved Assessment scores for the Person.

PlotOneGraph ( System barD, System barI, System barS, System barC, int scoreD, int scoreI, int scoreS, int scoreC, int maxScale ) : void

Plots the one DISC graph.

SaveAssessmentResults ( Person person, string ABd, string ABi, string ABs, string ABc, string NBd, string NBi, string NBs, string NBc, string personalityType ) : void

Saves Assessment results to a Person's PersonProperties

Score ( int moreN, int moreD, int moreI, int moreS, int moreC, int lessN, int lessD, int lessI, int lessS, int lessC ) : AssessmentResults

Scores the test.

Private Methods

Method Description
AttributeValueLookup ( Person person, string attrib ) : int

Fetches DISC scores.

Method Details

DetermineNaturalPersonalityType() public static method

Determines the natural personality type. This is the highest score and the next highest if the score is over the midline (we're definining midline as over 24).
public static DetermineNaturalPersonalityType ( AssessmentResults results ) : string
results AssessmentResults The AssessmentResults
return string

GetResponses() static public method

Fetch a List of ResponseItem for display/processing.
static public GetResponses ( ) : List
return List

GetResponsesByQuestion() static public method

Returns the datasource. Each row is a question, comprised of four responses followed by a 'more' and 'less' score.
static public GetResponsesByQuestion ( ) : ].String[
return ].String[

LoadSavedAssessmentResults() static public method

Loads and returns saved Assessment scores for the Person.
static public LoadSavedAssessmentResults ( Person person ) : AssessmentResults
person Person The Person to get the scores for.
return AssessmentResults

PlotOneGraph() public static method

Plots the one DISC graph.
public static PlotOneGraph ( System barD, System barI, System barS, System barC, int scoreD, int scoreI, int scoreS, int scoreC, int maxScale ) : void
barD System The D bar.
barI System The I bar.
barS System The S bar.
barC System The C bar.
scoreD int The D score.
scoreI int The I score.
scoreS int The S score.
scoreC int The C score.
maxScale int Highest score which is used for the scale of the chart.
return void

SaveAssessmentResults() static public method

Saves Assessment results to a Person's PersonProperties
static public SaveAssessmentResults ( Person person, string ABd, string ABi, string ABs, string ABc, string NBd, string NBi, string NBs, string NBc, string personalityType ) : void
person Person
ABd string Adaptive Behavior D
ABi string Adaptive Behavior I
ABs string Adaptive Behavior S
ABc string Adaptive Behavior C
NBd string Natural Behavior D
NBi string Natural Behavior I
NBs string Natural Behavior S
NBc string Natural Behavior C
personalityType string One or two letters of DISC that represents the personality.
return void

Score() static public method

Scores the test.
static public Score ( int moreN, int moreD, int moreI, int moreS, int moreC, int lessN, int lessD, int lessI, int lessS, int lessC ) : AssessmentResults
moreN int The more n.
moreD int The more d.
moreI int The more i.
moreS int The more s.
moreC int The more c.
lessN int The less n.
lessD int The less d.
lessI int The less i.
lessS int The less s.
lessC int The less c.
return AssessmentResults