C# 클래스 DBPOLLDemo.Controllers.QuestionController

상속: Controller
파일 보기 프로젝트 열기: Marknel/dbPOLL

공개 메소드들

메소드 설명
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