public ActionResult SetScore(int id) { QuanswerViewModel model = new QuanswerViewModel() { Quanswer = askanserManager.GetAnswerForMyQuestion(id) }; return(View(model)); }
public async Task <ActionResult> SetScore(QuanswerViewModel RedeemModel) { if (ModelState.IsValid) { bool flag = askanserManager.SetScore(RedeemModel.Quanswer.AnsId, RedeemModel.Score); if (flag) { return(Redirect("/")); } } return(View(RedeemModel)); }