毕业论文论文范文课程设计实践报告法律论文英语论文教学论文医学论文农学论文艺术论文行政论文管理论文计算机安全
您现在的位置: 毕业论文 >> 论文 >> 正文

ASP.NET电子客票系统 第6页

更新时间:2007-11-21:  来源:毕业论文

ASP.NET电子客票系统 第6页

5.6 付款退订页面

 

代码:

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

        num.Text = Request.QueryString("a2")

        Dim myconnection As SqlConnection

        myconnection = New SqlConnection("server=(local);uid=sa;password=123;database=电子客票")

        Dim sql As String

        sql = "select * from 订票信息表 where 订票编号= '" & num.Text & "'"

        Dim selectcommand As SqlCommand = New SqlCommand(sql, myconnection)

        Dim reader As SqlDataReader

        myconnection.Open()

        reader = selectcommand.ExecuteReader()

        reader.Read()

        username.Text = reader.Item("客户姓名")

        airnum.Text = reader.Item("航线编号")

        takeuptime.Text = reader.Item("出发日期")

        takeup.Text = reader.Item("出发城市")

        takedown.Text = reader.Item("到达城市")

        price.Text = reader.Item("舱位价格")

        cangwei.Text = reader.Item("舱位类型")

        myconnection.Close()

    End Sub

 

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

        Dim myconnection As SqlConnection

        myconnection = New SqlConnection("server=(local);uid=sa;password=123;database=电子客票")

        Dim sql As String

        sql = "update 订票信息表 set 是否结算='' where 订票编号= '" & num.Text & "'"

        Dim selectcommand As SqlCommand = New SqlCommand(sql, myconnection)

        myconnection.Open()

        selectcommand.ExecuteNonQuery()

        Response.Write("<script languaage='javascript'>alert('确认付款!')</script>")

        Response.Redirect("付款退定.aspx")

        myconnection.Close()

    End Sub

 

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click

        Dim myconnection As SqlConnection

        myconnection = New SqlConnection("server=(local);uid=sa;password=123;database=电子客票")

        Dim sql As String

        sql = "delete from 订票信息表 where 订票编号= '" & num.Text & "'"

        Dim selectcommand As SqlCommand = New SqlCommand(sql, myconnection)

        myconnection.Open()

        selectcommand.ExecuteNonQuery()

        myconnection.Close()

        Response.Write("<script languaage='javascript'>alert('确认删除!')</script>")

        Response.Redirect("付款退定.aspx")

End Sub

5.1.3用户资料管理界面

用户登录后可以通过该页查看自己注册资料,点击修改并可以对想要修改的项目进行修改。

用户资料修改界面设计如图5.7 5.8 5.9所示

5.7 用户资料查看界面

代码:

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

        userid.Text = Session("用户编号")

        username.Text = Session("用户名")

        If userid.Text = "" Then

            Response.Write("<script languaage='javascript'>alert('请先登陆!')</script>")

            Response.Redirect("登陆.aspx")

        Else

            Dim myconnection As SqlConnection

            myconnection = New SqlConnection("server=(local);uid=sa;password=123;database=电子客票")

            Dim sql As String

            sql = "select * from 客户信息表 where 用户名='" & userid.Text & "'"

            Dim selectcommand As SqlCommand = New SqlCommand(sql, myconnection)

            Dim reader As SqlDataReader

            myconnection.Open()

            reader = selectcommand.ExecuteReader()

            reader.Read()

            zjleixing.Text = reader.Item("证件类型")

            zjnum.Text = reader.Item("证件号码")

            honenum.Text = reader.Item("联系电话")

            mobel.Text = reader.Item("手机")

            fax.Text = reader.Item("传真")

            e_mail.Text = reader.Item("电子邮箱")

            work.Text = reader.Item("工作单位")

            addr.Text = reader.Item("通信地址")

            postnum.Text = reader.Item("邮政编码")

        End If

    End Sub

5.8 用户资料修改界面

代码:

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

        Dim myconnection As SqlConnection

        myconnection = New SqlConnection("server=(local);uid=sa;password=123;database=电子客票")

        Dim sql As String

        sql = "update 客户信息表 set " & item.Text & "='" & TextBox1.Text.Trim & "' where 用户名= '" & Label1.Text & "'"

        Dim selectcommand As SqlCommand = New SqlCommand(sql, myconnection)

        myconnection.Open()

        selectcommand.ExecuteNonQuery()

        myconnection.Close()

        Response.Write("<script languaage='javascript'>alert('修改成功!')</script>")

        Response.Redirect("个人资料管理.aspx")

    End Sub

5.9密码修改界面设计

代码:

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

        If oldpwd.Text = "" Then

            Response.Write("<script languaage='javascript'>alert('请输入旧密码!')</script>")

        Else

            Dim myconnection As SqlConnection

            myconnection = New SqlConnection("server=(local);uid=sa;password=123;database=电子客票")

            Dim sql1 As String

            sql1 = "select 登陆密码 from 客户信息表 where 用户名= '" & Label4.Text & "'and 登陆密码='" & oldpwd.Text & "'"

            Dim selectcommand1 As SqlCommand = New SqlCommand(sql1, myconnection)

            Dim reader1 As SqlDataReader

            Dim temp1 As String

            myconnection.Open()

            reader1 = selectcommand1.ExecuteReader()

            temp1 = reader1.Read()

            myconnection.Close()

            If LCase(temp1) <> "true" Then

                Response.Write("<script languaage='javascript'>alert('旧密码不正确,请重新输入!')</script>")

                oldpwd.Text = ""

            Else

                If newpwd1.Text <> newpwd2.Text Then

                    Response.Write("<script languaage='javascript'>alert('新密码密码不正确,请重新输入!')</script>")

                    newpwd1.Text = ""

                    newpwd2.Text = ""

                Else

                    Dim sql2 As String

                    sql2 = "update 客户信息表 set 登陆密码='" & newpwd1.Text & "' where 用户名= '" & Label4.Text & "'"

                    Dim selectcommand2 As SqlCommand = New SqlCommand(sql2, myconnection)

                    myconnection.Open()

                    selectcommand2.ExecuteNonQuery()

                    Response.Write("<script languaage='javascript'>alert('修改成功!')</script>")

                    Response.Redirect("个人资料管理.aspx")

                    myconnection.Close()

                End If

            End If

        End If

    End Sub

5.2 系统管理模块设计

客机信息管理、航线信息管理、登机管理、管理员管理

5.2.1管理员登陆界面

    不同的管理员有不同的权限,本系统设计了三种不同的管理员:系统管理员、登机管理员、航线管理员。其中航线管理员负责对客机信息和航线信息的添加、修改、删除,登记管理员负责在机场乘客登机操作,系统管理员权限最高兼有上诉两个管理员的功能。系统通过管理员登陆时来判断管理员的权限。管理员登陆界面设计如图5.10 所示,代码和用户登录相似这里略去。

5.10 管理员登陆界面设计

 

5.2.2 客机信息管理

管理员登陆以后如果是航线管理员或者是系统管理员,就可对客机和航线进行增添修改。客机信息管理如图5.11 5.14所示。

上一页  [1] [2] [3] [4] [5] [6] [7] [8] [9] [10]  ... 下一页  >> 

ASP.NET电子客票系统 第6页下载如图片无法显示或论文不完整,请联系qq752018766
设为首页 | 联系站长 | 友情链接 | 网站地图 |

copyright©751com.cn 辣文论文网 严禁转载
如果本毕业论文网损害了您的利益或者侵犯了您的权利,请及时联系,我们一定会及时改正。