From: <m_h...@us...> - 2006-07-11 22:27:12
|
Revision: 101 Author: m_hildebrand Date: 2006-07-11 15:27:04 -0700 (Tue, 11 Jul 2006) ViewCVS: http://svn.sourceforge.net/tcdb/?rev=101&view=rev Log Message: ----------- Finished authentication stuff and started work on Assignments Modified Paths: -------------- Website/App_Code/TCDB_Common.cs Website/App_Code/TCDB_Users.cs Website/App_Code/dadDataSet.xsd Website/Global.asax Website/Includes/Assignments.ascx Website/Includes/AssignmentsTree.ascx Website/Includes/Authenticate.ascx Website/Includes/Header.ascx Website/TCDB.master Website/web.config Modified: Website/App_Code/TCDB_Common.cs =================================================================== --- Website/App_Code/TCDB_Common.cs 2006-07-11 21:36:18 UTC (rev 100) +++ Website/App_Code/TCDB_Common.cs 2006-07-11 22:27:04 UTC (rev 101) @@ -31,6 +31,10 @@ public static string USER_ANONYMOUSCELLPHONE = ""; public static bool USER_ANONYMOUSAUTOMATION = false; + public static string CODE_USER = "u"; + public static string CODE_AI = "ai"; + public static string CODE_WO = "wo"; + public static string USER_AI_NAME = "Assign permissions: "; public static string USER_AI_DESCRIPTION = "Please assign appropriate permissions for new user: "; Modified: Website/App_Code/TCDB_Users.cs =================================================================== --- Website/App_Code/TCDB_Users.cs 2006-07-11 21:36:18 UTC (rev 100) +++ Website/App_Code/TCDB_Users.cs 2006-07-11 22:27:04 UTC (rev 101) @@ -10,7 +10,6 @@ using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; - using System.Security; using System.Collections; using System.Collections.Generic; @@ -225,20 +224,6 @@ private List<TCDB_TestCase> p_testCasesEdited; */ - public List<TCDB_Assignment> ASSIGNMENTS - { - // TODO: This list needs to be able to reflect filters! - get - { - if (assignments == null) - { - assignments = TCDB_AssignmentDB.TCDB_GetAssignmentList(TCDB_Constant.ASSIGNMENT_TYPE_BOTH, - TCDB_Constant.ASSIGNMENT_FINISHEDANDUNFINISHED, ID, null); - } - return assignments; - } - } - public TCDB_User() { p_id = TCDB_Constant.USER_ANONYMOUSUSERID; Modified: Website/App_Code/dadDataSet.xsd =================================================================== --- Website/App_Code/dadDataSet.xsd 2006-07-11 21:36:18 UTC (rev 100) +++ Website/App_Code/dadDataSet.xsd 2006-07-11 22:27:04 UTC (rev 101) @@ -6,8 +6,6 @@ <Connections> <Connection AppSettingsObjectName="Web.config" AppSettingsPropertyName="dadConnectionString" ConnectionStringObject="" IsAppSettingsProperty="True" Modifier="Assembly" Name="dadConnectionString (Web.config)" ParameterPrefix="@" PropertyReference="AppConfig.System.Configuration.ConfigurationManager.0.ConnectionStrings.dadConnectionString.ConnectionString" Provider="System.Data.SqlClient"> </Connection> - <Connection AppSettingsObjectName="Web.config" AppSettingsPropertyName="tcdbConnectionString" ConnectionStringObject="" IsAppSettingsProperty="True" Modifier="Assembly" Name="tcdbConnectionString (Web.config)" ParameterPrefix="@" PropertyReference="AppConfig.System.Configuration.ConfigurationManager.0.ConnectionStrings.tcdbConnectionString.ConnectionString" Provider="System.Data.SqlClient"> - </Connection> </Connections> <Tables> <TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="db_usersTableAdapter" GeneratorDataComponentClassName="db_usersTableAdapter" Name="db_users" UserDataComponentName="db_usersTableAdapter"> @@ -267,7 +265,7 @@ </TableAdapter> <TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="db_notesTableAdapter" GeneratorDataComponentClassName="db_notesTableAdapter" Name="db_notes" UserDataComponentName="db_notesTableAdapter"> <MainSource> - <DbSource ConnectionRef="tcdbConnectionString (Web.config)" DbObjectName="tcdb.dbo.sel_notes" DbObjectType="StoredProcedure" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="False" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="False" UserGetMethodName="GetData" UserSourceName="Fill"> + <DbSource ConnectionRef="dadConnectionString (Web.config)" DbObjectName="tcdb.dbo.sel_notes" DbObjectType="StoredProcedure" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="False" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="False" UserGetMethodName="GetData" UserSourceName="Fill"> <SelectCommand> <DbCommand CommandType="StoredProcedure" ModifiedByUser="False"> <CommandText>dbo.sel_notes</CommandText> @@ -294,7 +292,7 @@ </TableAdapter> <TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="db_assignmentsTableAdapter" GeneratorDataComponentClassName="db_assignmentsTableAdapter" Name="db_assignments" UserDataComponentName="db_assignmentsTableAdapter"> <MainSource> - <DbSource ConnectionRef="tcdbConnectionString (Web.config)" DbObjectName="tcdb.dbo.sel_assignments" DbObjectType="StoredProcedure" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="False" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="False" UserGetMethodName="GetData" UserSourceName="Fill"> + <DbSource ConnectionRef="dadConnectionString (Web.config)" DbObjectName="tcdb.dbo.sel_assignments" DbObjectType="StoredProcedure" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="False" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="False" UserGetMethodName="GetData" UserSourceName="Fill"> <SelectCommand> <DbCommand CommandType="StoredProcedure" ModifiedByUser="False"> <CommandText>dbo.sel_assignments</CommandText> @@ -331,7 +329,6 @@ <Mapping SourceColumn="WOPass" DataSetColumn="WOPass" /> <Mapping SourceColumn="WOFail" DataSetColumn="WOFail" /> <Mapping SourceColumn="WOError" DataSetColumn="WOError" /> - <Mapping SourceColumn="aName" DataSetColumn="aName" /> </Mappings> <Sources> </Sources> @@ -524,7 +521,6 @@ </xs:simpleType> </xs:element> <xs:element name="childID" msdata:ReadOnly="true" msprop:Generator_UserColumnName="childID" msprop:Generator_ColumnPropNameInRow="childID" msprop:Generator_ColumnVarNameInTable="columnchildID" msprop:Generator_ColumnPropNameInTable="childIDColumn" type="xs:int" minOccurs="0" /> - <xs:element name="childID" msdata:ReadOnly="true" msprop:Generator_UserColumnName="childID" msprop:Generator_ColumnPropNameInRow="childID" msprop:Generator_ColumnVarNameInTable="columnchildID" msprop:Generator_ColumnPropNameInTable="childIDColumn" type="xs:int" minOccurs="0" /> <xs:element name="creator" msdata:ReadOnly="true" msprop:Generator_UserColumnName="creator" msprop:Generator_ColumnPropNameInRow="creator" msprop:Generator_ColumnVarNameInTable="columncreator" msprop:Generator_ColumnPropNameInTable="creatorColumn" minOccurs="0"> <xs:simpleType> <xs:restriction base="xs:string"> @@ -532,13 +528,6 @@ </xs:restriction> </xs:simpleType> </xs:element> - <xs:element name="creator" msdata:ReadOnly="true" msprop:Generator_UserColumnName="creator" msprop:Generator_ColumnPropNameInRow="creator" msprop:Generator_ColumnVarNameInTable="columncreator" msprop:Generator_ColumnPropNameInTable="creatorColumn" minOccurs="0"> - <xs:simpleType> - <xs:restriction base="xs:string"> - <xs:maxLength value="49" /> - </xs:restriction> - </xs:simpleType> - </xs:element> <xs:element name="assigned" msdata:ReadOnly="true" msprop:Generator_UserColumnName="assigned" msprop:Generator_ColumnPropNameInRow="assigned" msprop:Generator_ColumnVarNameInTable="columnassigned" msprop:Generator_ColumnPropNameInTable="assignedColumn" minOccurs="0"> <xs:simpleType> <xs:restriction base="xs:string"> Modified: Website/Global.asax =================================================================== --- Website/Global.asax 2006-07-11 21:36:18 UTC (rev 100) +++ Website/Global.asax 2006-07-11 22:27:04 UTC (rev 101) @@ -1,4 +1,5 @@ <%@ Application Language="C#" %> +<%@ Import Namespace="TCDB_Common" %> <%@ Import Namespace="TCDB_Users" %> <script runat="server"> @@ -13,6 +14,7 @@ try { user = TCDB_UserDB.TCDB_GetUserInfo((int)(Session["userID"])); + if (user.ID != TCDB_Constant.USER_ANONYMOUSUSERID) user.ISAUTHENTICATED = true; } catch { Modified: Website/Includes/Assignments.ascx =================================================================== --- Website/Includes/Assignments.ascx 2006-07-11 21:36:18 UTC (rev 100) +++ Website/Includes/Assignments.ascx 2006-07-11 22:27:04 UTC (rev 101) @@ -1,11 +1,14 @@ <%@ Control Language="C#" AutoEventWireup="true" %> +<%@ Import Namespace="System.Collections.Generic" %> <%@ Import Namespace="System.Data" %> <%@ Import Namespace="System.Data.SqlClient" %> +<%@ Import Namespace="TCDB_Assignments" %> +<%@ Import Namespace="TCDB_Common" %> -<script runat=server> +<script runat="server"> //DateTime curToDate, curFromDueDate, curToDueDate, curFromDate, curToFinishedDate, curFromFinishedDate; String id = HttpContext.Current.Request.QueryString["id"]; - + protected void Page_Load(object sender, EventArgs e) { /* @@ -34,95 +37,102 @@ private void filter(GridViewRow gRow) { - if (gRow.RowType == DataControlRowType.DataRow) + if (gRow.RowType != DataControlRowType.DataRow) { - DataRowView data = (DataRowView)gRow.DataItem; - if (data != null) - { - GridView1.Visible = true; - gRow.Visible = true; + return; + } + + DataRowView data = (DataRowView)gRow.DataItem; + if (data == null) + { + return; + } + + AssignmentsGridView.Visible = true; + gRow.Visible = true; - // Set priority image - bool priority = Convert.ToBoolean(data["highPriority"].ToString()); - if (priority) - gRow.Cells[0].Text = "<img src=\"Images/exclamation.jpg\" style=\"width: 23px; height: 19px\" />"; - else - gRow.Cells[0].Text = "<img src=\"Images/no-exclamation.jpg\" style=\"width: 23px; height: 19px\" />"; + // Set priority image + bool priority = Convert.ToBoolean(data["highPriority"].ToString()); + if (priority) + gRow.Cells[0].Text = "<div class=\"normal_priority\" />"; + else + gRow.Cells[0].Text = "<div class=\"high_priority\" />"; - // Set Hyperlink URL - String id = data["childID"].ToString(); - String type = data["aType"].ToString(); - String name = data["aName"].ToString(); - if (type == TCDB_Common.TCDB_Constant.ASSIGNMENT_TYPE_ACTIONITEM) - gRow.Cells[1].Text = "<a href=\"ActionItem.aspx?id=" + id + "\">" + name + "</a>"; - else if (type == TCDB_Common.TCDB_Constant.ASSIGNMENT_TYPE_WORKORDER) - gRow.Cells[1].Text = "<a href=\"WorkOrder.aspx?id=" + id + "\">" + name + "</a>"; + // Set Hyperlink URL + String id = data["childID"].ToString(); + String type = data["aType"].ToString(); + String name = data["aName"].ToString(); + if (type == TCDB_Common.TCDB_Constant.ASSIGNMENT_TYPE_ACTIONITEM) + gRow.Cells[1].Text = "<a href=\"ActionItem.aspx?ai=" + id + "\">" + name + "</a>"; + else if (type == TCDB_Common.TCDB_Constant.ASSIGNMENT_TYPE_WORKORDER) + gRow.Cells[1].Text = "<a href=\"WorkOrder.aspx?wo=" + id + "\">" + name + "</a>"; - if (cboPriorityFilter.Checked) - { - switch (priority) - { - case true: - if (!cboHighPriority.Checked) - gRow.Visible = false; - break; - case false: - if (!cboLowPriority.Checked) - gRow.Visible = false; - break; - } - } - - String status = data["statusName"].ToString(); - if (gRow.Visible && cboStatusFilter.Checked) - { - if (!cboFilterNotStarted.Checked && status == "Not Started") + if (cboPriorityFilter.Checked) + { + switch (priority) + { + case true: + if (!cboHighPriority.Checked) gRow.Visible = false; - else if (!cboFilterStarted.Checked && status == "Started") + break; + case false: + if (!cboLowPriority.Checked) gRow.Visible = false; - else if (!cboShowCompleted.Checked && status == "Completed") - gRow.Visible = false; - else if (!cboFilterInactive.Checked && status == "Inactive") - gRow.Visible = false; - } - if (gRow.Visible && cboTypeFilter.Checked) - { - if (cboShowActionItems.Checked) - GridView1.Visible = true; - else - GridView1.Visible = false; - }/* - if (gRow.Visible && cboDateFilter.Checked) - { - DateTime dateAssigned = Convert.ToDateTime(data["dateAssigned"]); - DateTime to = toDate.DateValue; - DateTime from = fromDate.DateValue; + break; + } + } - if ((dateAssigned < from) || (dateAssigned > to)) - gRow.Visible = false; - } - if (gRow.Visible && cboDueFilter.Checked) - { - DateTime dateAssigned = Convert.ToDateTime(data["dateAssigned"]); - DateTime to = toDueDate.DateValue; - DateTime from = fromDueDate.DateValue; + String status = data["statusName"].ToString(); + if (gRow.Visible && cboStatusFilter.Checked) + { + if (!cboFilterNotStarted.Checked && status == "Not Started") + gRow.Visible = false; + else if (!cboFilterStarted.Checked && status == "Started") + gRow.Visible = false; + else if (!cboShowCompleted.Checked && status == "Completed") + gRow.Visible = false; + else if (!cboFilterInactive.Checked && status == "Inactive") + gRow.Visible = false; + } + + if (gRow.Visible && cboTypeFilter.Checked) + { + if (cboShowActionItems.Checked) + AssignmentsGridView.Visible = true; + else + AssignmentsGridView.Visible = false; + } + /* + if (gRow.Visible && cboDateFilter.Checked) + { + DateTime dateAssigned = Convert.ToDateTime(data["dateAssigned"]); + DateTime to = toDate.DateValue; + DateTime from = fromDate.DateValue; - if ((dateAssigned < from) || (dateAssigned > to)) - gRow.Visible = false; - } - if (gRow.Visible && cboFinishedFilter.Checked) - { - DateTime dateAssigned = Convert.ToDateTime(data["dateAssigned"]); - DateTime to = toFinishedDate.DateValue; - DateTime from = fromFinishedDate.DateValue; + if ((dateAssigned < from) || (dateAssigned > to)) + gRow.Visible = false; + } + if (gRow.Visible && cboDueFilter.Checked) + { + DateTime dateAssigned = Convert.ToDateTime(data["dateAssigned"]); + DateTime to = toDueDate.DateValue; + DateTime from = fromDueDate.DateValue; - if ((dateAssigned < from) || (dateAssigned > to)) - gRow.Visible = false; - }*/ - } + if ((dateAssigned < from) || (dateAssigned > to)) + gRow.Visible = false; } + if (gRow.Visible && cboFinishedFilter.Checked) + { + DateTime dateAssigned = Convert.ToDateTime(data["dateAssigned"]); + DateTime to = toFinishedDate.DateValue; + DateTime from = fromFinishedDate.DateValue; + + if ((dateAssigned < from) || (dateAssigned > to)) + gRow.Visible = false; + }*/ + } - protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e) + protected void AssignmentsGridView_RowDataBound(object sender, GridViewRowEventArgs e) { filter(e.Row); } @@ -139,7 +149,7 @@ { cboFilterCompleted.Checked = false; } - GridView1.DataBind(); + AssignmentsGridView.DataBind(); } protected void cboStatusFilter_CheckedChanged(object sender, EventArgs e) { @@ -157,15 +167,15 @@ cboFilterStarted.Enabled = false; cboFilterInactive.Enabled = false; } - GridView1.DataBind(); + AssignmentsGridView.DataBind(); } protected void cboFilterStarted_CheckedChanged(object sender, EventArgs e) { - GridView1.DataBind(); + AssignmentsGridView.DataBind(); } protected void cboFilterNotStarted_CheckedChanged(object sender, EventArgs e) { - GridView1.DataBind(); + AssignmentsGridView.DataBind(); } protected void cboFilterCompleted_CheckedChanged(object sender, EventArgs e) { @@ -173,11 +183,11 @@ cboShowCompleted.Checked = true; else cboShowCompleted.Checked = false; - GridView1.DataBind(); + AssignmentsGridView.DataBind(); } protected void cboFilterInactive_CheckedChanged(object sender, EventArgs e) { - GridView1.DataBind(); + AssignmentsGridView.DataBind(); } protected void cboTypeFilter_CheckedChanged(object sender, EventArgs e) { @@ -191,22 +201,22 @@ cboShowActionItems.Enabled = false; cboShowWorkOrders.Enabled = false; } - GridView1.DataBind(); + AssignmentsGridView.DataBind(); } protected void cboShowActionItems_CheckedChanged(object sender, EventArgs e) { - GridView1.DataBind(); + AssignmentsGridView.DataBind(); } protected void cboShowWorkOrders_CheckedChanged(object sender, EventArgs e) { - GridView1.DataBind(); + AssignmentsGridView.DataBind(); }/* protected void fromDate_PreRender(object sender, EventArgs e) { if (curFromDate != fromDate.DateValue) { curFromDate = fromDate.DateValue; - GridView1.DataBind(); + AssignmentsGridView.DataBind(); } } protected void toDate_PreRender(object sender, EventArgs e) @@ -214,7 +224,7 @@ if (curToDate != toDate.DateValue) { curToDate = toDate.DateValue; - GridView1.DataBind(); + AssignmentsGridView.DataBind(); } } protected void cboDateFilter_CheckedChanged(object sender, EventArgs e) @@ -229,14 +239,14 @@ toDate.Enabled = false; fromDate.Enabled = false; } - GridView1.DataBind(); + AssignmentsGridView.DataBind(); } protected void fromDueDate_PreRender(object sender, EventArgs e) { if (curFromDueDate != fromDueDate.DateValue) { curFromDueDate = fromDueDate.DateValue; - GridView1.DataBind(); + AssignmentsGridView.DataBind(); } } protected void toDueDate_PreRender(object sender, EventArgs e) @@ -244,7 +254,7 @@ if (curToDueDate != toDueDate.DateValue) { curToDueDate = toDueDate.DateValue; - GridView1.DataBind(); + AssignmentsGridView.DataBind(); } } protected void fromFinishedDate_PreRender(object sender, EventArgs e) @@ -252,7 +262,7 @@ if (curFromFinishedDate != fromFinishedDate.DateValue) { curFromFinishedDate = fromFinishedDate.DateValue; - GridView1.DataBind(); + AssignmentsGridView.DataBind(); } } protected void toFinishedDate_PreRender(object sender, EventArgs e) @@ -260,7 +270,7 @@ if (curToFinishedDate != toFinishedDate.DateValue) { curToFinishedDate = toFinishedDate.DateValue; - GridView1.DataBind(); + AssignmentsGridView.DataBind(); } } protected void cboDueFilter_CheckedChanged(object sender, EventArgs e) @@ -275,7 +285,7 @@ toDueDate.Enabled = false; fromDueDate.Enabled = false; } - GridView1.DataBind(); + AssignmentsGridView.DataBind(); } protected void cboFinishedFilter_CheckedChanged(object sender, EventArgs e) { @@ -289,7 +299,7 @@ toFinishedDate.Enabled = false; fromFinishedDate.Enabled = false; } - GridView1.DataBind(); + AssignmentsGridView.DataBind(); } protected void fromDate_Init(object sender, EventArgs e) @@ -316,22 +326,24 @@ cboHighPriority.Enabled = false; cboLowPriority.Enabled = false; } - GridView1.DataBind(); + AssignmentsGridView.DataBind(); } protected void cboHighPriority_CheckedChanged(object sender, EventArgs e) { - GridView1.DataBind(); + AssignmentsGridView.DataBind(); } protected void cboLowPriority_CheckedChanged(object sender, EventArgs e) { - GridView1.DataBind(); + AssignmentsGridView.DataBind(); } + + </script> <table width="100%"> <tr> - <td align=center> + <td align="center"> <div id="MyAssignments"> <table width="100%" cellpadding="0" cellspacing="0" border="0"> <tr> @@ -339,7 +351,7 @@ <h2> My Assignments</h2> </td> - <td align="right" valign="bottom" style="padding-right: 20px;"> + <td align="right" valign="bottom" style="padding-right: 20px; width: 513px;"> <asp:CheckBox ID="cboShowCompleted" runat="server" Text="Show Completed" TextAlign="Left" AutoPostBack="true" OnCheckedChanged="cboShowCompleted_CheckedChanged" /></td> </tr> @@ -351,8 +363,17 @@ <div class="xboxcontent"> <div id="MyAssignmentsData"> <h3>My Assignments</h3> - <asp:GridView ID="GridView1" runat="server" GridLines="None" AllowPaging="True" AllowSorting="True" - AutoGenerateColumns="False" DataSourceID="AssignmentDataSource" RowStyle-CssClass="gridhover" OnRowDataBound="GridView1_RowDataBound" Width="100%" > + <asp:ObjectDataSource ID="AssignmentDataSource" runat="server" OldValuesParameterFormatString="original_{0}" + SelectMethod="GetData" TypeName="dadDataSetTableAdapters.db_assignmentsTableAdapter"> + <SelectParameters> + <asp:Parameter Name="aType" Type="String" /> + <asp:Parameter Name="finished" Type="Int32" /> + <asp:SessionParameter Name="assignedID" SessionField="id" Type="Int32" /> + <asp:Parameter Name="highPriority" Type="Boolean" /> + </SelectParameters> + </asp:ObjectDataSource> + <asp:GridView ID="AssignmentsGridView" runat="server" GridLines="None" AllowPaging="True" AllowSorting="True" + AutoGenerateColumns="False" RowStyle-CssClass="gridhover" DataSourceID="AssignmentDataSource" OnRowDataBound="AssignmentsGridView_RowDataBound" Width="100%" > <Columns> <asp:ImageField DataImageUrlField="highPriority" ShowHeader="False"> </asp:ImageField> @@ -384,15 +405,6 @@ </Columns> <RowStyle CssClass="gridhover" /> </asp:GridView> - <asp:ObjectDataSource ID="AssignmentDataSource" runat="server" OldValuesParameterFormatString="original_{0}" - SelectMethod="GetData" TypeName="dadDataSetTableAdapters.db_assignmentsTableAdapter"> - <SelectParameters> - <asp:Parameter Name="aType" Type="String" /> - <asp:Parameter Name="finished" Type="Int32" /> - <asp:SessionParameter Name="assignedID" SessionField="id" Type="Int32" /> - <asp:Parameter Name="highPriority" Type="Boolean" /> - </SelectParameters> - </asp:ObjectDataSource> </div> Modified: Website/Includes/AssignmentsTree.ascx =================================================================== --- Website/Includes/AssignmentsTree.ascx 2006-07-11 21:36:18 UTC (rev 100) +++ Website/Includes/AssignmentsTree.ascx 2006-07-11 22:27:04 UTC (rev 101) @@ -3,15 +3,12 @@ <%@ Import Namespace="System.Data" %> <%@ Import Namespace="System.Collections.Generic" %> <%@ Import Namespace="TCDB_Assignments" %> +<%@ Import Namespace="TCDB_Common" %> <%@ Import Namespace="TCDB_Users" %> <script runat="server">TCDB_User g_user = TCDB_UserDB.TCDB_GetUserInstance();</script> <script runat="server"> - protected void Page_Load(object sender, EventArgs e) - { - } - public void updateTree() { foreach (TreeNode node in AssignmentsTree.Nodes) @@ -24,9 +21,6 @@ protected void AssignmentsTree_TreeNodePopulate(object sender, TreeNodeEventArgs e) { - TreeView tv = (TreeView)sender; - DataSet ResultsDataSet = new DataSet(); - // Call the appropriate method to populate a node at a particular level. switch (e.Node.Depth) { @@ -56,13 +50,13 @@ if (a.ISACTIONITEM) { child.Value = a.ACTIONITEM.ID.ToString(); - child.NavigateUrl = "~/ActionItem.aspx?id="+child.Value; + child.NavigateUrl = "~/ActionItem.aspx?" + TCDB_Constant.CODE_AI + "=" + child.Value; } else { // TODO: Enable this! child.Value = a.WORKORDER.ID.ToString(); - child.NavigateUrl = "~/WorkOrder.aspx?id="+child.Value; + child.NavigateUrl = "~/WorkOrder.aspx?" + TCDB_Constant.CODE_WO + "=" + child.Value; } // Set the PopulateOnDemand property to true so that the child nodes can be @@ -87,26 +81,23 @@ { foreach (TCDB_User u in userList) { - if (u.USERNAME == "jjohnson") - { - // Create the new child node. - TreeNode child = new TreeNode(); - child.Text = u.FULLNAME; - child.Value = u.ID.ToString(); + // Create the new child node. + TreeNode child = new TreeNode(); + child.Text = u.FULLNAME; + child.Value = u.ID.ToString(); - // Set the PopulateOnDemand property to true so that the child nodes can be - // dynamically populated. - child.PopulateOnDemand = true; + // Set the PopulateOnDemand property to true so that the child nodes can be + // dynamically populated. + child.PopulateOnDemand = true; - // Set additional properties for the node. - child.SelectAction = TreeNodeSelectAction.Expand; - // TODO: Make sure that when the node is clicked on, it brings up a list of assignments - // for the specified user as the user would see them - child.NavigateUrl = "~/Assignments.aspx?id="+child.Value; + // Set additional properties for the node. + child.SelectAction = TreeNodeSelectAction.Expand; + // TODO: Make sure that when the node is clicked on, it brings up a list of assignments + // for the specified user as the user would see them + child.NavigateUrl = "~/Assignments.aspx?" + TCDB_Constant.CODE_USER + "=" + child.Value; - // Add the new child node to the ChildNodes collection of the parent node. - parent.ChildNodes.Add(child); - } + // Add the new child node to the ChildNodes collection of the parent node. + parent.ChildNodes.Add(child); } } } Modified: Website/Includes/Authenticate.ascx =================================================================== --- Website/Includes/Authenticate.ascx 2006-07-11 21:36:18 UTC (rev 100) +++ Website/Includes/Authenticate.ascx 2006-07-11 22:27:04 UTC (rev 101) @@ -80,7 +80,7 @@ } else { - int i = 1; + // TODO: Create this error message //ErrorLabel.Text = "Error logging in. Please try again."; } } @@ -111,6 +111,7 @@ // TODO: after implementing the commented out section, default admin = null TCDB_User admin = product.QALEAD; /* + // TODO: What happens if there is more than one user with this right? if (product.QALEAD.GetRights().HasRight(TCDB_Constant.RIGHTS_ASSIGNPERMISSION, product)) { admin = product.QALEAD; @@ -126,8 +127,9 @@ */ // Send an action item - TCDB_ActionItem ai = new TCDB_ActionItem(0, TCDB_Constant.USER_AI_NAME + newUser.FIRSTNAME, - TCDB_Constant.USER_AI_DESCRIPTION + newUser.FULLNAME, admin, newUser, 0); + + TCDB_ActionItem ai = new TCDB_ActionItem(0, TCDB_Constant.USER_AI_NAME + newUser.FIRSTNAME, + TCDB_Constant.USER_AI_DESCRIPTION + newUser.FULLNAME, newUser, admin, 0); if (!TCDB_ActionItemDB.TCDB_SaveActionItem(ai)) { // TODO: Populate the results control with text from the DB Modified: Website/Includes/Header.ascx =================================================================== --- Website/Includes/Header.ascx 2006-07-11 21:36:18 UTC (rev 100) +++ Website/Includes/Header.ascx 2006-07-11 22:27:04 UTC (rev 101) @@ -6,20 +6,10 @@ <%@ Import Namespace="TCDB_Users" %> <script runat="server">TCDB_User g_user = TCDB_UserDB.TCDB_GetUserInstance();</script> -<script runat="server"> - -</script> - <div id="Logo"></div> <% if (g_user.ID > TCDB_Constant.USER_ANONYMOUSUSERID) { - userID = (int)(Session["userID"]); - } - catch { } - if (userID > TCDB_Constant.USER_ANONYMOUSUSERID) - { - user = new TCDB_User((int)(Session["userID"])); %> <div id="MainMenu"> <div id="User"> Modified: Website/TCDB.master =================================================================== --- Website/TCDB.master 2006-07-11 21:36:18 UTC (rev 100) +++ Website/TCDB.master 2006-07-11 22:27:04 UTC (rev 101) @@ -17,7 +17,8 @@ <div id="HeaderContent"> <TCDB:Header runat="server" id="Header" /> </div> - <% if (g_user.ISAUTHENTICATED) + <% + if (g_user.ISAUTHENTICATED) { %> <div id="TreeContent"> <asp:ContentPlaceHolder ID="TreeContentPlaceHolder" runat="server"> Modified: Website/web.config =================================================================== --- Website/web.config 2006-07-11 21:36:18 UTC (rev 100) +++ Website/web.config 2006-07-11 22:27:04 UTC (rev 101) @@ -47,8 +47,6 @@ <connectionStrings> <add name="dadConnectionString" connectionString="Data Source=dad\sqlserver2005;Initial Catalog=tcdb;Persist Security Info=True;User ID=tcdb;Password=tcdbpw" providerName="System.Data.SqlClient" /> - <add name="tcdbConnectionString" connectionString="Data Source=dad\sqlserver2005;Initial Catalog=tcdb;Persist Security Info=True;User ID=sa;Password=Test123" - providerName="System.Data.SqlClient" /> </connectionStrings> <system.web> <authentication mode="Forms"> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |