《实训七产品小类管理5750.pdf》由会员分享,可在线阅读,更多相关《实训七产品小类管理5750.pdf(3页珍藏版)》请在taowenge.com淘文阁网|工程机械CAD图纸|机械工程制图|CAD装配图下载|SolidWorks_CaTia_CAD_UG_PROE_设计图分享下载上搜索。
1、实训七 产品小类管理 实训目的:实训内容:实训过程:1.界面制作页面)该页面全部静态代码如下:!DOCTYPE html PUBLIC-oString()!=0)(this,GetType(),alert(对不起,您的权限不够!),true);return;else if if(!(select*from smallClass where smallID=+TextB and smallName=and bigid=)(insert into smallClass(smallName,smallID,bigID)values(,);binddata();else (this,GetType()
2、,alert(小类编号或小类名称不能相同!),true);else (this,GetType(),alert(小类名称和小类编号不能为空),true);protected void GridView1_RowUpdating(object sender,GridViewUpdateEventArgs e)TextBox tbsmallName,tbsmallID;DropDownList drpBigClass;string sqlcheck=,sqlupdate=;tbsmallID=(TextBox).Cells2.Controls0;tbsmallName=(TextBox).Cell
3、s1.Controls0;drpBigClass=(DropDownList).Cells0.FindControl(DropDownList2);if sqlcheck=select*from(select*from smallclass where id+.Value+)as t1 where smallid=or smallname=;if(!(sqlcheck)(update smallClass set smallName=,smallID=,bigID=where id=+.Value);=-1;binddata();else (this,GetType(),alert(小类编号或
4、小类名称不能相同),true);oString()!=0)(this,GetType(),alert(对不起,您的权限不够!),true);return;else =;binddata();protected void GridView1_RowDeleting1(object sender,GridViewDeleteEventArgs e)if(Sessionquanxian!=null&Sessionquanxian.ToString()!=0)(this,GetType(),alert(对不起,您的权限不够!),true);return;else (delete from smallC
5、lass where id=+.Value);binddata();protected void GridView1_RowCancelingEdit(object sender,GridViewCancelEditEventArgs e)=-1;binddata();protected void GridView1_RowDataBound(object sender,GridViewRowEventArgs e)DataRow dr;Label Lb;DropDownList ddl;HiddenField hf;onmouseover,);onmouseout,);Lb=(LabelLabel1);hf=(HiddenFieldHiddenField2);dr=(select*from bigClass where bigid=);=drbigname.ToString();|)ddl=(DropDownListDropDownList2);hf=(HiddenFieldHiddenField1);(ddl,select*from bigclass,bigname,bigID