public void update()
{
string updatestr = "update supply set factoryname=@factoryname,sort=@sort,title=@title,category=@category,area=@area,standard=@standard,price=@price,usefullife=@usefullife,releasetime=@releasetime "+
"where recordid=@recordid " ;
SqlCommand mycomm = new SqlCommand(updatestr,myconn);
mycomm.Parameters.Add( "@factoryname ",SqlDbType.VarChar,50);
mycomm.Parameters.Add( "@sort ",SqlDbType.VarChar,10);
mycomm.Parameters.Add( "@title ",SqlDbType.VarChar,100);
mycomm.Parameters.Add( "@category ",SqlDbType.VarChar,10);
mycomm.Parameters.Add( "@area ",SqlDbType.VarChar,50);
mycomm.Parameters.Add( "@standard ",SqlDbType.VarChar,50);
mycomm.Parameters.Add( "@price ",SqlDbType.VarChar,50);
mycomm.Parameters.Add( "@usefullife ",SqlDbType.DateTime);
mycomm.Parameters.Add( "@releasetime ",SqlDbType.DateTime);
mycomm.Parameters.Add( "@recordid ",SqlDbType.Int);
mycomm.Parameters[ "@factoryname "].Value = factorynamelistbox.SelectedItem.Text;
mycomm.Parameters[ "@sort "].Value = sortddl.SelectedItem.Text;
mycomm.Parameters[ "@title "].Value = titlebox.Text.Trim().ToString();
mycomm.Parameters[ "@category "].Value = categorylistbox.SelectedItem.Text;
mycomm.Parameters[ "@area "].Value = areabox.Text.Trim().ToString();
mycomm.Parameters[ "@standard "].Value = standardbox.Text.Trim().ToString();
mycomm.Parameters[ "@price "].Value = pricebox.Text;
mycomm.Parameters[ "@usefullife "].Value = Calendar1.SelectedDate.ToString( "yyyy/MM/dd ", System.Globalization.DateTimeFormatInfo.InvariantInfo);
mycomm.Parameters[ "@releasetime "].Value = DateTime.Now.ToString( "yyyy/MM/dd ", System.Globalization.DateTimeFormatInfo.InvariantInfo);
mycomm.Parameters[ "@recordid "].Value =Int32.Parse( Request.QueryString[ "recordid "]);
myconn.Open();