化工助劑配方篩選專家系統(tǒng)源碼C
《化工助劑配方篩選專家系統(tǒng)源碼C》由會員分享,可在線閱讀,更多相關(guān)《化工助劑配方篩選專家系統(tǒng)源碼C(470頁珍藏版)》請在裝配圖網(wǎng)上搜索。
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
33、(提示?, alert(修T改?失?。?);); using System;using System.Collections;using System.Configuration;using System.Data;using System.Web;using System.Web.Security;using System.Web.UI;using System.Web.UI.HtmlControls;using System.Web.UI.WebControls;using System.Web.UI.WebControls.WebParts;public partial class Ad
34、min_admin_top : System.Web.UI.Page protected void Page_Load(object sender, EventArgs e) if (Request.Cookiesjianzhan != null) username.InnerText = Request.Cookiesjianzhan.Valuesname; using System;using System.Collections.Generic;using System.Web;using System.Web.UI;using System.Web.UI.WebControls;usi
35、ng System.Data;using TemplateHelper;/ public partial class Admin_EditUser : System.Web.UI.Page private AceessHelpers dbh = new AceessHelpers(); HttpCookie usercookie = HttpContext.Current.Request.Cookiesjianzhan; protected void Page_Load(object sender, EventArgs e) if (!IsPostBack) DataTable dt = db
36、h.GetDataBySql(select userName,realName,userpass,email,phone from TB_UserInfo where id= + Request.Cookiesjianzhanid); if (dt.Rows.Count 0) lblUserName.InnerText = dt.Rows0userName.ToString(); txt_realName.Value = dt.Rows0realName.ToString(); txt_password.Value = Common.MD5Decrypt(dt.Rows0userpass.To
37、String(); txt_againPass.Value =Common.MD5Encrypt(dt.Rows0userpass.ToString(); txt_email.Value = dt.Rows0email.ToString(); txt_phone.Value = dt.Rows0phone.ToString(); #region 修T改?建站?客戶信?息 protected void btnAdd_Click(object sender, EventArgs e) if (Request.Cookiesjianzhan != null) if (txt_password.Val
38、ue!=txt_againPass.Value) RegisterStartupScript(提示?, alert(兩?次?密碼?不?一?致?!?);); return; int num = dbh.ReturnSql(update TB_UserInfo set realName= + txt_realName.Value + ,userpass= + Common.MD5Encrypt(txt_againPass.Value) + ,email= + txt_email.Value + ,phone= + txt_phone.Value + where id= + Request.Cook
39、iesjianzhanid); if (num 0) RegisterStartupScript(提示?, alert(修T改?成功|!?);); else RegisterStartupScript(提示?, alert(修T改?失?。?);); #endregionusing System;using System.Collections.Generic;using System.Web;using System.Web.UI;using System.Web.UI.WebControls;using TemplateHelper;using System.Data;public part
40、ial class template_dabao_Admin_falshManage : System.Web.UI.Page PicDAL dal = new PicDAL(); protected void Page_Load(object sender, EventArgs e) if (!Page.IsPostBack) GetDataBind(); protected void GetDataBind() string strWhere = ; if (!string.IsNullOrEmpty(txt_name.Value.Trim() strWhere = picName= +
41、txt_name.Value.Trim() + ; DataTable dt = dal.GetListPic(); repTypeList.DataSource = dt; repTypeList.DataBind(); protected void repTypeList_ItemCommand(object source, RepeaterCommandEventArgs e) if (e.CommandName = Del) if (dal .DelPic (e.CommandArgument.ToString()0) RegisterStartupScript(提示?:o, aler
42、t(刪?除y成功|!?);); GetDataBind(); else RegisterStartupScript(提示?:o, alert(刪?除y失??!?);); protected void btnSearch_click(object sender, EventArgs e) GetDataBind(); using System;using System.Collections.Generic;using System.Web;using System.Web.UI;using System.Web.UI.WebControls;using TemplateHelper;using
43、System.Data;public partial class template_dabao_Admin_falshManage : System.Web.UI.Page PicDAL dal = new PicDAL(); protected void Page_Load(object sender, EventArgs e) if (!Page.IsPostBack) GetDataBind(); protected void GetDataBind() string strWhere = ; if (!string.IsNullOrEmpty(txt_name.Value.Trim() strWhere = picName= + txt_name.Value.Trim() + ; DataTable dt = dal.GetListPic(); repTypeList.DataSource = dt; repTypeList.DataBind(); pro
- 溫馨提示:
1: 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
2: 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
3.本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
5. 裝配圖網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責(zé)。
6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。