您目前尚未登陆,请选择【登陆】或【注册
首页->全站代码->汽车配件公司网站(VB.net+Access数据库)源码>>order.aspx.vb>>源码在线查看
温馨提示:代码在线浏览功能只能做为源码浏览参考,如果想更进一步了解该代码请下载:汽车配件公司网站(VB.net+Access数据库)源码
当前文件:文件类型 VbNetCompany/order.aspx.vb打开代码结构图
普通视图
		            
1Imports System 2Imports System.Data 3Imports System.Configuration 4Imports System.Collections 5Imports System.Web 6Imports System.Web.Security 7Imports System.Web.UI 8Imports System.Web.UI.WebControls 9Imports System.Web.UI.WebControls.WebParts 10Imports System.Web.UI.HtmlControls 11Imports System.Data.OleDb 12 13Public Partial Class order 14 Inherits System.Web.UI.Page 15 Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) 16 17 End Sub 18 Protected Sub Button1_Click(ByVal sender As Object, ByVal e As EventArgs) 19 Try 20 Dim p_name1 As String = "" 21 Dim p_type1 As String = "" 22 Dim p_count1 As String = "" 23 Dim p_connect1 As String = "" 24 Dim p_phone1 As String = "" 25 Dim p_text1 As String = "" 26 Using oleconn As New OleDbConnection() 27 oleconn.ConnectionString = ConfigurationManager.ConnectionStrings("oleConnectionString").ConnectionString 28 oleconn.Open() 29 If p_name.Text IsNot Nothing AndAlso p_name.Text <> "" Then 30 p_name1 = p_name.Text 31 End If 32 If p_type.Text IsNot Nothing AndAlso p_type.Text <> "" Then 33 p_type1 = p_type.Text 34 End If 35 If p_count.Text IsNot Nothing AndAlso p_count.Text <> "" Then 36 p_count1 = p_count.Text 37 End If 38 If p_connect.Text IsNot Nothing AndAlso p_connect.Text <> "" Then 39 p_connect1 = p_connect.Text 40 End If 41 If p_phone.Text IsNot Nothing AndAlso p_phone.Text <> "" Then 42 p_phone1 = p_phone.Text 43 End If 44 If p_text.Text IsNot Nothing AndAlso p_text.Text <> "" Then 45 p_text1 = p_text.Text 46 End If 47 Dim strSQL As String = "Insert INTO orderlist(p_name,p_type,p_count,p_connect,p_phone,p_text) Values('" + p_name1 + "','" + p_type1 + "','" + p_count1 + "','" + p_connect1 + "','" + p_phone1 + "','" + p_text1 + "')" 48 Dim command As New OleDbCommand(strSQL, oleconn) 49 command.ExecuteNonQuery() 50 51 oleconn.Close() 52 oleconn.Dispose() 53 Response.Write("<script language='javascript'>window.confirm('您的订单已经提交,我们会立即给您答复!!');</script>") 54 Response.Write("<script language='javascript'>parent.window.history.go(-1);</script>") 55 End Using 56 Catch err As Exception 57 Dim str As String = err.Message.Replace("'", "") 58 Response.Write("<script>alert('" + str + "');</script>") 59 End Try 60 End Sub 61End Class
还没有找到您心仪的内容?请用.net源码大搜捕
代码片断 打包下载该项目完整源码:汽车配件公司网站(VB.net+Access数据库)源码
51Aspx.com 版权所有 CopyRight © 2000-2008. 京ICP备06046876号