From: <ro...@us...> - 2006-07-05 20:59:02
|
Revision: 66 Author: rouquin Date: 2006-07-05 13:58:45 -0700 (Wed, 05 Jul 2006) ViewCVS: http://svn.sourceforge.net/tcdb/?rev=66&view=rev Log Message: ----------- Started new Admin Master page. Other minor updates. Modified Paths: -------------- WebPrototype/Admin.aspx WebPrototype/App_Data/ASPNETDB.MDF WebPrototype/App_Data/Database.mdf WebPrototype/App_Data/Database_log.LDF WebPrototype/App_Data/aspnetdb_log.ldf WebPrototype/Default.aspx.cs WebPrototype/MasterPage.master WebPrototype/MasterPage.master.cs WebPrototype/Settings.aspx.cs WebPrototype/Web.config Added Paths: ----------- WebPrototype/AdminMaster.master WebPrototype/AdminMaster.master.cs Modified: WebPrototype/Admin.aspx =================================================================== --- WebPrototype/Admin.aspx 2006-07-05 20:02:16 UTC (rev 65) +++ WebPrototype/Admin.aspx 2006-07-05 20:58:45 UTC (rev 66) @@ -1,4 +1,6 @@ -<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="Admin.aspx.cs" Inherits="Admin" Title="TCDB: Admin" %> +<%@ Page Language="C#" MasterPageFile="~/AdminMaster.master" AutoEventWireup="true" CodeFile="Admin.aspx.cs" Inherits="Admin" Title="TCDB: Admin" %> +<%@ MasterType VirtualPath="~/AdminMaster.master" %> + <asp:Content ID="Content1" ContentPlaceHolderID="PageContent" Runat="Server"> </asp:Content> Added: WebPrototype/AdminMaster.master =================================================================== --- WebPrototype/AdminMaster.master (rev 0) +++ WebPrototype/AdminMaster.master 2006-07-05 20:58:45 UTC (rev 66) @@ -0,0 +1,162 @@ +<%@ Master Language="C#" AutoEventWireup="true" CodeFile="AdminMaster.master.cs" Inherits="AdminMaster" %> +<%@ Register Assembly="AtlasControlToolkit" Namespace="AtlasControlToolkit" TagPrefix="atlas" %> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head runat="server"> + <title>TCDB</title> +</head> +<body class="master"> + <atlas:ScriptManager ID="scriptManager" EnablePartialRendering="true" runat="server"> + </atlas:ScriptManager> + <div id="nonFooter"> + <form id="Form1" runat=server> + <div id="header"> + <table width=100%> + <tr height=50> + <td align=left valign=top> + <a href="Default.aspx"> + <asp:Image ID=logo runat=server ImageUrl="~/App_Themes/Python/Images/TCDB-2006-Logo-on-Blue.gif" /></a> + </td> + <td align=right valign=top> + <div id="menu"> + <asp:LoginView ID="MenuLoginView" runat="server"> + <LoggedInTemplate> + Welcome <div class="username"> + <asp:LoginName ID=LoginName1 runat=server /> + </div> + | <a href="Settings.aspx" class="header">Settings</a> | <asp:LoginStatus + ID="LoginStatus1" runat="server" OnLoggedOut=LoginStatus1_LoggedOut /> + <div id="options"> + <div id="build"> + VSM | 1.1 | Alpha | 134</div> + <div id="tasks"> + <a href="Assignments.aspx" class="header">Assignments</a> | <a href="Execution.aspx" + class="header">Execution</a> | <a href="TestManagement.aspx" class="header">Test Management</a> + </div> + </div> + </LoggedInTemplate> + <RoleGroups> + <asp:RoleGroup Roles="Admin"> + <ContentTemplate> + Welcome <div class="username"> + <asp:LoginName ID=LoginName2 runat=server /> + </div> + | <a href="Settings.aspx" class="header">Settings</a> | <a href="Admin.aspx" + class="header">Admin</a> | <asp:LoginStatus ID="LoginStatus1" runat="server" /> + <div id="options"> + <div id="build"> + VSM | 1.1 | Alpha | 134</div> + <div id="tasks"> + <a href="Assignments.aspx" class="header">Assignments</a> | <a href="Execution.aspx" + class="header">Execution</a> | <a href="TestManagement.aspx" class="header">Test Management</a> + </div> + </div> + </ContentTemplate> + </asp:RoleGroup> + </RoleGroups> + </asp:LoginView> + </div> + </td> + </tr> + </table> + </div> + <div id="content" class="fullheight"> + <asp:SiteMapPath ID="SiteMapPath1" runat="server"> + <PathSeparatorTemplate> + > + </PathSeparatorTemplate> + </asp:SiteMapPath> + <br /> + <br /> + <table> + <tr> + <td width=200 valign=top> + <atlas:UpdatePanel ID=treeViewUpdatePanel runat="server" Mode=Conditional> + <ContentTemplate> + <asp:TreeView ID=TreeView1 runat="server" SelectedNodeStyle-CssClass="selectednode" + OnTreeNodePopulate=TreeView1_TreeNodePopulate ExpandDepth=FullyExpand> + <Nodes> + <asp:TreeNode Text="Products" Value="Users" PopulateOnDemand="True" SelectAction=Expand + NavigateUrl="~/TestManagement.aspx" /> + </Nodes> + <SelectedNodeStyle CssClass="selectednode" /> + </asp:TreeView> + </ContentTemplate> + <Triggers> + <atlas:ControlEventTrigger ControlID="PageContent" EventName="Load" /> + </Triggers> + </atlas:UpdatePanel> + </td> + <td align=center valign=top> + <div> + <asp:ContentPlaceHolder ID="PageContent" runat="server"> + </asp:ContentPlaceHolder> + </div> + </td> + <td align="right" valign="top"> + <atlas:UpdatePanel ID=noteViewUpdatePanel runat="server" Mode=Conditional> + <ContentTemplate> + <div style="padding-left: 10px; text-align: left;"> + <a href="#" style="padding-left: 10px; text-align: left;">New Note</a></div> + <table width="225" cellpadding="0" cellspacing="0" border="0" style="padding: 10px;"> + <tr> + <td> + <b class="notetop"><b class="noteb1"></b><b class="noteb2"></b><b class="noteb3"></b> + <b class="noteb4"></b></b> + <div class="noteboxcontent"> + <table width="100%" cellpadding="0" cellspacing="0" border="0"> + <tr> + <asp:Panel ID="Panel3" runat="server" CssClass="collapsePanelHeader"> + <td align="left" valign="bottom"> + <h4> + Reminder:</h4> + 15 Apr 2006 </td> + <td align="right" valign="bottom"> + <img alt="Note2Arrow" src="App_Themes/Python/Images/ArrowUp.gif" id="Note2Arrow" /> + <a href="#" class="notedelete">x</a></td> + </asp:Panel> + </tr> + </table> + <atlas:CollapsiblePanelExtender ID="CollapsiblePanelExtender2" runat="server"> + <atlas:CollapsiblePanelProperties Collapsed="true" SuppressPostBack="true" CollapseControlID="Note2Arrow" + ExpandControlID="Note2Arrow" ExpandedImage="App_Themes/Python/Images/ArrowUp.gif" + CollapsedImage="App_Themes/Python/Images/ArrowDown.gif" TargetControlID="Note2Content" + AutoCollapse="false" AutoExpand="false" CollapsedSize="0" ImageControlID="Note2Arrow" /> + </atlas:CollapsiblePanelExtender> + <asp:Panel ID="Note2Content" runat="server" Height="0" Style="overflow: hidden; padding: 0px; + margin: 0px;"> + <table width="100%" cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="hr"> + <img alt="" src="images/spacer.gif" height="5" /><br /> + </td> + </tr> + </table> + Integer lacus elit, consectetuer nec, rutrum at, pretium ac, risus. Sed semper massa + luctus mi. Donec placerat, diam vitae ultricies posuere, felis dui sollicitudin + nibh, eget blandit purus libero in elit. Aenean eget lectus eget ipsum rutrum scelerisque. + Nunc orci mauris, rhoncus ac, pellentesque sit amet, condimentum vel, nibh. Pellentesque + habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. + Suspendisse blandit. + </asp:Panel> + </div> + <b class="notebottom"><b class="noteb4"></b><b class="noteb3"></b><b class="noteb2"> + </b></b><b class="noteb1"></b></td> + </tr> + </table> + </ContentTemplate> + <Triggers> + <atlas:ControlEventTrigger ControlID="PageContent" EventName="Load" /> + </Triggers> + </atlas:UpdatePanel> + </td> + </tr> + </table> + </div> + </form> + </div> + <div id="footer"> + \xA9 2006 <a href="http://www.quest.com">Quest Software, Inc.</a> | <a href="Privacy.aspx"> + Privacy Policy</a> | <a href="SiteMap.aspx">Site Map</a></div> +</body> +</html> Added: WebPrototype/AdminMaster.master.cs =================================================================== --- WebPrototype/AdminMaster.master.cs (rev 0) +++ WebPrototype/AdminMaster.master.cs 2006-07-05 20:58:45 UTC (rev 66) @@ -0,0 +1,132 @@ +using System; +using System.Data; +using System.Configuration; +using System.Collections; +using System.Web; +using System.Web.Security; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Web.UI.WebControls.WebParts; +using System.Web.UI.HtmlControls; +using System.Data.SqlClient; + +public partial class AdminMaster : System.Web.UI.MasterPage +{ + private SqlConnection _DBConnection = new System.Data.SqlClient.SqlConnection("Data Source=.\\SQLEXPRESS;AttachDbFilename=|DataDirectory|\\Database.mdf;Integrated Security=True;User Instance=True"); + + protected void Page_Load(object sender, EventArgs e) + { + DBConnection.Open(); + } + public SqlConnection DBConnection { + get { return _DBConnection; } + } + protected void LoginStatus1_LoggedOut(object sender, EventArgs e) + { + Response.Redirect("Default.aspx"); + } + public void updateTree() + { + foreach (TreeNode node in TreeView1.Nodes) + { + node.ChildNodes.Clear(); + TreeView1_TreeNodePopulate(TreeView1, new TreeNodeEventArgs(node)); + } + TreeView1.ExpandAll(); + } + + protected void TreeView1_TreeNodePopulate(object sender, TreeNodeEventArgs e) + { + TreeView tv = (TreeView)sender; + DataSet ResultsDataSet = new DataSet(); + SqlDataAdapter DBAdapter; + String query; + + // Call the appropriate method to populate a node at a particular level. + switch (e.Node.Depth) + { + case 0: + // Populate the first-level nodes. + DBAdapter = new SqlDataAdapter("SELECT * FROM product", DBConnection); + DBAdapter.Fill(ResultsDataSet); + + if (ResultsDataSet.Tables.Count > 0) + { + foreach (DataRow row in ResultsDataSet.Tables[0].Rows) + { + // Create the new node. + TreeNode newNode = new TreeNode(); + newNode.Text = "<font color=black><b>"+row["Name"]+"</b></font>"; + newNode.Value = row["productID"].ToString(); + + // Set the PopulateOnDemand property to true so that the child nodes can be + // dynamically populated. + newNode.PopulateOnDemand = true; + + // Set additional properties for the node. + newNode.SelectAction = TreeNodeSelectAction.Expand; + newNode.NavigateUrl = "~/ProductEdit.aspx?id=" + newNode.Value; + + // Add the new node to the ChildNodes collection of the parent node. + e.Node.ChildNodes.Add(newNode); + } + } + break; + case 1: + // Populate Product Versions + query = "SELECT * FROM version where productID="+e.Node.Value; + DBAdapter = new SqlDataAdapter(query, DBConnection); + DBAdapter.Fill(ResultsDataSet); + + if (ResultsDataSet.Tables.Count > 0){ + foreach (DataRow row in ResultsDataSet.Tables[0].Rows){ + // Create the new node. + TreeNode newNode = new TreeNode(); + newNode.Text = "<font color=black><i>"+row["number"]+"</i></font>"; + newNode.Value = row["versionID"].ToString(); + + // Set the PopulateOnDemand property to true so that the child nodes can be + // dynamically populated. + newNode.PopulateOnDemand = true; + + // Set additional properties for the node. + newNode.SelectAction = TreeNodeSelectAction.Expand; + newNode.NavigateUrl = "~/VersionEdit.aspx?id=" + newNode.Value; + + // Add the new node to the ChildNodes collection of the parent node. + e.Node.ChildNodes.Add(newNode); + } + } + break; + case 2: + // Populate Builds + query = "SELECT * FROM build where versionID=" + e.Node.Value; + DBAdapter = new SqlDataAdapter(query, DBConnection); + DBAdapter.Fill(ResultsDataSet); + + if (ResultsDataSet.Tables.Count > 0) + { + foreach (DataRow row in ResultsDataSet.Tables[0].Rows) + { + // Create the new node. + TreeNode newNode = new TreeNode(); + newNode.Text = "<font color=black><i>" + row["number"] + "</i></font>"; + newNode.Value = row["buildID"].ToString(); + + // Set the PopulateOnDemand property to true so that the child nodes can be + // dynamically populated. + newNode.PopulateOnDemand = true; + + // Set additional properties for the node. + newNode.SelectAction = TreeNodeSelectAction.Expand; + newNode.NavigateUrl = "~/BuildEdit.aspx?id=" + newNode.Value; + + // Add the new node to the ChildNodes collection of the parent node. + e.Node.ChildNodes.Add(newNode); + } + } + break; + } + } + +} Modified: WebPrototype/App_Data/ASPNETDB.MDF =================================================================== (Binary files differ) Modified: WebPrototype/App_Data/Database.mdf =================================================================== (Binary files differ) Modified: WebPrototype/App_Data/Database_log.LDF =================================================================== (Binary files differ) Modified: WebPrototype/App_Data/aspnetdb_log.ldf =================================================================== (Binary files differ) Modified: WebPrototype/Default.aspx.cs =================================================================== --- WebPrototype/Default.aspx.cs 2006-07-05 20:02:16 UTC (rev 65) +++ WebPrototype/Default.aspx.cs 2006-07-05 20:58:45 UTC (rev 66) @@ -32,6 +32,8 @@ pc.userID = row["userID"].ToString(); pc.FirstName = row["firstName"].ToString(); pc.LastName = row["lastName"].ToString(); + pc.defaultProduct = "VAS"; + pc.defaultProductID = "0"; pc.Save(); Response.Redirect("Assignments.aspx?id=" + pc.userID); Modified: WebPrototype/MasterPage.master =================================================================== --- WebPrototype/MasterPage.master 2006-07-05 20:02:16 UTC (rev 65) +++ WebPrototype/MasterPage.master 2006-07-05 20:58:45 UTC (rev 66) @@ -18,14 +18,14 @@ </td> <td align=right valign=top> <div id="menu"> - <asp:LoginView ID="MenuLoginView" runat="server"> + <asp:LoginView ID="MenuLoginView" runat="server" OnLoad=MenuLoginView_Load> <LoggedInTemplate> Welcome <div class="username"><asp:LoginName ID=LoginName1 runat=server /></div> | <a href="Settings.aspx" class="header">Settings</a> | <asp:LoginStatus ID="LoginStatus1" runat="server" OnLoggedOut=LoginStatus1_LoggedOut /> <div id="options"> <div id="build"> - VSM | 1.1 | Alpha | 134</div> + <asp:LinkButton ID=productLink runat="server" CommandName=productEdit OnCommand=productEdit /> | 1.1 | Alpha | 134</div> <div id="tasks"> <a href="Assignments.aspx" class="header">Assignments</a> | <a href="Execution.aspx" class="header">Execution</a> | <a href="TestManagement.aspx" class="header">Test Management</a> @@ -40,7 +40,7 @@ class="header">Admin</a> | <asp:LoginStatus ID="LoginStatus1" runat="server" /> <div id="options"> <div id="build"> - VSM | 1.1 | Alpha | 134</div> + <asp:LinkButton ID=productLink runat="server" CommandName=productEdit OnCommand=productEdit /> | 1.1 | Alpha | 134</div> <div id="tasks"> <a href="Assignments.aspx" class="header">Assignments</a> | <a href="Execution.aspx" class="header">Execution</a> | <a href="TestManagement.aspx" class="header">Test Management</a> Modified: WebPrototype/MasterPage.master.cs =================================================================== --- WebPrototype/MasterPage.master.cs 2006-07-05 20:02:16 UTC (rev 65) +++ WebPrototype/MasterPage.master.cs 2006-07-05 20:58:45 UTC (rev 66) @@ -26,4 +26,14 @@ { Response.Redirect("Default.aspx"); } + protected void productEdit(object sender, CommandEventArgs e) + { + Response.Redirect("ProductEdit.aspx?id=" + Profile.defaultProductID); + } + protected void MenuLoginView_Load(object sender, EventArgs e) + { + LinkButton productLink = (LinkButton)MenuLoginView.FindControl("productLink"); + if (productLink != null) + productLink.Text = Profile.defaultProduct; + } } Modified: WebPrototype/Settings.aspx.cs =================================================================== --- WebPrototype/Settings.aspx.cs 2006-07-05 20:02:16 UTC (rev 65) +++ WebPrototype/Settings.aspx.cs 2006-07-05 20:58:45 UTC (rev 66) @@ -61,6 +61,8 @@ pc.UserName = User.Identity.Name; pc.FirstName = (String)e.Values["firstName"]; pc.LastName = (String)e.Values["lastName"]; + pc.defaultProductID = "0"; + pc.defaultProduct = "VAS"; pc.Save(); } Response.Redirect("Settings.aspx?id="+id); Modified: WebPrototype/Web.config =================================================================== --- WebPrototype/Web.config 2006-07-05 20:02:16 UTC (rev 65) +++ WebPrototype/Web.config 2006-07-05 20:58:45 UTC (rev 66) @@ -64,6 +64,8 @@ <add name="FirstName" allowAnonymous="true" /> <add name="LastName" allowAnonymous="true" /> <add name="userID" allowAnonymous="true" /> + <add name="defaultProductID" allowAnonymous="true" /> + <add name="defaultProduct" allowAnonymous="true" /> </properties> </profile> <!-- This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |