Public Class Rocnik_odstranit
    Inherits System.Web.UI.Page

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

        Dim sID As String = Request.QueryString("id")
        If sID = "" Then Exit Sub
        If _UserID = "" Then Exit Sub

        DB.ExecuteCommand("DELETE FROM [projekty].[kategorie] WHERE id = '" & sID & "'")

        Dim pDelete As New PCSolution.DirectoryDelete
        Try
            Dim p As New PCSolution.DirectoryDelete
            p.Delete(_PathFoto & "\Projekty\" & sID)
        Catch ex As Exception
        End Try

        _NotifyText = "Kategorie je odstraněná."

        Response.Redirect(gadrProjekty_kategorie_seznam)

    End Sub

End Class