您目前尚未登陆,请选择【登陆】或【注册
首页->其他源码->基于Ajax的邮件系统源码>>Filter/FilterManage.aspx.cs>>代码在线查看
温馨提示:代码在线浏览功能只能做为源码浏览参考,不能展示项目的全部,如果想更进一步了解该代码请下载:基于Ajax的邮件系统源码


当前文件路径:AjaxMail/Filter/FilterManage.aspx.cs 文件类型
普通视图
		            
1using System; 2using System.Data; 3using System.Configuration; 4using System.Collections; 5using System.Web; 6using System.Web.Security; 7using System.Web.UI; 8using System.Web.UI.WebControls; 9using System.Web.UI.WebControls.WebParts; 10using System.Web.UI.HtmlControls; 11using Web2ASPNET2.ASPNET2AjaxMail; 12using Web2ASPNET2.CommonOperation; 13using Web2ASPNET2.UserCommonOperation; 14 15public partial class Filter_FilterManage : System.Web.UI.Page 16{ 17 protected void Page_Load(object sender,EventArgs e) 18 { ///判断用户是否登录 19 UserInfo info = (UserInfo)UserCommonOperation.GetUserInfo(Session); 20 if(info == null) 21 { ///返回到上一个页面 22 Response.Write("<script>history.back()</script>"); 23 Response.Redirect("~/Portal/UserLogin.aspx");  ///跳转到登录页面 24 return; 25 } 26 ///绑定控件的数据 27 if(!Page.IsPostBack) 28 { 29 BindPageData(); 30 } 31 } 32 private void BindPageData() 33 { ///绑定控件的数据 34 Filter filter = new Filter(); 35 Web2ASPNET2.CommonOperation.DataBinder.BindGridViewData( 36 gvFilter,filter.GetFilters()); 37 } 38 39 protected string FormatFlag(string flag) 40 { 41 switch(flag) 42 { 43 case "0": return "关键字过滤器"; 44 case "1": return "时间过滤器"; 45 case "2": return "用户过滤器"; 46 default: return "未知类型过滤器"; 47 } 48 } 49 50 protected void gvFilter_RowDataBound(object sender,GridViewRowEventArgs e) 51 { ///为删除按钮添加确认对话框 52 ImageButton ibtDelete = (ImageButton)e.Row.FindControl("ibtDelete"); 53 if(ibtDelete != null) 54 { 55 ibtDelete.Attributes.Add("onclick","return confirm('你确定要删除所选择的数据行吗?');"); 56 } 57 } 58 protected void gvFilter_RowCommand(object sender,GridViewCommandEventArgs e) 59 { ///重定向到编辑页面 60 if(e.CommandName == "update") 61 { 62 Response.Redirect("~/Filter/UpdateFilter.aspx?FilterID=" + e.CommandArgument.ToString()); 63 } 64 if(e.CommandName == "del") 65 { ///执行删除操作 66 Filter filter = new Filter(); 67 filter.DeleteFilter(DataTypeConvert.ConvertToInt(e.CommandArgument.ToString())); 68 ///重新绑定控件数据 69 BindPageData(); 70 } 71 } 72 protected void btnAdd_Click(object sender,EventArgs e) 73 { ///页面重定向 74 Response.Redirect("~/Filter/KeyFilter.aspx"); 75 } 76} 77
还没有找到您心仪的内容?请用.net源码大搜捕
代码片断 打包下载该项目完整源码:基于Ajax的邮件系统源码

- 客户关系拓展管理系统源码

- 面向对象实例之数据操作项目源码

- 仿csdn论坛简易论坛(vb.net)..

- 包哥Asp.net留言板源码

- 图片上传(水印、缩略图、远程..

- 信管家园整站系统源码

- 简单网络书店系统源代码

- 网新新闻全站系统源码

51Aspx.com 版权所有 CopyRight © 2000-2008. 京ICP备06046876号