public void Delete(int id) { ForumPickedImg f = ForumPickedImg.findById(id); if (f == null) { echo(lang("exDataNotFound")); return; } f.delete(); redirect(Index); }
public void Edit(int id) { target(Update, id); ForumPickedImg f = ForumPickedImg.findById(id); if (f == null) { echo(lang("exDataNotFound")); return; } bind("f", f); }
public void Update(int id) { ForumPickedImg f = ForumPickedImg.findById(id); if (f == null) { echo(lang("exDataNotFound")); return; } f = ctx.PostValue(f) as ForumPickedImg; Result result = f.update(); if (result.HasErrors) { run(Add); } else { echoToParentPart(lang("opok")); } }