化工助劑配方篩選專家系統(tǒng)源碼C
《化工助劑配方篩選專家系統(tǒng)源碼C》由會員分享,可在線閱讀,更多相關(guān)《化工助劑配方篩選專家系統(tǒng)源碼C(470頁珍藏版)》請?jiān)谘b配圖網(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、
//遠(yuǎn)?程存?圖?
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)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 市教育局冬季運(yùn)動會安全工作預(yù)案
- 2024年秋季《思想道德與法治》大作業(yè)及答案3套試卷
- 2024年教師年度考核表個人工作總結(jié)(可編輯)
- 2024年xx村兩委涉案資金退還保證書
- 2024年憲法宣傳周活動總結(jié)+在機(jī)關(guān)“弘揚(yáng)憲法精神推動發(fā)改工作高質(zhì)量發(fā)展”專題宣講報告會上的講話
- 2024年XX村合作社年報總結(jié)
- 2024-2025年秋季第一學(xué)期初中歷史上冊教研組工作總結(jié)
- 2024年小學(xué)高級教師年終工作總結(jié)匯報
- 2024-2025年秋季第一學(xué)期初中物理上冊教研組工作總結(jié)
- 2024年xx鎮(zhèn)交通年度總結(jié)
- 2024-2025年秋季第一學(xué)期小學(xué)語文教師工作總結(jié)
- 2024年XX村陳規(guī)陋習(xí)整治報告
- 2025年學(xué)校元旦迎新盛典活動策劃方案
- 2024年學(xué)校周邊安全隱患自查報告
- 2024年XX鎮(zhèn)農(nóng)村規(guī)劃管控述職報告