您目前尚未登陆,请选择【登陆】或【注册
首页->全站代码->唐唐企业管理网站源码>>Manager/New.aspx.cs>>源码在线查看
温馨提示:代码在线浏览功能只能做为源码浏览参考,如果想更进一步了解该代码请下载:唐唐企业管理网站源码
当前文件:文件类型 TangCompany/Manager/New.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 System.Data.SqlClient; 12 13public partial class Manager_New : System.Web.UI.Page 14{ 15 protected void Page_Load(object sender, EventArgs e) 16 { 17 if (!Page.IsPostBack) { 18 19 BindNew(); 20 21 } 22 } 23 protected void BindNew() { 24 25 NewDataList.DataSource = SqlHelper.ExcuteReadApdater("sys_SelectNew", CommandType.StoredProcedure, null); 26 NewDataList.DataKeyField = "Id"; 27 NewDataList.DataBind(); 28 29 } 30 protected string IsShow(string isBool) { 31 32 string txtRe = string.Empty; 33 if (isBool.ToLower() == "true") 34 { 35 36 txtRe = "优惠信息"; 37 38 } 39 else { 40 41 txtRe = "商家公告"; 42 43 } 44 return txtRe; 45 46 } 47 protected void NewDataList_DeleteCommand(object source, DataListCommandEventArgs e) 48 { 49 int nId = int.Parse(NewDataList.DataKeys[e.Item.ItemIndex].ToString()); 50 SqlParameter[] paras ={ new SqlParameter("@Id", SqlDbType.Int, 4) }; 51 paras[0].Value = nId; 52 SqlHelper.ExcuteNonQurey("DELETE FROM [New] WHERE Id=@Id", CommandType.Text, paras); 53 BindNew(); 54 55 } 56 protected void bntNew_Click(object sender, EventArgs e) 57 { 58 Response.Redirect("AddNews.aspx"); 59 } 60} 61
还没有找到您心仪的内容?请用.net源码大搜捕
代码片断 打包下载该项目完整源码:唐唐企业管理网站源码
51Aspx.com 版权所有 CopyRight © 2000-2008. 京ICP备06046876号