化工助劑配方篩選專家系統(tǒng)源碼C

上傳人:仙*** 文檔編號:37242266 上傳時間:2021-11-02 格式:DOC 頁數(shù):470 大?。?.78MB
收藏 版權(quán)申訴 舉報 下載
化工助劑配方篩選專家系統(tǒng)源碼C_第1頁
第1頁 / 共470頁
化工助劑配方篩選專家系統(tǒng)源碼C_第2頁
第2頁 / 共470頁
化工助劑配方篩選專家系統(tǒng)源碼C_第3頁
第3頁 / 共470頁

下載文檔到電腦,查找使用更方便

0 積分

下載資源

還剩頁未讀,繼續(xù)閱讀

資源描述:

《化工助劑配方篩選專家系統(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 = "";

2、 AProductDAL pdal = new AProductDAL(); private void getdropdownlist() { System.Data.DataTable dt = pdal.getdropdownlist(); this.goodstypelist.DataSource = dt; this.goodstypelist.DataTextField = "title"; this.goodstypelist.DataValueField = "Ident

3、ID"; this.goodstypelist.DataBind(); } private void Initial() { getdropdownlist(); this.pid.Value = Request.QueryString["id"]; this.ac.Value = Request.QueryString["ac"]; protected void addgoods(object sender, EventArgs e) {

4、 try { string _localSavedir = "/kindeditor/attached/image/" + Server.UrlDecode(Request.Cookies["jianzhan"]["name"]) + "/"; string _PhylocalSavedir = Server.MapPath(_localSavedir); int result = 0; product pmodel = new product();

5、 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

6、.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"]);

7、 if (this.ac.Value == "edite") { pmodel.Id = int.Parse(Common.Filter(this.pid.Value)); result = pdal.Update(pmodel); } else if (this.ac.Value == "add") { result = pda

8、l.AddGoods(pmodel); } if (result > 0) { this.tipmessage.Text = ""; } else { this.tipmessage.Text = ""; } }

9、 catch (Exception) { this.tipmessage.Text = ""; } } public string getRemoteContent(string _Content, string _localSavedir, string _PhylocalSavedir, string o1, bool ReminTF) { RemoteResource red = new RemoteRes

10、ource(_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; }

11、 } 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(ob

12、ject sender, EventArgs e) { if (!IsPostBack) { GetMenuInfo(Request.QueryString["id"] == null ? "-1" : Request.QueryString["id"]); } } protected void EditeMenu(object sender, EventArgs e) { try { Te

13、mplateHelper.Menu mmodel = new TemplateHelper.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.IsMen

14、u = Common.Filter(this.ismenu.Value); int result = mdal.EditeMenu(mmodel); if (result > 0) { this.tipmessage.Text = ""; } else { this.tipmessage.Text = "

15、t>alert(操作失敗)"; } } catch (Exception) { this.tipmessage.Text = ""; } } private void GetMenuInfo(string id) { System.Data.DataTable dt = mdal.getMenuInfo(id);

16、 if (dt.Rows.Count>0) { 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

17、()=="True") { this.ismenu.SelectedIndex = 1; } else { this.ismenu.SelectedIndex = 0; } } } } using System; using System.Collections.Generic; using System.Web; using System.Web.UI;

18、 using System.Web.UI.WebControls; using TemplateHelper; public partial class template_dabao_Admin_AddNews : System.Web.UI.Page { public string content = ""; ANewsDAL ndal = new ANewsDAL(); protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack)

19、 { getdropdownlist(); Initial(); } } private void getdropdownlist() { System.Data.DataTable dt = ndal.getdropdownlist(); this.newstypelist.DataSource = dt; this.newstypelist.DataTextField = "title"; this.newst

20、ypelist.DataValueField = "IdentID"; this.newstypelist.DataBind(); } private void Initial() { getdropdownlist(); this.pid.Value = Request.QueryString["id"]; this.ac.Value = Request.QueryString["ac"]; if (this.ac.Value == "edite")

21、{ this.tijiao.Value = "編輯-"; System.Data.DataTable dt = ndal.GetNewsInfo(this.pid.Value); if (dt.Rows.Count > 0) { this.title.Value = dt.Rows[0]["title"].ToString(); this.content = dt.Rows[0]["content"].ToString();

22、 this.newstypelist.SelectedValue = dt.Rows[0]["typeid"].ToString(); if (dt.Rows[0]["istop"].ToString() == "True") { this.istop.SelectedIndex = 1; } else { t

23、his.istop.SelectedIndex = 0; } if (dt.Rows[0]["isuse"].ToString() == "True") { this.isuse.SelectedIndex = 1; } else { this.isuse.SelectedIndex = 0;

24、 } this.source.Value = dt.Rows[0]["source"].ToString(); } } else { this.tijiao.Value = "添加"; } } protected void addnews(object sender, EventArgs e) { try { string

25、_localSavedir = "/kindeditor/attached/image/" + Server.UrlDecode(Request.Cookies["jianzhan"]["name"]) + "/"; string _PhylocalSavedir = Server.MapPath(_localSavedir); int result = 0; NewsInfo nmodel = new NewsInfo(); nmodel.Title = Common.Filter(t

26、his.title.Value); nmodel.Content =getRemoteContent(Input.Filter(Request.Form["content"]), _localSavedir, _PhylocalSavedir, "", true); nmodel.Typeid = Common.Filter(this.newstypelist.SelectedValue); nmodel.Ishouye = Common.Filter(this.istop.Value);

27、nmodel.Isuse = Common.Filter(this.isuse.Value); nmodel.Source = Common.Filter(this.source.Value); nmodel.UserId = Common.Filter(Request.Cookies["jianzhan"]["id"]); if (this.ac.Value == "edite") { nmodel.Id = int.Parse(Common.Filt

28、er(this.pid.Value)); result = ndal.Update(nmodel); } else if (this.ac.Value == "add") { result = ndal.AddNews(nmodel); } if (result > 0) { this.tipmessage.Text = "

29、t>alert(操作成功|)"; } else { this.tipmessage.Text = ""; } } catch (Exception) { this.tipmessage.Text = ""; } }

30、 //遠?程存?圖? public string getRemoteContent(string _Content, string _localSavedir, string _PhylocalSavedir, string o1, bool ReminTF) { RemoteResource red = new RemoteResource(_Content, _localSavedir, _PhylocalSavedir, "", ReminTF); red.FileExtends = new string[] { "gif"

31、, "jpg", "bmp", "ico", "png", "jpeg", "swf", "rar", "zip", "cab", "doc", "rm", "ram", "wav", "mid", "mp3", "avi", "wmv" }; red.FetchResource(); return red.Content; } } using System; using System.Collections.Generic; using System.Web; using System.Web.UI; using Syst

32、em.Web.UI.WebControls; using TemplateHelper; public partial class Admin_AddPartner : System.Web.UI.Page { protected string picPath = null; private string userid = null; private APartnerDAL pdal = new APartnerDAL(); protected void Page_Load(object sender, EventArgs e) {

33、 userid = Request.Cookies["jianzhan"]["userid"]; if (!IsPostBack) { Initial(); } } protected void addPartner(object sender, EventArgs e) { try { int result = 0; Partner pmodel = new Partner

34、(); pmodel.Title = this.title.Value; pmodel.Url = this.linkurl.Value; pmodel.Pic = Request.Form["pic"]; pmodel.Isuse = this.isuse.Value; pmodel.Userid = userid; if (this.ac.Value == "add") {

35、 result = pdal.AddPartner(pmodel); } else { pmodel.Id = this.partnerid.Value; result = pdal.UpdatePartner(pmodel); } if (result > 0) { this.tipmessage.Text = ""; } else { this.tipmessage.Text = ""; } } catch (Exception) { this.tipmessage.Text = ""; } } p

37、rivate void Initial() { this.ac.Value = Request.QueryString["ac"] == null ? "add" : Request.QueryString["ac"]; this.partnerid.Value = Request.QueryString["id"] == null ? "-1" : Request.QueryString["id"]; if (this.ac.Value == "add") { this.tijia

38、o.Value = "添加"; } else { this.tijiao.Value = "修T改?"; System.Data.DataTable dt = pdal.GetPartnerById(this.partnerid.Value); if (dt.Rows.Count > 0) { this.title.Value = dt.Rows[0]["title"].ToString();

39、 this.linkurl.Value = dt.Rows[0]["url"].ToString(); picPath = dt.Rows[0]["pic"].ToString(); this.isuse.SelectedIndex = dt.Rows[0]["isuse"].ToString() == "True" ? 1 : 0; } } } } using System; using System.Collections.Gen

40、eric; 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 AceessHelpers dbh = new AceessHelpers(); HttpCookie usercookie = HttpContext.Curren

41、t.Request.Cookies["jianzhan"]; protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { if (Request.QueryString["id"] != null) { GetDataBind(); txt_userName.Disabled = true; }

42、 } } protected void GetDataBind() { DataTable dt = dbh.GetDataBySql("select userName,realName,userpass,email,phone from TB_UserInfo where id=" + Request.Cookies["jianzhan"]["id"]); if (dt.Rows.Count > 0) { txt_userName.Value = dt.Rows[0][

43、"userName"].ToString(); txt_realName.Value = dt.Rows[0]["realName"].ToString(); txt_password.Value = Common.MD5Decrypt(dt.Rows[0]["userpass"].ToString()); txt_againPass.Value = Common.MD5Decrypt(dt.Rows[0]["userpass"].ToString()); txt_email.Value =

44、 dt.Rows[0]["email"].ToString(); txt_phone.Value = dt.Rows[0]["phone"].ToString(); } } protected void btnAdd_Click(object sender, EventArgs e) { if (Request.Cookies["jianzhan"] != null) { if (txt_password.Value != txt_againPass.Valu

45、e) { RegisterStartupScript("提示?", ""); return; } if (Request.QueryString["id"] == null) { int num = dbh.ReturnSql("insert into TB_UserInfo (userName,realNa

46、me,userpass,email,phone,userid)values(" + txt_userName.Value.Trim() + "," + txt_realName.Value + "," + Common.MD5Encrypt(txt_password.Value.Trim()) + "," + txt_email.Value + "," + txt_phone.Value + "," + Request.Cookies["jianzhan"]["id"] + ")"); if (num > 0) {

47、 RegisterStartupScript("提示?", ""); } else { RegisterStartupScript("提示?", ""); } }

48、 else { 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 + ",userid=" + Request.Cookies["jianzhan"]["id"] + " where id="

49、+ Request.QueryString["id"]); if (num > 0) { RegisterStartupScript("提示?", ""); } else { RegisterStartupScript("提

50、示?", ""); } } } } } 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; usin

51、g System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; public partial class Admin_admin_top : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { if (Request.Cookies["jianzhan"] != null) { username.InnerText = Req

52、uest.Cookies["jianzhan"].Values["name"]; } } } 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 Admin_EditUser : System.Web.UI.

53、Page { private AceessHelpers dbh = new AceessHelpers(); HttpCookie usercookie = HttpContext.Current.Request.Cookies["jianzhan"]; protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { DataTable dt = dbh.GetDataBySql("select userN

54、ame,realName,userpass,email,phone from TB_UserInfo where id=" + Request.Cookies["jianzhan"]["id"]); if (dt.Rows.Count > 0) { lblUserName.InnerText = dt.Rows[0]["userName"].ToString(); txt_realName.Value = dt.Rows[0]["realName"].ToString();

55、 txt_password.Value = Common.MD5Decrypt(dt.Rows[0]["userpass"].ToString()); txt_againPass.Value =Common.MD5Encrypt(dt.Rows[0]["userpass"].ToString()); txt_email.Value = dt.Rows[0]["email"].ToString(); txt_phone.Value = dt.Rows[0]["ph

56、one"].ToString(); } } } #region 修T改?建站?客戶信?息 protected void btnAdd_Click(object sender, EventArgs e) { if (Request.Cookies["jianzhan"] != null) { if (txt_password.Value!=txt_againPass.Value) { Re

57、gisterStartupScript("提示?", ""); return; } int num = dbh.ReturnSql("update TB_UserInfo set realName=" + txt_realName.Value + ",userpass=" + Common.MD5Encrypt(txt_againPass.Value) + ",email=" + txt_email.Value + ",phone

58、=" + txt_phone.Value + " where id=" + Request.Cookies["jianzhan"]["id"]); if (num > 0) { RegisterStartupScript("提示?", ""); } else { RegisterStartupScript("提示?", "

59、pt>alert(修T改?失敗!?);"); } } } #endregion } using System; using System.Collections.Generic; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using TemplateHelper; using System.Data; public partial class template_dabao_A

60、dmin_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 = "";

61、 if (!string.IsNullOrEmpty(txt_name.Value.Trim())) { strWhere = " picName=" + txt_name.Value.Trim() + ""; } DataTable dt = dal.GetListPic(); repTypeList.DataSource = dt; repTypeList.DataBind(); } protected void repTypeList_Ite

62、mCommand(object source, RepeaterCommandEventArgs e) { if (e.CommandName == "Del") { if (dal .DelPic (e.CommandArgument.ToString())>0) { RegisterStartupScript("提示?:o", ""); GetDataBind

63、(); } else { RegisterStartupScript("提示?:o", ""); } } } protected void btnSearch_click(object sender, EventArgs e) { GetDataBind(); } } using System; usin

64、g System.Collections.Generic; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using TemplateHelper; using System.Data; public partial class template_dabao_Admin_falshManage : System.Web.UI.Page { PicDAL dal = new PicDAL(); protected void Page_Load(object se

65、nder, 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)或不適當內(nèi)容,請與我們聯(lián)系,我們立即糾正。
7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

相關(guān)資源

更多
正為您匹配相似的精品文檔
關(guān)于我們 - 網(wǎng)站聲明 - 網(wǎng)站地圖 - 資源地圖 - 友情鏈接 - 網(wǎng)站客服 - 聯(lián)系我們

copyright@ 2023-2025  zhuangpeitu.com 裝配圖網(wǎng)版權(quán)所有   聯(lián)系電話:18123376007

備案號:ICP2024067431-1 川公網(wǎng)安備51140202000466號


本站為文檔C2C交易模式,即用戶上傳的文檔直接被用戶下載,本站只是中間服務(wù)平臺,本站所有文檔下載所得的收益歸上傳人(含作者)所有。裝配圖網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對上載內(nèi)容本身不做任何修改或編輯。若文檔所含內(nèi)容侵犯了您的版權(quán)或隱私,請立即通知裝配圖網(wǎng),我們立即給予刪除!