/// <summary> /// Handles the UniGrids's OnAction event. /// </summary> /// <param name="actionName">Name of item (button) that throws event</param> /// <param name="actionArgument">ID (value of Primary key) of corresponding data row</param> protected void gridElem_OnAction(string actionName, object actionArgument) { switch (actionName.ToLowerCSafe()) { case "delete": case "up": case "down": if (!CheckPermissions("cms.forums", PERMISSION_MODIFY)) { return; } break; } switch (actionName.ToLowerCSafe()) { case "delete": ForumInfoProvider.DeleteForumInfo(Convert.ToInt32(actionArgument)); break; case "up": ForumInfoProvider.MoveForumUp(Convert.ToInt32(actionArgument)); break; case "down": ForumInfoProvider.MoveForumDown(Convert.ToInt32(actionArgument)); break; } RaiseOnAction(actionName, actionArgument); }
private void Control_OnAction(string actionName, object actionArgument) { switch (actionName.ToLowerCSafe()) { case "delete": ForumInfoProvider.DeleteForumInfo(ValidationHelper.GetInteger(actionArgument, 0)); break; case "up": ForumInfoProvider.MoveForumUp(ValidationHelper.GetInteger(actionArgument, 0)); break; case "down": ForumInfoProvider.MoveForumDown(ValidationHelper.GetInteger(actionArgument, 0)); break; } }