【正文】
ion ()End Try 39?!?+ temp1 + “39。If(Trim(user)= Trim(temp1)And Trim(pw)= Trim(temp2)And(user “ Or pw ”“))Then 39。 (con)39。ElseIf(user = ”“ And pw = ”“)Then 39。 ()39。ElseIf(Trim(user) Trim(temp1)Or Trim(pw) Trim(temp2))Then 39。 ()39。 singe = 0 39。count = count + 1 39。 (”三次錯(cuò)誤,退出本系統(tǒng)“, ”提示“)39。End If End Sub Private Sub Button2_Click(ByVal sender As , ByVal e As )Handles End Sub Private Sub Form7_Load(ByVal sender As , ByVal e As )Handles () = = = = = End Sub End Class 訂票界面代碼:Public Class 訂票Private Sub Button1_Click(ByVal sender As , ByVal e As )Handles Dim i As Integer If = ”“ Then i = MsgBox(”客戶號不能為空“, , ”警告“)Else Dim conn As String = ”data source=.。User ID=sa。12339?!?Dim objconn1 As New SqlConnection(conn)()Dim 客戶號 As New SqlParameter(”客戶號“, , 4)Dim 客戶姓名 As New SqlParameter(”客戶姓名“, , 10)Dim 起飛地 As New SqlParameter(”起飛地“, , 50)Dim 目的地 As New SqlParameter(”目的地“, , 50)Dim 票價(jià) As New SqlParameter(”票價(jià)“, , 4)Dim 飛行時(shí)間 As New SqlParameter(”飛行時(shí)間“, , 4)Dim 航空公司 As New SqlParameter(”航空公司“, , 50)Dim strin As String strin = ”insert into flyernb(客戶號,客戶姓名,起飛地,目的地,票價(jià),飛行時(shí)間,航空公司)values(客戶號,客戶姓名,起飛地,目的地,票價(jià),飛行時(shí)間,航空公司)“ Dim objcmd1 As New SqlCommand(strin, objconn1)(客戶號)(客戶姓名)(起飛地)(目的地)(票價(jià))(飛行時(shí)間)(航空公司) = = = () = () = = = ()()()MsgBox(”訂票成功!“) = ”“ = ”“ = ”“ = ”“ = ”“ ()= ”“ ()= ”“ End If End Sub Private Sub Button2_Click(ByVal sender As , ByVal e As )Handles ()End Sub End Class 退票界面代碼:Public Class 退票Private Sub Button1_Click(ByVal sender As , ByVal e As )Handles Dim i As Integer i = MsgBox(”確定要退票嗎?“, , ”警告“)If i = Then Close()Else Dim conn As String = ”data source=.。User ID=sa。12339。“ Dim objconn1 As New SqlConnection(conn)39?!?amp。 ”39。connect timeout=300。Password=39。initial catalog=Ticket。()Dim strsql As String = ”delete from flyernb where 客戶號=39。 Trim()amp?!?()Dim objcmd As New SqlCommand(strsql, objconn1)()()()MsgBox(”刪除成功!“) = ”“ End If End Sub Private Sub Button2_Click(ByVal sender As , ByVal e As )Handles ()End Sub End Class 航線信息代碼:Public Class 航線信息Inherits Region ” Windows 窗體設(shè)計(jì)器生成的代碼“ Public Sub New()()39。InitializeComponent()39。窗體重寫dispose 以清理組件列表。Windows 窗體設(shè)計(jì)器所必需的Private ponents As 39。可以使用Windows 窗體設(shè)計(jì)器修改此過程。不要使用代碼編輯器修改它。39。 ()()()()()()()()()()()()()()()()()()()()()() = New (”宋體“, !, , , CType(134, Byte)) = New (8, 8) = ”GroupBox1“ = New (488, 344) = 0 = False = ”航線信息“ 39。TextBox10 39。39。 = New (128, 32) = ”TextBox9“ = New (100, 23) = 21 39。Label11 = New (24, 32) = ”Label11“ = New (100, 23) = 20 = ”航線編號“ 39。TextBox8 39。TextBox7 = New (130, 237) = ”TextBox7“ = New (100, 23) = 16 39。TextBox5 = New (128, 182) = ”TextBox5“ = New (100, 23) = 14 39。TextBox3 39。TextBox2 = New (376, 72) = ”TextBox2“ = New (100, 23) = 1139。TextBox1 = New (128, 72) = ”TextBox1“ = New (100, 23) = 10 39。 = New (24, 288) = ”Label10“ = New (88, 23) = 9 = ”備注信息“ 39。Label8 = New (270, 237) = ”Label8“ = New (100, 23) = 7 = ”公務(wù)艙價(jià)格“ 39。Label6 = New (22, 185) = ”Label6“ = New (100, 23) = 5 = ”客機(jī)編號“ 39。Label4 = New (270, 128) = ”Label4“ = New (100, 23) = 3 = ”到達(dá)時(shí)間“ 39。 = New (270, 35) = ”Label3“ = New (100, 23) = 2 = ”航班日期“ 39。Label139。39。 = New (”宋體“, !, , , CType(134, Byte)) = New (104, 360) = ”Button1“ = New (104, 40) = 1 = ”保存“ 39。39。 = New (6, 14) = New (504, 414)()()() = CType((”$“), ) = ”航線信息“ = = ”航線信息“ (False)()(False)End Sub End Region Private Sub 航線信息_Load(ByVal sender As , ByVal e As )Handles ct = 31 ()()If(mytemp = 0)Then = ”添加“ Else = ”修改“ End If Dim ds As DataSet Dim con As String Dim count, i As Integer con = ”select * from airlineinfo“ ds = (con)count = (0). For i = 0 To count2 = (0).Rows(i)(Trim(CStr((”航班日期“))))Next End Sub Private Sub Button1_Click(ByVal sender As , ByVal e As )Handles Dim con As String Dim con1 As String Dim ano, dd, dt, at, pno, cp, cap, fp As String Dim dc, ac, am As String Dim signe As Integer = 1 ano = dc = ac = dd = pno = dt = at = cp = cap = fp = am = con = ”select * from airlineinfo where 航線編號=39。“ Dim ds As DataSet Try ds = (con)Catch ex As Exception ()End Try Try If((0). 0 And mytemp = 0)Then = (0).Rows(0)If (”航線編號“) 0 Then MsgBox(”已存在該航線!“)()signe = 0 End If End If Catch ex As Exception ()End Try If = ”“ Then MsgBox(”航線編號不能為空!“)()ElseIf(signe = 1 Or mytemp = 1)Then con1 = ”delete from airlineinfo where 航線編號=39?!?con = ”insert into airlineinfo values(39。,39。,39。,39。,39。,39。,39。,39。,39。,39。,39。)“ Try (con1)Catch ex As Exception ()End Try Try (con)If(mytemp = 0)Then MsgBox(”添加成功!“)End If If(mytemp = 1)Then MsgBox(”修改成功!“)End If Catch ex As Exception ()End Try = ”“ = ”“ = ”“ = ”“ = ”“ = ”“ = ”“ = ”“ = ”“ = ”“ = ”“ End If End Sub Private Sub Button2_Click(ByVal sender As , ByVal e As )Handles ()End Sub Private Sub GroupBox1_Enter(ByVal sender As , ByVal e As )Handles End Sub End Class 添加用戶代碼:Public Class 添加用戶Inherits Region ” Windows 窗體設(shè)計(jì)器生成的代碼“ Public Sub New()()39。InitializeComponent()39。窗體重寫dispose 以清理組件列表。Windows 窗體設(shè)計(jì)器所必需的Private ponents As 39??梢允褂肳indows 窗體設(shè)計(jì)器修改此過程。不要使用代碼編輯器修改它。Label139。39。Label3 = New (”宋體“, !, , , CType(134, Byte)) = New (55, 121) = ”Label3“ = New (100, 23) = 2 = ”新密碼“ 39。TextBox1 = New (224, 32) = ”TextBox1“ = New (100, 21) = 4 39。TextBox3 = New (224, 120) = ”TextBox3“ = (42) = New (100, 21) = 6 39。39。 = New (”宋體“, !, , , CType(134, Byte)) = New (48, 208) = ”Button1“ = New (88, 40) = 8 = ”確定“ 39。添加用戶 39?!?+ + ”39?!?+ user + ”39?!?+ pw2 + ”39。“ + name + ”39。null39。typedef struct node//定義信息結(jié)構(gòu)體 {char num[10]。//起飛時(shí)間小時(shí)int minitues。//起始char end[10]。//經(jīng)濟(jì)艙票價(jià)int last。