化工助剂配方筛选专家系统源码C.doc

上传人:rrsccc 文档编号:11040861 上传时间:2021-06-20 格式:DOC 页数:470 大小:1.78MB
返回 下载 相关 举报
化工助剂配方筛选专家系统源码C.doc_第1页
第1页 / 共470页
化工助剂配方筛选专家系统源码C.doc_第2页
第2页 / 共470页
化工助剂配方筛选专家系统源码C.doc_第3页
第3页 / 共470页
化工助剂配方筛选专家系统源码C.doc_第4页
第4页 / 共470页
化工助剂配方筛选专家系统源码C.doc_第5页
第5页 / 共470页
点击查看更多>>
资源描述

《化工助剂配方筛选专家系统源码C.doc》由会员分享,可在线阅读,更多相关《化工助剂配方筛选专家系统源码C.doc(470页珍藏版)》请在三一文库上搜索。

1、using System;using System.Collections.Generic;using System.Web;using System.Web.UI;using System.Web.UI.WebControls;using TemplateHelper;public partial class template_dabao_Admin_AddGoods : System.Web.UI.Page public string picPath = null; public string discription = ; AProductDAL pdal = new AProductD

2、AL(); private void getdropdownlist() System.Data.DataTable dt = pdal.getdropdownlist(); this.goodstypelist.DataSource = dt; this.goodstypelist.DataTextField = title; this.goodstypelist.DataValueField = IdentID; this.goodstypelist.DataBind(); private void Initial() getdropdownlist(); this.pid.Value =

3、 Request.QueryStringid; this.ac.Value = Request.QueryStringac; protected void addgoods(object sender, EventArgs e) try string _localSavedir = /kindeditor/attached/image/ + Server.UrlDecode(Request.Cookiesjianzhanname) + /; string _PhylocalSavedir = Server.MapPath(_localSavedir); int result = 0; prod

4、uct pmodel = new product(); pmodel.Name = Common.Filter(this.title.Value); pmodel.Pic = Common.Filter(Request.Formpic); pmodel.Content =getRemoteContent(Input.Filter(Request.Formdiscription), _localSavedir, _PhylocalSavedir, , true); pmodel.Price = Common.Filter(this.price.Value); pmodel.Goodstypeid

5、 = Common.Filter(this.goodstypelist.SelectedValue); pmodel.Ishouye = Common.Filter(this.istop.Value); pmodel.Isuse = Common.Filter(this.isuse.Value); pmodel.Userid = Common.Filter(Request.Cookiesjianzhanid); if (this.ac.Value = edite) pmodel.Id = int.Parse(Common.Filter(this.pid.Value); result = pda

6、l.Update(pmodel); else if (this.ac.Value = add) result = pdal.AddGoods(pmodel); if (result 0) this.tipmessage.Text = alert(操作成功|); else this.tipmessage.Text = alert(操作失败); catch (Exception) this.tipmessage.Text = alert(操作失败); public string getRemoteContent(string _Content, string _localSavedir, stri

7、ng _PhylocalSavedir, string o1, bool ReminTF) RemoteResource red = new RemoteResource(_Content, _localSavedir, _PhylocalSavedir, , ReminTF); red.FileExtends = new string gif, jpg, bmp, ico, png, jpeg, swf, rar, zip, cab, doc, rm, ram, wav, mid, mp3, avi, wmv ; red.FetchResource(); return red.Content

8、; using System;using System.Collections.Generic;using System.Web;using System.Web.UI;using System.Web.UI.WebControls;using TemplateHelper;public partial class template_dabao_Admin_AddMenu : System.Web.UI.Page AMenuDAL mdal = new AMenuDAL(); protected void Page_Load(object sender, EventArgs e) if (!I

9、sPostBack) GetMenuInfo(Request.QueryStringid = null ? -1 : Request.QueryStringid); protected void EditeMenu(object sender, EventArgs e) try TemplateHelper.Menu mmodel = new TemplateHelper.Menu(); mmodel.Id = int.Parse(Common.Filter(this.mid.Value); mmodel.Title = Common.Filter(this.txt_title.Value.T

10、rim(); mmodel.PageName = Common.Filter(this.txt_name.Value.Trim()+.aspx); mmodel.IsMenu = Common.Filter(this.ismenu.Value); int result = mdal.EditeMenu(mmodel); if (result 0) this.tipmessage.Text = alert(操作成功|); else this.tipmessage.Text = alert(操作失败); catch (Exception) this.tipmessage.Text = alert(

11、操作失败); private void GetMenuInfo(string id) System.Data.DataTable dt = mdal.getMenuInfo(id); if (dt.Rows.Count0) this.mid.Value = dt.Rows0id.ToString(); this.txt_title.Value = dt.Rows0title.ToString(); this.txt_name.Value = dt.Rows0pagename.ToString().Replace(.aspx,); if (dt.Rows0ismenu.ToString()=Tr

12、ue) this.ismenu.SelectedIndex = 1; else this.ismenu.SelectedIndex = 0; using System;using System.Collections.Generic;using System.Web;using System.Web.UI;using System.Web.UI.WebControls;using TemplateHelper;public partial class template_dabao_Admin_AddNews : System.Web.UI.Page public string content

13、= ; ANewsDAL ndal = new ANewsDAL(); protected void Page_Load(object sender, EventArgs e) if (!IsPostBack) getdropdownlist(); Initial(); private void getdropdownlist() System.Data.DataTable dt = ndal.getdropdownlist(); this.newstypelist.DataSource = dt; this.newstypelist.DataTextField = title; this.n

14、ewstypelist.DataValueField = IdentID; this.newstypelist.DataBind(); private void Initial() getdropdownlist(); this.pid.Value = Request.QueryStringid; this.ac.Value = Request.QueryStringac; if (this.ac.Value = edite) this.tijiao.Value = 编辑-; System.Data.DataTable dt = ndal.GetNewsInfo(this.pid.Value)

15、; if (dt.Rows.Count 0) this.title.Value = dt.Rows0title.ToString(); this.content = dt.Rows0content.ToString(); this.newstypelist.SelectedValue = dt.Rows0typeid.ToString(); if (dt.Rows0istop.ToString() = True) this.istop.SelectedIndex = 1; else this.istop.SelectedIndex = 0; if (dt.Rows0isuse.ToString

16、() = True) this.isuse.SelectedIndex = 1; else this.isuse.SelectedIndex = 0; this.source.Value = dt.Rows0source.ToString(); else this.tijiao.Value = 添加; protected void addnews(object sender, EventArgs e) try string _localSavedir = /kindeditor/attached/image/ + Server.UrlDecode(Request.Cookiesjianzhan

17、name) + /; string _PhylocalSavedir = Server.MapPath(_localSavedir); int result = 0; NewsInfo nmodel = new NewsInfo(); nmodel.Title = Common.Filter(this.title.Value); nmodel.Content =getRemoteContent(Input.Filter(Request.Formcontent), _localSavedir, _PhylocalSavedir, , true); nmodel.Typeid = Common.F

18、ilter(this.newstypelist.SelectedValue); nmodel.Ishouye = Common.Filter(this.istop.Value); nmodel.Isuse = Common.Filter(this.isuse.Value); nmodel.Source = Common.Filter(this.source.Value); nmodel.UserId = Common.Filter(Request.Cookiesjianzhanid); if (this.ac.Value = edite) nmodel.Id = int.Parse(Commo

19、n.Filter(this.pid.Value); result = ndal.Update(nmodel); else if (this.ac.Value = add) result = ndal.AddNews(nmodel); if (result 0) this.tipmessage.Text = alert(操作成功|); else this.tipmessage.Text = alert(操作失败); catch (Exception) this.tipmessage.Text = alert(操作失败); /远?程存?图? public string getRemoteConte

20、nt(string _Content, string _localSavedir, string _PhylocalSavedir, string o1, bool ReminTF) RemoteResource red = new RemoteResource(_Content, _localSavedir, _PhylocalSavedir, , ReminTF); red.FileExtends = new string gif, jpg, bmp, ico, png, jpeg, swf, rar, zip, cab, doc, rm, ram, wav, mid, mp3, avi,

21、 wmv ; red.FetchResource(); return red.Content; using System;using System.Collections.Generic;using System.Web;using System.Web.UI;using System.Web.UI.WebControls;using TemplateHelper;public partial class Admin_AddPartner : System.Web.UI.Page protected string picPath = null; private string userid =

22、null; private APartnerDAL pdal = new APartnerDAL(); protected void Page_Load(object sender, EventArgs e) userid = Request.Cookiesjianzhanuserid; if (!IsPostBack) Initial(); protected void addPartner(object sender, EventArgs e) try int result = 0; Partner pmodel = new Partner(); pmodel.Title = this.t

23、itle.Value; pmodel.Url = this.linkurl.Value; pmodel.Pic = Request.Formpic; pmodel.Isuse = this.isuse.Value; pmodel.Userid = userid; if (this.ac.Value = add) result = pdal.AddPartner(pmodel); else pmodel.Id = this.partnerid.Value; result = pdal.UpdatePartner(pmodel); if (result 0) this.tipmessage.Tex

24、t = alert(操作成功|); else this.tipmessage.Text = alert(操作失败); catch (Exception) this.tipmessage.Text = alert(操作失败); private void Initial() this.ac.Value = Request.QueryStringac = null ? add : Request.QueryStringac; this.partnerid.Value = Request.QueryStringid = null ? -1 : Request.QueryStringid; if (th

25、is.ac.Value = add) this.tijiao.Value = 添加; else this.tijiao.Value = 修T改?; System.Data.DataTable dt = pdal.GetPartnerById(this.partnerid.Value); if (dt.Rows.Count 0) this.title.Value = dt.Rows0title.ToString(); this.linkurl.Value = dt.Rows0url.ToString(); picPath = dt.Rows0pic.ToString(); this.isuse.

26、SelectedIndex = dt.Rows0isuse.ToString() = True ? 1 : 0; using System;using System.Collections.Generic;using System.Web;using System.Web.UI;using System.Web.UI.WebControls;using System.Data;using TemplateHelper;public partial class template_dabao_Admin_AddUser : System.Web.UI.Page private AceessHelp

27、ers dbh = new AceessHelpers(); HttpCookie usercookie = HttpContext.Current.Request.Cookiesjianzhan; protected void Page_Load(object sender, EventArgs e) if (!Page.IsPostBack) if (Request.QueryStringid != null) GetDataBind(); txt_userName.Disabled = true; protected void GetDataBind() DataTable dt = d

28、bh.GetDataBySql(select userName,realName,userpass,email,phone from TB_UserInfo where id= + Request.Cookiesjianzhanid); if (dt.Rows.Count 0) txt_userName.Value = dt.Rows0userName.ToString(); txt_realName.Value = dt.Rows0realName.ToString(); txt_password.Value = Common.MD5Decrypt(dt.Rows0userpass.ToSt

29、ring(); txt_againPass.Value = Common.MD5Decrypt(dt.Rows0userpass.ToString(); txt_email.Value = dt.Rows0email.ToString(); txt_phone.Value = dt.Rows0phone.ToString(); protected void btnAdd_Click(object sender, EventArgs e) if (Request.Cookiesjianzhan != null) if (txt_password.Value != txt_againPass.Va

30、lue) RegisterStartupScript(提示?, alert(两?次?密码?不?一?致?!?);); return; if (Request.QueryStringid = null) int num = dbh.ReturnSql(insert into TB_UserInfo (userName,realName,userpass,email,phone,userid)values( + txt_userName.Value.Trim() + , + txt_realName.Value + , + Common.MD5Encrypt(txt_password.Value.T

31、rim() + , + txt_email.Value + , + txt_phone.Value + , + Request.Cookiesjianzhanid + ); if (num 0) RegisterStartupScript(提示?, alert(添加成功|!?);location.href=UserList.aspx); else RegisterStartupScript(提示?, alert(添加失败!?);); else int num = dbh.ReturnSql(update TB_UserInfo set realName= + txt_realName.Valu

32、e + ,userpass= + Common.MD5Encrypt(txt_againPass.Value) + ,email= + txt_email.Value + ,phone= + txt_phone.Value + ,userid= + Request.Cookiesjianzhanid + where id= + Request.QueryStringid); if (num 0) RegisterStartupScript(提示?, alert(修T改?成功|!?);location.href=UserList.aspx); else RegisterStartupScript(提示?, alert(修T改?失败!?););

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 社会民生


经营许可证编号:宁ICP备18001539号-1