




版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、实训六 产品大类管理实训目的:实训内容:实训过程:界面制作(biggClaass.asppx页面面)该页面全部部静态代代码如下下: 无标题题页 大大类名称称: 大大类编号号: 动态代码编编写(bbigCClasss.aaspxx.cxx):usingg Syysteem;usingg Syysteem.CColllecttionns;usingg Syysteem.CConffiguurattionn;usingg Syysteem.DDataa;usingg Syysteem.LLinqq;usingg Syysteem.WWeb;usingg Syysteem.WWeb.Seccuriit
2、y;usingg Syysteem.WWeb.UI;usingg Syysteem.WWeb.UI.HtmmlCoontrrolss;usingg Syysteem.WWeb.UI.WebbConntrools;usingg Syysteem.WWeb.UI.WebbConntrools.WebbParrts;usingg Syysteem.XXml.Linnq;publiic parrtiaal claass biggClaass : SSysttem.Webb.UII.Paage DDBfuuncttionn dbb = neww DBffuncctioon(); pprottectted
3、 voiid PPagee_Looad(objjectt seendeer, EveentAArgss e) db.isLLogiin(); if (!IssPosstBaack) biindddataa(); vvoidd biindddataa() GriidViiew11.DaataSSourrce = ddb.ggetDDataaVieew(sellectt * froom bbigCClasss); GriidViiew11.DaataBBindd(); pprottectted voiid BButtton11_Cllickk(obbjecct ssendder, EvventtA
4、rggs ee) if (Sesssioonquaanxiian != nnulll & Seessiionquuanxxiann.ToSStriing() != 0) SccripptMaanagger.ReggistterSStarrtuppScrriptt(thhis, GeetTyype(), , allertt(对对不起,您您的权限限不够!), trrue); reeturrn; elsse iff (TTexttBoxx1.TTextt.Trrim().LLenggth 00 & TeextBBox22.Teext.Triim().Leengtth00) iif (!dbb.iss
5、Exiist(seelecct * frrom biggClaass wheere biggID= + TTexttBoxx2.TTextt.Trrim() + orr biigNaame= + TTexttBoxx1.TTextt.Trrim() + ) db.sqllExeecutte(inssertt innto biggClaass(biggNamme,bbigIID) valluess( + TexxtBoox1.Texxt.TTrimm() + , + TeextBBox22.Teext.Triim() + ); binnddaata(); eelsee ScrripttManna
6、geer.RRegiisteerSttarttupSScriipt(thiis, GettTyppe(), , allertt(大大类编号号或大类类名称不不能相同同!), truue); ellse SScriiptMManaagerr.ReegissterrStaartuupSccrippt(tthiss, GGetTTypee(), , aalerrt(大类名名称和大大类编号号不能为为空), truue); pprottectted voiid GGriddVieew1_RowwUpddatiing(objjectt seendeer, GriidViiewUUpdaateEEvenntA
7、rrgs e) TexxtBoox ttbNaame,tbIID; strringg sqqlchheckk = ; tbIID = (TTexttBoxx)GrridVVieww1.RRowsse.RowwInddex.Ceellss0.Coontrrolss0; tbNNamee = (TeextBBox)GriidViiew11.Roowse.RRowIIndeex.Cellls1.Conntrools0; if (tbNNamee.Teext.Triim().Leengtth 0 & tbIID.TTextt.Trrim().LLenggth0) sqllcheeck = sellec
8、tt * froom (sellectt * froom bbiglllcllasss whheree idd + GriidViiew11.DaataKKeysse.RowwInddex.Vaaluee + ) as t1 wheere biggid= + ttbIDD.Teext.Triim() + or biggnamme= + tbbNamme.TTextt.Trrim() + ; if (!dbb.issExiist(sqllcheeck) ddb.ssqlEExeccutee(uupdaate biggClaass sett biigNaame= + ttbNaame.Texxt.
9、TTrimm() + ,bbigIID= + tbbID.Texxt.TTrimm() + wheere id= + GrridVVieww1.DDataaKeyysee.RoowInndexx.VValuue); GGriddVieew1.EdiitInndexx = -1; bbindddatta(); ellse SScriiptMManaagerr.ReegissterrStaartuupSccrippt(tthiss, GGetTTypee(), , aalerrt(大类编编号或大大类名称称不能相相同), truue); /GrridVVieww1.EEdittInddex = -1
10、; / biindddataa(); rretuurn; elsse SccripptMaanagger.ReggistterSStarrtuppScrriptt(thhis, GeetTyype(), , allertt(大大类名称称和大类类编号不不能为空空), trrue); pprottectted voiid GGriddVieew1_RowwEdiitinng(oobjeect sennderr, GGriddVieewEdditEEvenntArrgs e) GriidViiew11.EdditIIndeex = e.NewwEdiitInndexx; binnddaata();
11、pprottectted voiid GGriddVieew1_RowwDelletiing11(obbjecct ssendder, GrridVViewwDelleteeEveentAArgss e) if (Sesssioonquaanxiian != nnulll & Seessiionquuanxxiann.ToSStriing() != 0) SccripptMaanagger.ReggistterSStarrtuppScrriptt(thhis, GeetTyype(), , allertt(对对不起,您您的权限限不够!), trrue); reeturrn; elsse dbb.sqqlExxecuute(deelette ffromm biigCllasss whheree idd= + GGriddVieew1.DattaKeeyse.RRowIIndeex.Vallu
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 节水管理知识
- 胶质瘤术后个案护理
- 中职家庭教育政策解读
- 脑科生理病理图谱解读
- 腰椎间盘突出护理知识
- 广州IT软件工程师简历
- 建筑行业环境问题
- 防灾减灾培训课件
- 客户服务技巧实战指南
- 医院廉政警示教育
- 语文五年级下册习作《那一刻我长大了》
- 高中英语-Unit 2 Reading and Thinking A day in the clouds教学课件设计
- 《消防专篇》编制规定
- 热工检修规程
- 《电竞俱乐部管理》教案
- 《建筑工程建筑面积计算规范》与房产测绘面积计算规范细则的区别
- 小学《道德与法治》学科集体备课工作计划与总结(全面完整版)
- 基本公共卫生服务子项目资金预算表
- 终末期肾病常规血液透析导入治疗临床路径
- 2020正己烷安全管理规定
- YS/T 203-2009贵金属及其合金丝、线、棒材
评论
0/150
提交评论