Exemplo n.º 1
0
    /// <summary>
    /// Deletes layout. Called when the "Delete layout" button is pressed.
    /// Expects the CreateLayout method to be run first.
    /// </summary>
    private bool DeleteLayout()
    {
        // Get the layout
        LayoutInfo deleteLayout = LayoutInfoProvider.GetLayoutInfo("MyNewLayout");

        // Delete the layout
        LayoutInfoProvider.DeleteLayoutInfo(deleteLayout);

        return(deleteLayout != null);
    }
Exemplo n.º 2
0
 /// <summary>
 /// Handles the UniGrid's OnAction event.
 /// </summary>
 /// <param name="actionName">Name of item (button) that threw event</param>
 /// <param name="actionArgument">ID (value of Primary key) of corresponding data row</param>
 protected void UniGridModules_OnAction(string actionName, object actionArgument)
 {
     if (actionName == "edit")
     {
         URLHelper.Redirect("PageLayout_Frameset.aspx?layoutId=" + actionArgument.ToString());
     }
     else if (actionName == "delete")
     {
         LayoutInfoProvider.DeleteLayoutInfo(Convert.ToInt32(actionArgument));
     }
 }