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


当前文件路径:Votes/ShowVotes.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 ShowVotes : System.Web.UI.Page 14{ 15 private int tid; 16 private string tname=""; 17 protected void Page_Load(object sender, EventArgs e) 18 { 19 if (!Page.IsPostBack) 20 { 21 BindSubjectData(GetCurrentTopicData()); 22 } 23 24 } 25 private int GetCurrentTopicData() 26 { 27 ITopics topics = new Topics(); 28 SqlDataReader recu=topics.GetCurrentTopic(); 29 if (recu.Read()) 30 { 31 tid = Int32.Parse(recu["t_id"].ToString()); 32 tname=recu["t_name"].ToString(); 33 } 34 recu.Close(); 35 return tid; 36 } 37 private void BindSubjectData(int tid) 38 { 39 ISubjects subject = new Subjects(); 40 SqlDataReader recu = subject.GetSubjectByTopic(tid); 41 IDSubjects.DataSource = recu; 42 IDSubjects.DataBind(); 43 recu.Close(); 44 } 45 46 protected void IDSubjects_RowDataBound(object sender, GridViewRowEventArgs e) 47 { 48 GridView items = (GridView)e.Row.FindControl("IDItems"); 49 if(items!=null) 50 BindItemDate(items, Int32.Parse(IDSubjects.DataKeys[e.Row.RowIndex].Value.ToString())); 51 } 52 53 private void BindItemDate(GridView gitem, int sid) 54 { 55 IItems item = new Items(); 56 SqlDataReader recu=item.GetItemBySubject(sid); 57 gitem.DataSource = recu; 58 gitem.DataBind(); 59 60 } 61} 62
还没有找到您心仪的内容?请用.net源码大搜捕
代码片断 打包下载该项目完整源码:简单多功能投票/调查系统源码

- 51aspx员工绩效考核系统

- 信管家园整站系统源码

- HuGo版文章发布系统(三层MVC..

- 简单三层实现的无限级DropDo..

- 某矿产品贸易公司财务系统(..

- Asp.net2.0电子商务网源码

- Afritxia在线用户统计、在线..

- Asp.net企业网站管理系统源码..

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