ASP.NET电子售票管理系统(9)

来源:xiaoniu168.com 作者:本站原创 添加时间:2011-11-30 点击数:25178

计算机毕业设计介绍:

4.3  车辆信息维护
此页面显示车辆信息的详细信息,包括车辆名称、承载人数、车辆状态,以及新增车辆、修改和删除按钮。
4.4  车次信息维护
此页面用于添加、修改、删除车次信息,包括车次、发车站、到达站、发车时间、到达时间、票价、剩余座位数、对应车辆、车次状态,以及新增车次、修改和删除按钮。

以下是引用片段:

其主要代码实现过程如下:
protected void Page_Load(object sender, EventArgs e)
    {
        // 在此处放置用户代码以初始化页面
        if (!Page.IsPostBack)
        {
            //绑定配件类别列表
            this.Dropdownlist1.DataTextField = "clmc";
            this.Dropdownlist1.DataValueField = "clbh";
            this.Dropdownlist1.DataSource = DataBase.Get_Table("select * from clxx where clzt <> '停运'");
            this.Dropdownlist1.DataBind();
            this.Dropdownlist1.SelectedIndex = 0;

            this.Textbox4.Text = DateTime.Now.ToString("yyyy-MM-dd hh:mm");
            this.Textbox5.Text = DateTime.Now.ToString("yyyy-MM-dd hh:mm");
            this.Textbox4.Attributes["readonly"] = "true";
            this.Textbox5.Attributes["readonly"] = "true";

            if (Request.QueryString["ID"] != null)
            {
                //显示当前的车次信息
                DataTable tmpda = new DataTable();
                tmpda = DataBase.Get_Table("select * from ccxx where idkey = " + Request.QueryString["ID"]);
                if (tmpda.Rows.Count > 0)
                {
                    this.Textbox1.Text = tmpda.Rows[0]["ccmc"].ToString();
                    this.Textbox2.Text = tmpda.Rows[0]["fcz"].ToString();
                    this.Textbox3.Text = tmpda.Rows[0]["dzz"].ToString();
                    this.Textbox4.Text = Convert.ToDateTime(tmpda.Rows[0]["fcsj"].ToString()).ToString("yyyy-MM-dd hh:mm");
                    this.Textbox5.Text = Convert.ToDateTime(tmpda.Rows[0]["ddsj"].ToString()).ToString("yyyy-MM-dd hh:mm");
                    this.Textbox6.Text = tmpda.Rows[0]["pj"].ToString();
                    this.Textbox7.Text = tmpda.Rows[0]["ytsjd"].ToString();

                    this.Dropdownlist1.SelectedValue = tmpda.Rows[0]["clbh"].ToString();
                    this.Dropdownlist2.SelectedValue = tmpda.Rows[0]["cczt"].ToString();
                }
            }
        }

〖资料来源:计算机毕业论文 www.xiaoniu168.com

第10页为计算机毕业论文订票功能介绍......

【联系方式】

【本站信誉】

用心做计算机毕业设计论文网