Exemplo n.º 1
0
    private void Delete()
    {
        lbError.Visible = false;

        // Retrieve link type selected
        LinkType linkType = LinkType.GetByKey(linkTypeId);

        if (linkType != null)
        {
            if (linkType.Delete(HyperCatalog.Shared.SessionState.User.Id))
            {
                Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "back", "<script>back();</script>");
            }
            else
            {
                lbError.CssClass = "hc_error";
                lbError.Text     = LinkType.LastError;
                lbError.Visible  = true;
            }
        }
    }