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


当前文件路径:BugNet/BugNET_WAP/Bugs/RoadMap.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 BugNET.UserInterfaceLayer; 12using BugNET.BusinessLogicLayer; 13using System.Drawing; 14 15/// <summary> 16/// Project Road Map 17/// </summary> 18public partial class Bugs_RoadMap : BasePage 19{ 20 /// <summary> 21 /// The current version title. 22 /// </summary> 23 protected string VersionTitle; 24 25 /// <summary> 26 /// Handles the Load event of the Page control. 27 /// </summary> 28 /// <param name="sender">The source of the event.</param> 29 /// <param name="e">The <see cref="T:System.EventArgs"/> instance containing the event data.</param> 30 protected void Page_Load(object sender, EventArgs e) 31 { 32 if (!Page.IsPostBack) 33 { 34 //get project id 35 if (Request.QueryString["pid"] != null) 36 ProjectId = Convert.ToInt32(Request.Params["pid"]); 37 38 Project p = Project.GetProjectById(ProjectId); 39 ltProject.Text = p.Name; 40 litProjectCode.Text = p.Code; 41 42 rptRoadMap.DataSource = Bug.GetRoadMap(ProjectId); 43 rptRoadMap.DataBind(); 44 } 45 46 // The ExpandIssuePaths method is called to handle 47 // the SiteMapResolve event. 48 SiteMap.SiteMapResolve += 49 new SiteMapResolveEventHandler(this.ExpandProjectPaths); 50 } 51 52 /// <summary> 53 /// Handles the Unload event of the Page control. 54 /// </summary> 55 /// <param name="sender">The source of the event.</param> 56 /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param> 57 protected void Page_Unload(object sender, System.EventArgs e) 58 { 59 //remove the event handler 60 SiteMap.SiteMapResolve -= 61 new SiteMapResolveEventHandler(this.ExpandProjectPaths); 62 } 63 64 /// <summary> 65 /// Expands the project paths. 66 /// </summary> 67 /// <param name="sender">The sender.</param> 68 /// <param name="e">The <see cref="System.Web.SiteMapResolveEventArgs"/> instance containing the event data.</param> 69 /// <returns></returns> 70 private SiteMapNode ExpandProjectPaths(Object sender, SiteMapResolveEventArgs e) 71 { 72 SiteMapNode currentNode = SiteMap.CurrentNode.Clone(true); 73 SiteMapNode tempNode = currentNode; 74 75 // The current node, and its parents, can be modified to include 76 // dynamic querystring information relevant to the currently 77 // executing request. 78 if (ProjectId != 0) 79 { 80 tempNode.Url = tempNode.Url + "?pid=" + ProjectId.ToString(); 81 } 82 83 if ((null != (tempNode = tempNode.ParentNode)) && 84 (ProjectId != 0)) 85 { 86 tempNode.Url = tempNode.Url + "?pid=" + ProjectId.ToString(); 87 } 88 89 return currentNode; 90 } 91 /// <summary> 92 /// Handles the ItemDataBound event of the rptRoadMap control. 93 /// </summary> 94 /// <param name="sender">The source of the event.</param> 95 /// <param name="e">The <see cref="T:System.Web.UI.WebControls.RepeaterItemEventArgs"/> instance containing the event data.</param> 96 protected void rptRoadMap_ItemDataBound(object sender, RepeaterItemEventArgs e) 97 { 98 if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem) 99 { 100 BugNET.BusinessLogicLayer.Bug b = (BugNET.BusinessLogicLayer.Bug)e.Item.DataItem; 101 ((HtmlControl)e.Item.FindControl("HeaderRow")).Visible = false; 102 if (e.Item.ItemIndex == 0) 103 { 104 //first control set title 105 VersionTitle = b.FixedInVersionName; 106 ((Label)e.Item.FindControl("lblVersion")).Text = VersionTitle; 107 ((HtmlControl)e.Item.FindControl("HeaderRow")).Visible = true; 108 } 109 110 if (VersionTitle != b.FixedInVersionName) 111 { 112 VersionTitle = b.FixedInVersionName; 113 ((Label)e.Item.FindControl("lblVersion")).Text = VersionTitle; 114 ((HtmlControl)e.Item.FindControl("HeaderRow")).Visible = true; 115 } 116 int[] values = Bug.GetRoadMapProgress(ProjectId,b.FixedInVersionId); 117 ((Label)e.Item.FindControl("lblProgress")).Text = string.Format("{2}% complete<br/>{0} of {1} issues have been resolved", values[0], values[1],values[0]*100/values[1]); 118 119 ((Label)e.Item.FindControl("lblSummary")).Text = b.Summary; 120 ((Label)e.Item.FindControl("lblComponent")).Text = b.ComponentName; 121 ((Label)e.Item.FindControl("lblStatus")).Text = b.StatusName; 122 ((Label)e.Item.FindControl("lblType")).Text = b.TypeName; 123 ((Label)e.Item.FindControl("lblAssignedTo")).Text = b.AssignedDisplayName; 124 125 //change unassigned user to red 126 if (b.AssignedToUserId == Guid.Empty) 127 ((Label)e.Item.FindControl("lblAssignedTo")).ForeColor = Color.Red; 128 } 129 } 130} 131
还没有找到您心仪的内容?请用.net源码大搜捕
代码片断 打包下载该项目完整源码:BugNet0.7.881.0汉化免安装版源码

- 燕赵宽频点播系统V1.0源码

- Pizza在线订购系统源码

- 学生成绩智能管理系统源码

- ASP.NET经典案例源码之入门源码

- 小孔子简单无刷新留言薄(Aj..

- 51aspxXML简单留言本

- 最简购物车(Access)源码

- 某学院仿百渡贴吧源码

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