-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsend.aspx.vb
39 lines (35 loc) · 1.74 KB
/
send.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
Imports System.Configuration
Imports System.Data.OleDb
Imports System.Web.HttpApplicationState
Partial Class _Default
Inherits System.Web.UI.Page
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim con As New OleDbConnection
con.ConnectionString = ConfigurationManager.AppSettings("con")
con.Open()
Dim ds As New Data.DataSet
'íÊã ÌáÈ áÈíÇäÇÊ ãä ÇáÌÏæá
Dim dp As New OleDbDataAdapter("SELECT email.eml_no, email.eml_dsc, email.eml_r, email.eml_ur, email.eml_pers, email.eml_date, email.cmp_no FROM company INNER JOIN email ON company.cmp_no = email.cmp_no ", con)
' íÊã ÊÚÈÆÉ ÇáÏÇÊÇ ÓíÊ ÈÇáÌÏæá
dp.Fill(ds, "email")
Dim n As Date = Now
Dim a As Boolean = False
Dim b As Boolean = True
Dim s As New OleDbCommand
s.Connection = con
Dim q As Integer = 5
' s.CommandType = Data.CommandType.Text
' åäÇ íÊã ÇÖÇÝÉ Ìãáå ÇáÇÓ ßíæ Çá ÇáÎÇÕÉ ÈÇáÇÏÎÇá
s.CommandText = "insert into email ( eml_dsc, eml_r, eml_ur, eml_pers, eml_date,cmp_no)values ('" & Me.txtdsc.Text & "'," & a & "," & b & ",'" & Me.TextBox1.Text & "','" & n & "'," & Me.label1.text & ")"
'íÊã ÊäÝíÐ ÌãáÉ ÇáÇÓ ßíæ Çá
s.ExecuteNonQuery()
con.Close()
End Sub
Protected Sub Menu3_MenuItemClick(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.MenuEventArgs) Handles Menu3.MenuItemClick
End Sub
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
'Me.txteml.Text = Session("b")
Me.txtdsc.Text = Session("sub")
Me.Label1.Text = Session("no")
End Sub
End Class