Exemple #1
0
    /// <summary>
    /// Deletes staging server. Called when the "Delete server" button is pressed.
    /// Expects the CreateStagingServer method to be run first.
    /// </summary>
    private bool DeleteStagingServer()
    {
        // Get the staging server
        ServerInfo deleteServer = ServerInfoProvider.GetServerInfo("MyNewServer", SiteContext.CurrentSiteID);

        // Delete the staging server
        ServerInfoProvider.DeleteServerInfo(deleteServer);

        return(deleteServer != null);
    }
Exemple #2
0
        /// <inheritdoc/>
        public void Delete(IServer server)
        {
            // Gets the staging server
            ServerInfo deleteServer = ServerInfoProvider.GetServerInfo(server.ServerName, server.ServerSiteID);

            if (deleteServer != null)
            {
                // Deletes the staging server
                ServerInfoProvider.DeleteServerInfo(deleteServer);
            }
        }
Exemple #3
0
    /// <summary>
    /// Handles the UniGrid'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 uniGrid_OnAction(string actionName, object actionArgument)
    {
        switch (actionName.ToLower())
        {
        case "edit":
            string detailUrl = "Server_Edit.aspx?serverid=" + Convert.ToString(actionArgument);
            detailUrl = URLHelper.AddParameterToUrl(detailUrl, "hash", QueryHelper.GetHash(detailUrl));

            URLHelper.Redirect(detailUrl);
            break;

        case "delete":
            ServerInfoProvider.DeleteServerInfo(Convert.ToInt32(actionArgument));
            break;
        }
    }