Files
VERAG_Homepage/admin/delHp.aspx.vb
2021-07-06 10:03:36 +02:00

52 lines
1.5 KiB
VB.net

Partial Class admin_InputBox
Inherits System.Web.UI.Page
Public laenderkuerzel As String = "de"
Public menueId As Integer = 1
Private DB As New cDBADMINFunctions
Dim hp_content As hp_content = Nothing
Public Overrides Sub VerifyRenderingInServerForm(control As Control)
End Sub
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
If Not IsPostBack Then 'ERSTES MAL
Page.Session("parentReload") = Nothing
Page.Session("close") = Nothing
' Page.Session("navParent") = "admin"
If Not Request.QueryString("lan") Is Nothing Then
laenderkuerzel = Request.QueryString("lan")
Else
laenderkuerzel = "de"
End If
If Not Request.QueryString("menuID") Is Nothing Then
menueId = Request.QueryString("menuID")
Else
menueId = 1
End If
hp_content = DB.qry_contentNew(menueId, laenderkuerzel)
Page.Session("hp_content") = hp_content
End If
End Sub
Protected Sub addPage_Click(sender As Object, e As EventArgs) Handles addPage.Click
Dim hp_content As hp_content = Nothing
hp_content = Page.Session("hp_content") 'sonst gehs ned, weil werte nicht geladfen sind
DB.deleteHpMenueAndContent(hp_content.hp_id)
Page.Session("parentReload") = "admin.aspx?menuID=1&lan=" & laenderkuerzel
End Sub
End Class