The Polls module creates and works with three kinds of data:
- PollItem
- QuestionItem
- AnswerItem
PollItem represents a poll, QuestionItem represents the question in a poll, and AnswerItem is a possible answer to
a given question in a poll. The PollItem object implements the IPollItem interface, the QuestionItem object implements
the IQuestionItem interface, and the AnswerItem object implements the IAnswerItem interface. Since you will
be working with the objects of IPollItem, IQuestionItem and IAnswerItem types, first take a look at a
description of the three interfaces and their members.
IPollItem Members
| Member name |
Member type |
Comments |
| ID |
Guid |
Unique identifier (Primary key) of the poll. |
| Title |
string |
Name/Title of the poll. |
| Owner |
string |
Username of the user who has created the poll. |
| Questions |
IList |
List of IQuestionItem objects belonging to this poll. |
| VoterNumber |
int |
Number of people who have voted in the poll. |
IQuestionItem Members
| Member name |
Member type |
Comments |
| ID |
Guid |
Unique identifier (Primary key) of the QuestionItem. |
| Text |
string |
Text of the question. |
| Answers |
IList |
List of IAnswerItem objects belonging to this question. |
| Poll |
IPollItem |
PollItem object to which this QuestionItem belongs. |
| SortOrder |
int |
The ordinal number of the question in the poll it belongs to. (For example, "2" means this question is the third one for the poll.) |
| Layout |
QuestionLayout |
Layout of the question that defines how it will be displayed. QuestionLayout is an enumeration which consists of the following
possibilities:
- RadioButton
- Checkbox
- DropDownList
|
| PollID |
Guid |
The ID of the PollItem to which this question belongs. |
IAnswerItem Members
| Member name |
Member type |
Comments |
| ID |
Guid |
Unique identifier (Primary key) of the AnswerItem. |
| Text |
string |
Text of the answer. |
| VoteCount |
int |
Number of people who have voted for this answer. |
| SortOrder |
int |
The ordinal number of the answer in the question it belongs to. (For example, "0" means this answer is the first one for the question.) |
| ChartColor |
int |
The number that defines the color with which this answer will be displayed. |
| Question |
IQuestionItem |
QuestionItem object to which this AnswerItem belongs. |
| QuestionID |
Guid |
The ID of the QuestionItem to which this answer belongs. |
| Percentage |
double |
Percentage of votes for this answer compared to all available answers. |
See Also