计算机毕业设计影碟信息维护介绍:
4.2.5 YdxxEdit(影碟信息编辑)
此页面主要是添加、修改影碟信息。如图:
以下是引用片段:
private void Page_Load(object sender, System.EventArgs e) { // 在此处放置用户代码以初始化页面 // 在此处放置用户代码以初始化页面 if(!Page.IsPostBack) { //显示影碟类型列表到选择框中 DataTable tmpda=new DataTable(); tmpda=DataControl.GetDataTable("select * from YDLX order by Lxjb",Session["Dbase"].ToString()); this.DropDownList1.DataValueField="lxbh"; this.DropDownList1.DataTextField="Lxmc" ; this.DropDownList1.DataSource=tmpda; this.DropDownList1.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 YDXX where Ydbh="+ Session["BH"].ToString(),Session["Dbase"].ToString()); string DPath= @"image\"; if(tmpda.Rows.Count>0 ) { this.TextBox1.Text=tmpda.Rows[0]["ydmc"].ToString(); this.DropDownList1.SelectedValue=tmpda.Rows[0]["Lxbh"].ToString(); this.TextBox5.Text=tmpda.Rows[0]["Tpwjm"].ToString(); this.TextBox2.Text =tmpda.Rows[0]["ydms"].ToString(); this.TextBox3.Text=tmpda.Rows[0]["ydjg"].ToString(); this.TextBox4.Text=tmpda.Rows[0]["sjrq"].ToString(); if(this.TextBox5.Text.Trim()!="") { //显示影碟图片 this.Image1.ImageUrl=DPath + this.TextBox5.Text; } }
|
〖资料来源:计算机毕业论文 www.xiaoniu168.com〗
第9页为计算机毕业论文影碟信息浏览介绍......