欢迎来到天天文库
浏览记录
ID:40878074
大小:1.01 MB
页数:14页
时间:2019-08-09
《管理园内相册》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、管理园内相册主要代码protectedvoidPage_Load(objectsender,EventArgse){if(!IsPostBack){stringsql;sql="select*fromyuanneixiangceorderbyiddesc";getdata(sql);}}privatevoidgetdata(stringsql){DataSetresult=newDataSet();result=newClass1().hsggetdata(sql);if(result!=null){if(r
2、esult.Tables[0].Rows.Count>0){DataGrid1.DataSource=result.Tables[0];DataGrid1.DataBind();Label1.Text="以上数据中共"+result.Tables[0].Rows.Count+"条";}else{DataGrid1.DataSource=null;DataGrid1.DataBind();Label1.Text="暂无任何数据";}}}protectedvoidButton1_Click(objectsende
3、r,EventArgse){stringsql;sql="select*fromyuanneixiangcewhere1=1";if(bh.Text.ToString().Trim()!=""){sql=sql+"andbhlike'%"+bh.Text.ToString().Trim()+"%'";}if(mc.Text.ToString().Trim()!=""){sql=sql+"andxmlike'%"+mc.Text.ToString().Trim()+"%'";}sql=sql+"orderbyi
4、ddesc";getdata(sql);}protectedvoidDataGrid1_PageIndexChanged(objectsource,DataGridPageChangedEventArgse){stringsql;sql="select*fromyuanneixiangceorderbyiddesc";getdata(sql);DataGrid1.CurrentPageIndex=e.NewPageIndex;DataGrid1.DataBind();}}3)相册添加界面14图5-9相册添加相
5、册添加主要代码protectedvoidPage_Load(objectsender,EventArgse){if(!IsPostBack){faburen.Text=Session["username"].ToString().Trim();}}protectedvoidButton1_Click(objectsender,EventArgse){stringsql;sql="insertintoxiangce(bianhao,mingcheng,beizhu,faburen)values('"+bianh
6、ao.Text.ToString().Trim()+"','"+mingcheng.Text.ToString().Trim()+"','"+beizhu.Text.ToString().Trim()+"','"+faburen.Text.ToString().Trim()+"')";intresult;result=newClass1().hsgexucute(sql);if(result==1){Response.Write("");}}4)相册管理界面图5-10相册管理界面相册管理主要代码protectedvoidPage_Load(objectsender,EventArgse){if(!IsPostBack){stringsql;sql="select*fromxiangceorderbyiddesc";14getdata(sql);}privatevoidgetda
8、ta(stringsql){DataSetresult=newDataSet();result=newClass1().hsggetdata(sql);if(result!=null){if(result.Tables[0].Rows.Count>0){DataGrid1.DataSource=result.Tables[0];DataGrid1.DataBind();Label1.Text="以上
此文档下载收益归作者所有