From: <ro...@us...> - 2006-08-10 15:36:50
|
Revision: 297 Author: rouquin Date: 2006-08-10 08:36:41 -0700 (Thu, 10 Aug 2006) ViewCVS: http://svn.sourceforge.net/tcdb/?rev=297&view=rev Log Message: ----------- Renabled Assignment links Modified Paths: -------------- Website/App_Code/Common.cs Website/Includes/Assignments.ascx Website/Includes/Assignments.ascx.cs Modified: Website/App_Code/Common.cs =================================================================== --- Website/App_Code/Common.cs 2006-08-10 14:51:27 UTC (rev 296) +++ Website/App_Code/Common.cs 2006-08-10 15:36:41 UTC (rev 297) @@ -1397,6 +1397,7 @@ public static int ROLE_ADMIN = 1; + public static string CODE_ASSIGNMENT = "a"; public static string CODE_USER = "u"; public static string CODE_AI = "ai"; public static string CODE_WO = "wo"; @@ -1406,6 +1407,7 @@ public static string CODE_ROLE = "r"; public static string CODE_MODE = "m"; public static string CODE_CREATED = "created"; + public static string CODE_TYPE = "t"; // TODO: figure this one out //public static bool ASSIGNMENT_PRIORITY_ALL = null; Modified: Website/Includes/Assignments.ascx =================================================================== --- Website/Includes/Assignments.ascx 2006-08-10 14:51:27 UTC (rev 296) +++ Website/Includes/Assignments.ascx 2006-08-10 15:36:41 UTC (rev 297) @@ -56,7 +56,7 @@ <asp:Literal runat="server" Text="<div class='priority_high_small'></div>" Visible='<%# (Convert.ToBoolean(Eval("highPriority")) == true) %>' /> </ItemTemplate> </asp:TemplateField> - <asp:ButtonField ButtonType="Link" CommandName="View" DataTextField="aName" HeaderText="Assignment" SortExpression="aName" /> + <asp:ButtonField CommandName="View" DataTextField="aName" HeaderText="Assignment" SortExpression="aName" /> <asp:BoundField DataField="assigned" HeaderText="Assignee" SortExpression="assigned" /> <asp:BoundField DataField="creator" HeaderText="Creator" ReadOnly="True" SortExpression="creator" /> <asp:BoundField DataField="dateAssigned" DataFormatString="{0:M-dd-yyyy}" HeaderText="Assigned" Modified: Website/Includes/Assignments.ascx.cs =================================================================== --- Website/Includes/Assignments.ascx.cs 2006-08-10 14:51:27 UTC (rev 296) +++ Website/Includes/Assignments.ascx.cs 2006-08-10 15:36:41 UTC (rev 297) @@ -137,6 +137,8 @@ gRow.Cells[1].ToolTip = name; + gRow.Attributes.Add(Constants.CODE_ASSIGNMENT.ToString(),cid.ToString()); + gRow.Attributes.Add(Constants.CODE_TYPE.ToString(), type); if (type == Constants.CODE_AI) { ActionItem ai = ActionItemDB.GetActionItem(cid, active); @@ -366,15 +368,19 @@ { if (e.CommandName == "View") { - Assignment a = AssignmentDB.GetAssignment(int.Parse(e.CommandArgument.ToString())); - if (a.ISACTIONITEM) + int rowID = Convert.ToInt32(e.CommandArgument); + int childID = Convert.ToInt32(AssignmentsGridView.Rows[rowID].Attributes[Constants.CODE_ASSIGNMENT.ToString()]); + String type = AssignmentsGridView.Rows[rowID].Attributes[Constants.CODE_TYPE.ToString()]; + + if (type == Constants.CODE_AI) { - Session[Constants.CODE_AI] = a.ACTIONITEM.ID; + + Session[Constants.CODE_AI] = childID; Response.Redirect("~/ActionItem.aspx"); } - else if (a.ISWORKORDER) + else if (type == Constants.CODE_WO) { - Session[Constants.CODE_WO] = a.WORKORDER.ID; + Session[Constants.CODE_WO] = childID; Response.Redirect("~/WorkOrder.aspx"); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |