public void Mod() { if (CheckAjax()) { if (CheckRight()) { if (IsPost) { M.FriendLink link = new M.FriendLink() { Id = int.Parse(Request["Id"]), Name = Request["Name"], Url = Request["Url"], Image = Request["Image"], SortNum = int.Parse(Request["SortNum"]), Approved = Types.GetBooleanFromString(Request["Approved"]) }; SetResult(link.Update(DataSource), () => { WritePostLog("MOD"); }); } else { NotFound(); } } } }
public void Del() { if (CheckAjax()) { if (CheckRight()) { if (IsPost) { M.FriendLink link = new M.FriendLink() { Id = int.Parse(Request["Id"]) }; SetResult(link.Delete(DataSource), () => { WritePostLog("DEL"); }); } else { NotFound(); } } } }