コード例 #1
0
 public ActionResult DeletePollQuestion(PollQuestion question)
 {
     DBNLDataContext db = new DBNLDataContext();
     db.PollQuestions.DeleteOnSubmit(question);
     db.SubmitChanges();
     return RedirectToAction("ListPollQuestions");
 }
コード例 #2
0
 public ActionResult EditPollQuestion(int id, PollQuestion question)
 {
     DBNLDataContext db = new DBNLDataContext();
     PollQuestion updPollQuestion = db.PollQuestions.Where(p => p.Id == id).SingleOrDefault();
     updPollQuestion.CreatedDate = question.CreatedDate;
     updPollQuestion.PollId = question.PollId;
     updPollQuestion.Status = question.Status;
     updPollQuestion.UpdatedDate = updPollQuestion.UpdatedDate;
     updPollQuestion.Question = question.Question;
     updPollQuestion.Responses = question.Responses;
     db.SubmitChanges();
     return RedirectToAction("ListPollQuestions");
 }
コード例 #3
0
		private void detach_PollQuestions(PollQuestion entity)
		{
			this.SendPropertyChanging();
			entity.Poll = null;
		}
コード例 #4
0
		private void attach_PollQuestions(PollQuestion entity)
		{
			this.SendPropertyChanging();
			entity.Poll = this;
		}
コード例 #5
0
 partial void DeletePollQuestion(PollQuestion instance);
コード例 #6
0
 partial void UpdatePollQuestion(PollQuestion instance);
コード例 #7
0
 partial void InsertPollQuestion(PollQuestion instance);