C# Class DBPOLLDemo.Controllers.QuestionController

Inheritance: Controller
Afficher le fichier Open project: Marknel/dbPOLL

Méthodes publiques

Méthode Description
Create ( int pollid, String name ) : System.Web.Mvc.ActionResult

Returns the view with a choice between creating a short answer and multiple choice question.

CreateMultipleChoice ( int pollid ) : System.Web.Mvc.ActionResult
CreateShortAnswer ( int pollid ) : System.Web.Mvc.ActionResult

Returns view to create short answer questions. NOTE: Creation is not done here. Creation is performed in the [AcceptVerbs(HttpVerbs.Post)] which is the POST version of this method.

Delete ( int questionid, int id, String name ) : System.Web.Mvc.ActionResult

Calls the model method to delete Questions based on the Question ID and refreshes the view to display the updated list of questions. Currently all logged in user can delete question associated with their account. Need to enforce some type of Authorization based on user type.

Details ( int id, String name ) : System.Web.Mvc.ActionResult

Returns the answers associated with the chosen question.

Edit ( int questionid ) : System.Web.Mvc.ActionResult

Redirects to Edit view to allow modification of Question details.

Index ( int id, String name ) : System.Web.Mvc.ActionResult

Returns a view listing all the questions associated with a poll.

Keypad ( int qid ) : System.Web.Mvc.ActionResult
Result ( int aid ) : System.Web.Mvc.ActionResult
Test ( int questionid, String name, int num_response ) : System.Web.Mvc.ActionResult
viewQuestions ( int pollid ) : System.Web.Mvc.ActionResult

Private Methods

Méthode Description
CreateMultipleChoice ( String num, int questiontype, String question, int chartstyle, int pollid ) : System.Web.Mvc.ActionResult
CreateShortAnswer ( int shortanswertype, String num, String question, int chartstyle, int pollid ) : System.Web.Mvc.ActionResult
Edit ( int questionid, int questiontype, String question, int chartstyle, int num, System.DateTime createdat, int pollid ) : System.Web.Mvc.ActionResult
viewQuestions ( int pollid, String date1, String date2 ) : System.Web.Mvc.ActionResult

Method Details

Create() public méthode

Returns the view with a choice between creating a short answer and multiple choice question.
public Create ( int pollid, String name ) : System.Web.Mvc.ActionResult
pollid int Poll to create question for
name String
Résultat System.Web.Mvc.ActionResult

CreateMultipleChoice() public méthode

public CreateMultipleChoice ( int pollid ) : System.Web.Mvc.ActionResult
pollid int
Résultat System.Web.Mvc.ActionResult

CreateShortAnswer() public méthode

Returns view to create short answer questions. NOTE: Creation is not done here. Creation is performed in the [AcceptVerbs(HttpVerbs.Post)] which is the POST version of this method.
public CreateShortAnswer ( int pollid ) : System.Web.Mvc.ActionResult
pollid int
Résultat System.Web.Mvc.ActionResult

Delete() public méthode

Calls the model method to delete Questions based on the Question ID and refreshes the view to display the updated list of questions. Currently all logged in user can delete question associated with their account. Need to enforce some type of Authorization based on user type.
public Delete ( int questionid, int id, String name ) : System.Web.Mvc.ActionResult
questionid int
id int Question ID to be deleted
name String
Résultat System.Web.Mvc.ActionResult

Details() public méthode

Returns the answers associated with the chosen question.
public Details ( int id, String name ) : System.Web.Mvc.ActionResult
id int Selected Question ID
name String
Résultat System.Web.Mvc.ActionResult

Edit() public méthode

Redirects to Edit view to allow modification of Question details.
public Edit ( int questionid ) : System.Web.Mvc.ActionResult
questionid int Question designated to be edited
Résultat System.Web.Mvc.ActionResult

Index() public méthode

Returns a view listing all the questions associated with a poll.
public Index ( int id, String name ) : System.Web.Mvc.ActionResult
id int
name String
Résultat System.Web.Mvc.ActionResult

Keypad() public méthode

public Keypad ( int qid ) : System.Web.Mvc.ActionResult
qid int
Résultat System.Web.Mvc.ActionResult

Result() public méthode

public Result ( int aid ) : System.Web.Mvc.ActionResult
aid int
Résultat System.Web.Mvc.ActionResult

Test() public méthode

public Test ( int questionid, String name, int num_response ) : System.Web.Mvc.ActionResult
questionid int
name String
num_response int
Résultat System.Web.Mvc.ActionResult

viewQuestions() public méthode

public viewQuestions ( int pollid ) : System.Web.Mvc.ActionResult
pollid int
Résultat System.Web.Mvc.ActionResult