public ActionResult AlterRecention(RecentionViewModel model) { if (ModelState.IsValid) { IUser user = Facade.GetUser(User.Identity.Name); user.AlterRecention(model); return RedirectToAction("Detail", "View", new { id = model.AppID }); } return View("WriteRecention", model); }
public ActionResult WriteRecention(RecentionViewModel recention) { if (ModelState.IsValid) { IUser user = Facade.GetUser(User.Identity.Name); user.AddRecension(recention); TempData["Message"] = string.Format("Sie haben die App '{0}' erfolgreich bewertet.", recention.AppName); return RedirectToAction("Detail", "View", new { id = recention.AppID }); } ViewBag.ErrorMessage = "App bewerten fehlgeschlagen. Bitte korregieren Sie ihre Daten."; return View(recention); }