Public Class Projekty_foto_odstranit
    Inherits System.Web.UI.Page

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

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

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

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

        _NotifyText = gstrFotografieJeOdstranena

        Response.Redirect("/zaznamid-" & sKategorieID & "-" & sProjektID & gadrProjekt_upravit)

    End Sub

End Class