releasenotice.aspx.vb
来自「毕业设计+图书管理系统+源码 需要的人下载。」· VB 代码 · 共 37 行
VB
37 行
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 + =
减小字号Ctrl + -
显示快捷键?