📄 releasenotice.aspx.vb
字号:
Partial Class Administrator_ReleaseNotice
Inherits System.Web.UI.Page
Protected Sub btnRelease_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnRelease.Click
Dim newnotice As New Notice
newnotice.DateTime = System.DateTime.Today
newnotice.NoticeObject = ddlObject.Text
newnotice.NoticeTitle = txtTitle.Text
newnotice.NoticeContent = txtContent.Text
newnotice.NoticeNo = System.DateTime.Today + txtNum.Text
If newnotice.ReleaseNotice() = 1 Then
lblShow.Text = "发布成功!"
Else
lblShow.Text = "编号错误!"
End If
lblShow.Visible = True
End Sub
Protected Sub btnCancel_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnCancel.Click
txtTitle.Text = ""
txtNum.Text = ""
txtContent.Text = ""
lblShow.Visible = False
End Sub
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If Session("role") = "管理员" Then
Else
Response.Redirect("~/Default.aspx")
End If
End Sub
End Class
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -