public void Edit(int id) { target(Update, id); FooterMenu data = FooterMenu.GetById(id); if (data == null) { echoRedirect(lang("exDataNotFound")); return; } bind("data", data); }
public void Delete(int id) { FooterMenu data = FooterMenu.GetById(id); if (data == null) { echoRedirect(lang("exDataNotFound")); return; } data.delete(); log(SiteLogString.DeleteFooterMenu(), data); echoAjaxOk(); }
public void Update(int id) { FooterMenu data = FooterMenu.GetById(id); if (data == null) { echoRedirect(lang("exDataNotFound")); return; } data = validate(data); if (ctx.HasErrors) { run(Edit, id); return; } data.update(); log(SiteLogString.UpdateFooterMenu(), data); echoToParentPart(lang("opok")); }