ASP.NET鲜花在线销售网站(7)

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

计算机毕业设计鲜花维护功能介绍:

(二)鲜花信息维护
此模块主要是对鲜花信息的维护。展示鲜花信息列表,可以添加 修改 和删除鲜花信息。如图:
计算机毕业论文

以下是引用片段:

相关代码如下:
            this.GridView1.DataSource = DataControl.GetDataTable("select * from XHXX,XHLX where XHXX.Lxbh=XHLX.Lxbh order by Xhlx.Lxmc");
            this.GridView1.DataBind();
            if (Session["CurControl"].ToString() == "Add")
            {
                //初始化窗体上的控件
                this.TextBox1.Text = "";
                this.TextBox2.Text = "";
                this.TextBox3.Text = "";
                this.TextBox4.Text = DateTime.Now.Date.ToShortDateString();
            }
            else
            {
                //将已经存在的鲜花信息显示在窗体的控件中
                this.TextBox1.Enabled = false;
                tmpda = DataControl.GetDataTable("select * from XHXX where Xhbh=" + Session["BH"].ToString());
                if (tmpda.Rows.Count > 0)
                {
                    this.TextBox1.Text = tmpda.Rows[0]["Xhmc"].ToString();
                    this.DropDownList1.SelectedValue = tmpda.Rows[0]["Lxbh"].ToString();
                    this.TextBox5.Text = tmpda.Rows[0]["Tpwjm"].ToString();
                    this.TextBox2.Text = tmpda.Rows[0]["Xhms"].ToString();
                    this.TextBox3.Text = tmpda.Rows[0]["Xhjg"].ToString();
                    this.TextBox4.Text = tmpda.Rows[0]["sjrq"].ToString();
                    if (this.TextBox5.Text.Trim() != "")
                    {
                        //显示鲜花图片
                        this.Image1.ImageUrl =  this.TextBox5.Text;
                    }
                }
            }
switch (Session["CurControl"].ToString())
        {
            case "Add":
                //添加新的鲜花信息
                DataTable tmpda = new DataTable();
                tmpda = DataControl.GetDataTable("select * from XHXX where Xhmc='" + this.TextBox1.Text.Trim() + "'");
                if (tmpda.Rows.Count > 0)
                {
                    this.TErr = "鲜花名称重复!";
                    return;
                }

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

第8页为计算机毕业论文订单模块介绍......

【联系方式】

【本站信誉】

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