-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstdcr-v.aspx.vb
61 lines (41 loc) · 1.67 KB
/
stdcr-v.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
56
57
58
59
60
61
Imports System.Data
Imports System.Data.Sql
Imports System.Data.SqlClient
Imports System.Configuration
Partial Class stdcr_v
Inherits System.Web.UI.Page
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
'Dim uid As String
'uid = Request.QueryString("i_id")
''If ((Not (IsPostBack)) And Request.QueryString("ed_com") = "") Then
''Else
''End If
'If (uid <> "" And Request.QueryString("ed_com") <> "" And Session("ed") = "") Then
' Dim con As SqlConnection
' con = New SqlConnection("Data Source=SHUBHAM\SRKING;Initial Catalog=carrentals;Integrated Security=True")
' con.Open()
' Dim query As String
' Session("ed") = "ok"
' query = "select * from carinform where i_id=" + uid
'End If
End Sub
Protected Sub btnreserv_Click(sender As Object, e As EventArgs) Handles btnreserv.Click
Dim con As New SqlConnection("Data Source=SHUBHAM\SRKING;Initial Catalog=carrentals;Integrated Security=True")
con.Open()
Dim str As String
str = "select * from carinform"
Dim cmd As New SqlCommand(str, con)
Dim da As New SqlDataAdapter(cmd)
Dim dt As New DataTable()
da.Fill(dt)
cmd.ExecuteNonQuery()
If dt.Rows.Count > 0 Then
Session("ucid") = dt.Rows(1)(0).ToString()
Session("uctype") = dt.Rows(1)(2).ToString()
Session("ucname") = dt.Rows(1)(3).ToString()
Session("ucrate") = dt.Rows(1)(4).ToString()
Response.Redirect("reserv.aspx")
End If
con.Close()
End Sub
End Class