C# Класс DBPOLLDemo.Controllers.QuestionController

Наследование: Controller
Показать файл Открыть проект

Открытые методы

Метод Описание
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

Приватные методы

Метод Описание
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

Описание методов

Create() публичный Метод

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
Результат System.Web.Mvc.ActionResult

CreateMultipleChoice() публичный Метод

public CreateMultipleChoice ( int pollid ) : System.Web.Mvc.ActionResult
pollid int
Результат System.Web.Mvc.ActionResult

CreateShortAnswer() публичный Метод

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
Результат System.Web.Mvc.ActionResult

Delete() публичный Метод

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
Результат System.Web.Mvc.ActionResult

Details() публичный Метод

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
Результат System.Web.Mvc.ActionResult

Edit() публичный Метод

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
Результат System.Web.Mvc.ActionResult

Index() публичный Метод

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
Результат System.Web.Mvc.ActionResult

Keypad() публичный Метод

public Keypad ( int qid ) : System.Web.Mvc.ActionResult
qid int
Результат System.Web.Mvc.ActionResult

Result() публичный Метод

public Result ( int aid ) : System.Web.Mvc.ActionResult
aid int
Результат System.Web.Mvc.ActionResult

Test() публичный Метод

public Test ( int questionid, String name, int num_response ) : System.Web.Mvc.ActionResult
questionid int
name String
num_response int
Результат System.Web.Mvc.ActionResult

viewQuestions() публичный Метод

public viewQuestions ( int pollid ) : System.Web.Mvc.ActionResult
pollid int
Результат System.Web.Mvc.ActionResult