已阅读5页,还剩466页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
using System;using System.Collections.Generic;using System.Web;using System.Web.UI;using System.Web.UI.WebControls;using TemplateHelper; 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 = Request.QueryStringid; this.ac.Value = Request.QueryStringac; if (this.ac.Value = edite) this.tijiao.Value = 编辑-; System.Data.DataTable dt = pdal.GetGoodsInfo(this.pid.Value); if (dt.Rows.Count 0) this.title.Value = dt.Rows0name.ToString(); this.picPath = dt.Rows0pic.ToString(); this.discription = dt.Rows0content.ToString(); this.price.Value=dt.Rows0price.ToString(); this.goodstypelist.SelectedValue = dt.Rows0goodstypeid.ToString(); if (dt.Rows0ishouye.ToString() = True) this.istop.SelectedIndex = 1; else this.istop.SelectedIndex = 0; if (dt.Rows0isuse.ToString() = True) this.isuse.SelectedIndex = 1; else this.isuse.SelectedIndex = 0; else this.tijiao.Value = 添加; 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; product 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 = 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 = pdal.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, 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, 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 template_dabao_Admin_AddMenu : System.Web.UI.Page AMenuDAL mdal = new AMenuDAL(); protected void Page_Load(object sender, EventArgs e) if (!IsPostBack) 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.Trim(); 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(操作失败); 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()=True) 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 = ; 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.newstypelist.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); 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() = 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.Cookiesjianzhanname) + /; 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.Filter(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(Common.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 getRemoteContent(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, 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 = 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.title.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.Text = 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 (this.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.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 AceessHelpers 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 = dbh.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.ToString(); 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.Value) 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.Trim() + , + 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.Value + ,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改?失败!?);); 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 Admin_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;using 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 = dbh.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.ToString(); 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.Co
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2026年中医耳鼻喉科风痰上扰耳眩晕辨证技能测试卷及答案
- 抓好基层安全防事故工作的具体措施培训
- 电网建设冬季施工措施经济分析培训课件
- 煤矿事故发生原因剖析及对策培训课件
- 房建施工方案与技术措施全流程培训
- 2025-2026学年四川绵市东辰学校高二上学期开学分班检测生物试卷含答案
- (2026年)医院多学科综合诊疗会诊制度
- (2026年)学校消防安全管理制度
- (2026年)医疗质量分析和持续改进总结分析
- 2025年河南省南阳市桐柏县四下数学期中试题含答案解析
- 新版2026秋新北师大版数学五年级上册全册教案教学设计含综合实践合集
- 《南泥湾》教案2026-2027学年湘艺版六年级上册音乐
- 新版(2026秋)人教版(新教材)六年级数学上册全册教案合集
- 初中数学八年级上册《因式分解》单元教案
- 2026磷化集团 面试题及答案
- 【新教材】2026秋人教PEP版六年级上册英语Unit 1 Amazing places Part A Let's learn 教案
- 新生儿脑出血外科治疗
- 2026年秋季冀人版小学科学四年级上册教学计划
- 领取现金协议书样本
- 2026-2030中国心律管理系统行业市场发展趋势与前景展望战略分析研究报告
- 2026中级注册安全工程师《安全生产技术基础》培训课件
评论
0/150
提交评论