您目前尚未登陆,请选择【登陆】或【注册
首页->其他源码->BugNet0.7.881.0汉化免安装版源码>>BugNET_WAP/Bugs/ProjectSummary.aspx.cs>>代码在线查看
温馨提示:代码在线浏览功能只能做为源码浏览参考,不能展示项目的全部,如果想更进一步了解该代码请下载:BugNet0.7.881.0汉化免安装版源码


当前文件路径:BugNet/BugNET_WAP/Bugs/ProjectSummary.aspx.cs 文件类型
普通视图
		            
1using System; 2using System.Collections; 3using System.ComponentModel; 4using System.Data; 5using System.Drawing; 6using System.Web; 7using System.Web.SessionState; 8using System.Web.UI; 9using System.Web.UI.WebControls; 10using System.Web.UI.HtmlControls; 11using BugNET.ApplicationBlocks.Data; 12using BugNET.BusinessLogicLayer; 13 14namespace BugNET 15{ 16 /// <summary> 17 /// Summary description for BrowseProject. 18 /// </summary> 19 public partial class ProjectSummary : BugNET.UserInterfaceLayer.BasePage 20 { 21 protected System.Web.UI.WebControls.Repeater rptComponents; 22 protected LinkButton lnkComponent; 23 protected Label lblUnassignedCount; 24 protected Label lblVersionCount; 25 protected System.Web.UI.WebControls.Image imgType; 26 27 /// <summary> 28 /// Handles the Load event of the Page control. 29 /// </summary> 30 /// <param name="sender">The source of the event.</param> 31 /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param> 32 protected void Page_Load(object sender, System.EventArgs e) 33 { 34 // Put user code to initialize the page here 35 if(!Page.IsPostBack) 36 { 37 //get project id 38 if (Request.QueryString["pid"] != null) 39 ProjectId = Convert.ToInt32(Request.Params["pid"]); 40 41 //Version 42 ArrayList lsVersion = (ArrayList)Bug.GetBugFixedInVersionCountByProject(ProjectId); 43 //Status 44 ArrayList lsStatus = (ArrayList)Bug.GetBugStatusCountByProject(ProjectId); 45 //Priority 46 ArrayList lsPriority = (ArrayList)Bug.GetBugPriorityCountByProject(ProjectId); 47 //User 48 ArrayList lsUser = (ArrayList)Bug.GetBugUserCountByProject(ProjectId); 49 //Type 50 ArrayList lsType = (ArrayList)Bug.GetBugTypeCountByProject(ProjectId); 51 52 ComponentTreeView1.ProjectId = ProjectId; 53 ComponentTreeView1.BindData(); 54 55 rptVersions.DataSource = lsVersion; 56 rptSummary.DataSource = lsStatus; 57 //rptComponents.DataSource = ds; 58 rptOpenIssues.DataSource = lsPriority; 59 rptAssignee.DataSource = lsUser; 60 rptType.DataSource = lsType; 61 62 Project p = Project.GetProjectById(ProjectId); 63 litProject.Text = p.Name; 64 litProjectCode.Text = p.Code; 65 DataBind(); 66 } 67 } 68 69 70 Link Buttons 133 134 Web Form Designer generated code 163 164 /// <summary> 165 /// Binds the data for the versions repeater 166 /// </summary> 167 /// <param name="sender"></param> 168 /// <param name="e"></param> 169 private void rptVersions_ItemDataBound(object sender, RepeaterItemEventArgs e) 170 { 171 if(e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem) 172 { 173 BugCount bc = (BugCount)e.Item.DataItem; 174 ((Label)e.Item.FindControl("lblVersionCount")).Text = bc.Count.ToString(); 175 ((LinkButton)e.Item.FindControl("lnkVersion")).Text = bc.Name; 176 ((LinkButton)e.Item.FindControl("lnkVersion")).CommandArgument = bc.Id.ToString(); 177 } 178 } 179 180 /// <summary> 181 /// Handles the ItemDataBound event of the rptSummary control. 182 /// </summary> 183 /// <param name="sender">The source of the event.</param> 184 /// <param name="e">The <see cref="T:System.Web.UI.WebControls.RepeaterItemEventArgs"/> instance containing the event data.</param> 185 private void rptSummary_ItemDataBound(object sender, RepeaterItemEventArgs e) 186 { 187 if(e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem) 188 { 189 BugCount bc = (BugCount)e.Item.DataItem; 190 ((Label)e.Item.FindControl("lblCount")).Text = bc.Count.ToString(); 191 ((LinkButton)e.Item.FindControl("lnkSummary")).Text = bc.Name; 192 ((LinkButton)e.Item.FindControl("lnkSummary")).CommandArgument = bc.Id.ToString(); 193 } 194 } 195 196 /// <summary> 197 /// Handles the ItemDataBound event of the rptOpenIssues control. 198 /// </summary> 199 /// <param name="sender">The source of the event.</param> 200 /// <param name="e">The <see cref="T:System.Web.UI.WebControls.RepeaterItemEventArgs"/> instance containing the event data.</param> 201 private void rptOpenIssues_ItemDataBound(object sender, RepeaterItemEventArgs e) 202 { 203 if(e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem) 204 { 205 BugCount bc = (BugCount)e.Item.DataItem; 206 ((Label)e.Item.FindControl("lblCount")).Text = bc.Count.ToString(); 207 ((LinkButton)e.Item.FindControl("lnkPriority")).Text = bc.Name; 208 ((LinkButton)e.Item.FindControl("lnkPriority")).CommandArgument = bc.Id.ToString(); 209 ((System.Web.UI.WebControls.Image)e.Item.FindControl("imgPriority")).ImageUrl = Priority.GetPriorityById(bc.Id).ImageUrl; 210 } 211 } 212 213 /// <summary> 214 /// Handles the ItemDataBound event of the rptAssignee control. 215 /// </summary> 216 /// <param name="sender">The source of the event.</param> 217 /// <param name="e">The <see cref="T:System.Web.UI.WebControls.RepeaterItemEventArgs"/> instance containing the event data.</param> 218 private void rptAssignee_ItemDataBound(object sender, RepeaterItemEventArgs e) 219 { 220 if(e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem) 221 { 222 BugCount bc = (BugCount)e.Item.DataItem; 223 ((Label)e.Item.FindControl("lblCount")).Text = bc.Count.ToString(); 224 ((LinkButton)e.Item.FindControl("lnkAssignee")).Text = bc.Name; 225 ((LinkButton)e.Item.FindControl("lnkAssignee")).CommandArgument = bc.Name; 226 } 227 else if(e.Item.ItemType == ListItemType.Footer) 228 { 229 ((Label)e.Item.FindControl("lblUnassignedCount")).Text = Bug.GetBugUnassignedCountByProject(ProjectId).ToString(); 230 } 231 } 232 233 /// <summary> 234 /// Handles the ItemDataBound event of the rptType control. 235 /// </summary> 236 /// <param name="sender">The source of the event.</param> 237 /// <param name="e">The <see cref="T:System.Web.UI.WebControls.RepeaterItemEventArgs"/> instance containing the event data.</param> 238 private void rptType_ItemDataBound(object sender, RepeaterItemEventArgs e) 239 { 240 if(e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem) 241 { 242 BugCount bc = (BugCount)e.Item.DataItem; 243 ((Label)e.Item.FindControl("lblCount")).Text = bc.Count.ToString(); 244 ((LinkButton)e.Item.FindControl("lnkType")).Text = bc.Name; 245 ((LinkButton)e.Item.FindControl("lnkType")).CommandArgument = bc.Id.ToString(); 246 ((System.Web.UI.WebControls.Image)e.Item.FindControl("imgType")).ImageUrl = BugNET.BusinessLogicLayer.Type.GetTypeById(bc.Id).ImageUrl; 247 } 248 } 249 250 } 251} 252
还没有找到您心仪的内容?请用.net源码大搜捕
代码片断 打包下载该项目完整源码:BugNet0.7.881.0汉化免安装版源码

- atlas拼音首字母文本框自动完..

- 西游博客多用户版源码

- 内文广告管理系统V1.1版源码

- Asp.net通用人力资源管理系统..

- 某高校团委在线报名系统源码

- asp.net生成验证码示例源码(..

- Webfort网站内容管理系统

- 简单网站计数器统(单用户)源码

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