RFID门禁管理系统源码C#

整理文档很辛苦,赏杯茶钱您下走!

免费阅读已结束,点击下载阅读编辑剩下 ...

阅读已结束,您可以下载文档离线阅读编辑

资源描述

usingSystem;usingSystem.Collections.Generic;usingSystem.Web;usingSystem.Web.UI;usingSystem.Web.UI.WebControls;usingTemplateHelper;privatevoidgetdropdownlist(){System.Data.DataTabledt=pdal.getdropdownlist();this.goodstypelist.DataSource=dt;this.goodstypelist.DataTextField=title;this.goodstypelist.DataValueField=IdentID;this.goodstypelist.DataBind();}privatevoidInitial(){getdropdownlist();this.pid.Value=Request.QueryString[id];this.ac.Value=Request.QueryString[ac];if(this.ac.Value==edite){this.tijiao.Value=编À¨¤辑-;System.Data.DataTabledt=pdal.GetGoodsInfo(this.pid.Value);if(dt.Rows.Count0){this.title.Value=dt.Rows[0][name].ToString();this.picPath=dt.Rows[0][pic].ToString();this.discription=dt.Rows[0][content].ToString();this.price.Value=dt.Rows[0][price].ToString();this.goodstypelist.SelectedValue=dt.Rows[0][goodstypeid].ToString();if(dt.Rows[0][ishouye].ToString()==True){this.istop.SelectedIndex=1;}else{this.istop.SelectedIndex=0;}if(dt.Rows[0][isuse].ToString()==True){this.isuse.SelectedIndex=1;}else{this.isuse.SelectedIndex=0;}}}else{this.tijiao.Value=添¬¨ª加¨®;}}protectedvoidaddgoods(objectsender,EventArgse){try{string_localSavedir=/kindeditor/attached/image/+Server.UrlDecode(Request.Cookies[jianzhan][name])+/;string_PhylocalSavedir=Server.MapPath(_localSavedir);intresult=0;productpmodel=newproduct();pmodel.Name=Common.Filter(this.title.Value);pmodel.Pic=Common.Filter(Request.Form[pic]);pmodel.Content=getRemoteContent(Input.Filter(Request.Form[discription]),_localSavedir,_PhylocalSavedir,,true);pmodel.Price=Common.Filter(this.price.Value);pmodel.Goodstypeid=Common.Filter(this.goodstypelist.SelectedValue);pmodel.Ishouye=Common.Filter(this.istop.Value);pmodel.Isuse=Common.Filter(this.isuse.Value);pmodel.Userid=Common.Filter(Request.Cookies[jianzhan][id]);if(this.ac.Value==edite){pmodel.Id=int.Parse(Common.Filter(this.pid.Value));result=pdal.Update(pmodel);}elseif(this.ac.Value==add){result=pdal.AddGoods(pmodel);}if(result0){this.tipmessage.Text=scriptalert('操¨´作Á¡Â成¨¦功|')/script;}else{this.tipmessage.Text=scriptalert('操¨´作Á¡Â失º¡ì败㨹')/script;}}catch(Exception){this.tipmessage.Text=scriptalert('操¨´作Á¡Â失º¡ì败㨹')/script;}}publicstringgetRemoteContent(string_Content,string_localSavedir,string_PhylocalSavedir,stringo1,boolReminTF){RemoteResourcered=newRemoteResource(_Content,_localSavedir,_PhylocalSavedir,,ReminTF);red.FileExtends=newstring[]{gif,jpg,bmp,ico,png,jpeg,swf,rar,zip,cab,doc,rm,ram,wav,mid,mp3,avi,wmv};red.FetchResource();returnred.Content;}}usingSystem;usingSystem.Collections.Generic;usingSystem.Web;usingSystem.Web.UI;usingSystem.Web.UI.WebControls;usingTemplateHelper;publicpartialclasstemplate_dabao_Admin_AddMenu:System.Web.UI.Page{AMenuDALmdal=newAMenuDAL();protectedvoidPage_Load(objectsender,EventArgse){if(!IsPostBack){GetMenuInfo(Request.QueryString[id]==null?-1:Request.QueryString[id]);}}protectedvoidEditeMenu(objectsender,EventArgse){try{TemplateHelper.Menummodel=newTemplateHelper.Menu();mmodel.Id=int.Parse(Common.Filter(this.mid.Value));mmodel.Title=Common.Filter(this.txt_title.Value.Trim());mmodel.PageName=Common.Filter(this.txt_name.Value.Trim()+.aspx);mmodel.IsMenu=Common.Filter(this.ismenu.Value);intresult=mdal.EditeMenu(mmodel);if(result0){this.tipmessage.Text=scriptalert('操¨´作Á¡Â成¨¦功|')/script;}else{this.tipmessage.Text=scriptalert('操¨´作Á¡Â失º¡ì败㨹')/script;}}catch(Exception){this.tipmessage.Text=scriptalert('操¨´作Á¡Â失º¡ì败㨹')/script;}}privatevoidGetMenuInfo(stringid){System.Data.DataTabledt=mdal.getMenuInfo(id);if(dt.Rows.Count0){this.mid.Value=dt.Rows[0][id].ToString();this.txt_title.Value=dt.Rows[0][title].ToString();this.txt_name.Value=dt.Rows[0][pagename].ToString().Replace(.aspx,);if(dt.Rows[0][ismenu].ToString()==True){this.ismenu.SelectedIndex=1;}else{this.ismenu.SelectedIndex=0;}}}}usingSystem;usingSystem.Collections.Generic;usingSystem.Web;usingSystem.Web.UI;usingSystem.Web.UI.WebControls;usingTemplateHelper;publicpartialclasstemplate_dabao_Admin_AddNews:System.Web.UI.Page{publicstringcontent=;ANewsDALndal=newANewsDAL();protectedvoidPage_Load(objectsender,EventArgse){if(!IsPostBack){getdropdownlist();Initial();}}privatevoidgetdropdownlist(){System.Data.DataTabledt=ndal.getdropdownlist();this.newstypelist.DataSource=dt;this.newstypelist.DataTextField=title;this.newstypelist.DataValueField=IdentID;this.newstypelist.DataBind();}privatevoidInitial(){getdropdownlist();this.pid.Value=Request.QueryString[id];this.ac.Value=Request.QueryString[ac];if(this.ac.Value==edite){this.tijiao.Value=编À¨¤辑-;System.Data.DataTabledt=ndal.GetNewsInfo(this.pid.Value);if(dt.Rows.Count0){this.title.Value=dt.Rows[0][title].ToString();this.content=dt.Rows[0][content].ToString();this.newstypelist.SelectedValue=dt.Rows[0][typeid].ToString();if(dt.Rows[0][istop].ToString()==True){this.istop.SelectedIndex=1;}else{this.istop.SelectedIndex=0;}if(dt.Rows[0][isuse].ToString()==True){this.isuse.SelectedIndex=1;}else{this.isuse.SelectedIndex=0;}this.source.Value=dt.Rows[0][source].ToStr

1 / 471
下载文档,编辑使用

©2015-2020 m.777doc.com 三七文档.

备案号:鲁ICP备2024069028号-1 客服联系 QQ:2149211541

×
保存成功