• 大小: 1.09MB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2023-10-01
  • 语言: C#
  • 标签: asp.net  c#  sql  

资源简介

一个简单的飞机场订票系统 对初学者有帮助

资源截图

代码片段和文件信息

using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;

public partial class changepassword : System.Web.UI.Page
{
    protected void Page_Load(object sender EventArgs e)
    {
        Label5.Text = Request.QueryString[“userid“];

    }
    protected void Button2_Click(object sender EventArgs e)
    {
        if (TextBox3.Text != ““) {
            SqlConnection sqlcon1;
            string strCon1 = “Data Source=(local);Database=qyf;Uid=sa;Pwd=123456“;
            string sqlstr1 = “select password from customer where userid=‘“ + this.Label5.Text.Trim() + “‘and password=‘“ + this.TextBox3.Text.Trim() + “‘“;

            sqlcon1 = new SqlConnection(strCon1);
            SqlCommand com1 = new SqlCommand(sqlstr1 sqlcon1);
            sqlcon1.Open();
            SqlDataReader read = com1.ExecuteReader();
            if (read.Read()) {
                if (TextBox1.Text != ““ && TextBox4.Text != ““)
                {
                    if (TextBox1.Text == TextBox4.Text) {
                        string strCon = “Data Source=(local);Database=qyf;Uid=sa;Pwd=123456“;
                        SqlConnection con = new SqlConnection(strCon);
                        if (con.State == System.Data.ConnectionState.Open)
                        {
                            con.Close();
                        }

                        con.Open();
                        string sqlstr = “update customer set password=‘“+TextBox4.Text.Trim()+“‘“;

                        SqlCommand com = new SqlCommand();
                        com.CommandType = CommandType.Text;
                        com.Connection = con;//
                        com.CommandText = sqlstr;
                        com.ExecuteNonQuery();
                        con.Close();


                        TextBox3.Text = ““;
                        Response.Write(“ript>alert(‘修改成功‘)ript>“);
                    } else Response.Write(“ript>alert(‘两次密码输入不相同‘)ript>“);
                      }
                else Response.Write(“ript>alert(‘请输入新密码‘)ript>“);
            }
            else Response.Write(“ript>alert(‘密码错误‘)ript>“);
        } else Response.Write(“ript>alert(‘请输入旧密码‘)ript>“);

    }
    protected void Button1_Click(object sender EventArgs e)
    {
        string sUrl = “useron.aspx?userid=“ + Label5.Text;
        Response.Redirect(sUrl);
    }
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件     573440  2010-07-20 16:49  airplane\App_Data\qyf_log.LDF

     文件    2293760  2010-07-20 16:49  airplane\App_Data\qyf.mdf

     文件       1457  2010-07-19 02:17  airplane\WebUserControl.ascx.cs

     文件       3387  2010-07-19 01:37  airplane\zhuce.aspx.cs

     文件       8843  2010-07-18 03:10  airplane\zhuce.aspx

     文件       3555  2010-07-21 10:36  airplane\useron.aspx

     文件       5781  2010-07-18 09:49  airplane\MasterPage2.master

     文件       3352  2010-07-18 03:33  airplane\WebUserControl2.ascx

     文件       1890  2010-07-18 15:33  airplane\WebUserControl2.ascx.cs

     文件       4256  2010-07-18 01:04  airplane\img\1.jpg

     文件       1232  2010-07-18 01:15  airplane\img\2.gif

     文件      24282  2010-07-18 01:57  airplane\img\3.gif

     文件       3359  2010-07-18 02:21  airplane\img\5.jpg

     文件       1615  2010-07-18 02:23  airplane\img\6.jpg

     文件      21146  2010-07-18 02:25  airplane\img\4.gif

     文件      54788  2010-07-18 02:31  airplane\img\7.jpg

    ..A.SH.     19968  2010-07-19 21:28  airplane\img\Thumbs.db

     文件        425  2010-07-18 10:15  airplane\MasterPage2.master.cs

     文件       4069  2010-07-20 16:48  airplane\useron.aspx.cs

     文件       2071  2010-07-18 02:36  airplane\MasterPage.master

     文件       1370  2010-07-18 02:36  airplane\WebUserControl.ascx

     文件       3011  2010-07-18 17:49  airplane\gerenxingxi.aspx

     文件        634  2010-07-18 17:44  airplane\gerenxingxi.aspx.cs

     文件       6323  2010-07-19 02:00  airplane\changepassword.aspx

     文件       2741  2010-07-20 13:17  airplane\changepassword.aspx.cs

     文件        281  2010-07-22 10:05  airplane\WebUserControl3.ascx

     文件        423  2010-07-22 10:03  airplane\WebUserControl3.ascx.cs

     文件        417  2010-07-16 21:13  airplane\MasterPage.master.cs

     文件        198  2010-07-16 21:30  airplane\Default.aspx

     文件        409  2010-07-16 21:30  airplane\Default.aspx.cs

............此处省略9个文件信息

评论

共有 条评论