-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathManageTableEdit.aspx.vb
55 lines (47 loc) · 1.74 KB
/
ManageTableEdit.aspx.vb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
Imports System
Imports System.Data
Imports System.Configuration
Imports System.Data.SqlClient
Imports System.Web
Imports System.Web.UI
Imports System.Web.Security
Imports System.Web.UI.WebControls
Imports System.Web.UI.HtmlControls
Imports System.Web.UI.WebControls.WebParts
Imports System.Drawing
Imports System.IO
Imports System.Text
Imports System.Security.Cryptography
Imports System.Net.Mail
Imports System.Net
Partial Class ManageTableEdit
Inherits System.Web.UI.Page
Public cn As New SqlConnection
Public cmd As New SqlCommand
Public da As SqlDataAdapter
Public dr As SqlDataReader
Public ds As DataSet = New DataSet
Public ConString As String = System.Configuration.ConfigurationManager.ConnectionStrings("dbconn").ConnectionString
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
MyCn()
CheckLogin()
End Sub
Public Sub MyCn()
If cn.State = Data.ConnectionState.Open Then cn.Close()
cn.ConnectionString = System.Configuration.ConfigurationManager.ConnectionStrings("dbconn").ConnectionString
End Sub
Protected Sub CheckLogin()
If Session("ssUserName") = "" Then
Me.Response.Redirect("Default.aspx")
End If
End Sub
Private Sub btnaddnewtable_Click(sender As Object, e As EventArgs) Handles btnaddnewtable.Click
Response.Redirect("ManageTableAdd.aspx")
End Sub
Private Sub btnedittable_Click(sender As Object, e As EventArgs) Handles btnedittable.Click
Response.Redirect("ManageTableEdit.aspx")
End Sub
Private Sub btnenabledisbaletable_Click(sender As Object, e As EventArgs) Handles btnenabledisbaletable.Click
Response.Redirect("ManageTableStatus.aspx")
End Sub
End Class