private Edit ( int id ) : System.Web.Mvc.ActionResult | ||
id | int | |
return | System.Web.Mvc.ActionResult |
public ActionResult Edit(int id)
{
PostModel post = _posty.PobierzPost(id);
TagModel tagi = _tagi.PobierzTagPosta(post.Id);
if (post == null)
return RedirectToAction("Index", "Home");//no such post
else
{
if (tagi == null)
tagi = new TagModel { IdPosta = id, Desc = "", Keywords = "" };
ViewData["post"] = post;
ViewData["tagi"] = tagi;
}
return View();
}
AdminController::Edit ( int id, System.Web.Mvc.FormCollection collection ) : System.Web.Mvc.ActionResult |