From: <ro...@us...> - 2006-07-11 20:59:39
|
Revision: 99 Author: rouquin Date: 2006-07-11 13:59:23 -0700 (Tue, 11 Jul 2006) ViewCVS: http://svn.sourceforge.net/tcdb/?rev=99&view=rev Log Message: ----------- Added Product Admin page and a few little workflow buttons. Modified Paths: -------------- WebPrototype/Admin.aspx.cs WebPrototype/AdminMaster.master.cs WebPrototype/App_Data/ASPNETDB.MDF WebPrototype/App_Data/Database.mdf WebPrototype/App_Data/Database_log.LDF WebPrototype/App_Data/aspnetdb_log.ldf WebPrototype/testpassEdit.aspx WebPrototype/testpassEdit.aspx.cs WebPrototype/versionEdit.aspx WebPrototype/versionEdit.aspx.cs Added Paths: ----------- WebPrototype/ProductAdmin.aspx WebPrototype/ProductAdmin.aspx.cs Modified: WebPrototype/Admin.aspx.cs =================================================================== --- WebPrototype/Admin.aspx.cs 2006-07-11 19:44:06 UTC (rev 98) +++ WebPrototype/Admin.aspx.cs 2006-07-11 20:59:23 UTC (rev 99) @@ -8,6 +8,7 @@ using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; +using Microsoft.Web.UI; public partial class Admin : System.Web.UI.Page { @@ -15,5 +16,8 @@ { if (!User.Identity.IsAuthenticated || Profile.userID == "") Response.Redirect("Default.aspx"); + + UpdatePanel notes = (UpdatePanel)Master.FindControl("noteViewUpdatePanel"); + notes.Visible = false; } } Modified: WebPrototype/AdminMaster.master.cs =================================================================== --- WebPrototype/AdminMaster.master.cs 2006-07-11 19:44:06 UTC (rev 98) +++ WebPrototype/AdminMaster.master.cs 2006-07-11 20:59:23 UTC (rev 99) @@ -67,7 +67,7 @@ // Set additional properties for the node. newNode.SelectAction = TreeNodeSelectAction.Expand; - //newNode.NavigateUrl = "~/ProductEdit.aspx?id=" + newNode.Value; + newNode.NavigateUrl = "~/ProductAdmin.aspx?id=" + newNode.Value; // Add the new node to the ChildNodes collection of the parent node. e.Node.ChildNodes.Add(newNode); 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) Added: WebPrototype/ProductAdmin.aspx =================================================================== --- WebPrototype/ProductAdmin.aspx (rev 0) +++ WebPrototype/ProductAdmin.aspx 2006-07-11 20:59:23 UTC (rev 99) @@ -0,0 +1,16 @@ +<%@ Page Language="C#" MasterPageFile="~/AdminMaster.master" AutoEventWireup="true" + CodeFile="ProductAdmin.aspx.cs" Inherits="ProductAdmin" %> + +<%@ MasterType VirtualPath="~/AdminMaster.master" %> +<asp:Content ID="Content1" ContentPlaceHolderID="PageContent" runat="Server"> + <table width=700> + <tr> + <td align=center valign=middle> + <asp:LinkButton ID="newVersionBtn" runat="server" CommandName="newVersion" OnCommand="newVersion">New Version</asp:LinkButton> + <asp:LinkButton ID="newTagBtn" runat="server" CommandName="newTag" OnCommand="newTag">newTag</asp:LinkButton> + <asp:LinkButton ID="newStatusBtn" runat="server" CommandName="newStatus" OnCommand="newStatus">New Status</asp:LinkButton> + <asp:LinkButton ID="newLabBtn" runat="server" CommandName="newLab" OnCommand="newLab">New Lab</asp:LinkButton> + <asp:LinkButton ID="newUserRightBtn" runat="server" CommandName="newUserRight" OnCommand="newUserRight">newUserRight</asp:LinkButton></td> + </tr> + </table> +</asp:Content> Added: WebPrototype/ProductAdmin.aspx.cs =================================================================== --- WebPrototype/ProductAdmin.aspx.cs (rev 0) +++ WebPrototype/ProductAdmin.aspx.cs 2006-07-11 20:59:23 UTC (rev 99) @@ -0,0 +1,50 @@ +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; + +public partial class ProductAdmin : System.Web.UI.Page +{ + String id = HttpContext.Current.Request.QueryString["id"]; + + protected void Page_Load(object sender, EventArgs e) + { + if (id != null) + { + DummyDataSetTableAdapters.productTableAdapter adapter = new DummyDataSetTableAdapters.productTableAdapter(); + DummyDataSet.productDataTable product = adapter.GetAllProductData(); + + DummyDataSet.productRow row = product.FindByproductID(Convert.ToInt32(id)); + if (row != null) + Page.Title = row.name; + } + else + Response.Redirect("~/Admin.aspx"); + } + protected void newVersion(object sender, CommandEventArgs e) + { + Response.Redirect("~/versionEdit.aspx?mode=new&product=" + id); + } + protected void newTag(object sender, CommandEventArgs e) + { + Response.Redirect("~/tagEdit.aspx?mode=new&product=" + id); + } + protected void newStatus(object sender, CommandEventArgs e) + { + Response.Redirect("~/statusEdit.aspx?mode=new&product=" + id); + } + protected void newLab(object sender, CommandEventArgs e) + { + Response.Redirect("~/labEdit.aspx?mode=new&product=" + id); + } + protected void newUserRight(object sender, CommandEventArgs e) + { + Response.Redirect("~/userRightsEdit.aspx?mode=new&product=" + id); + } +} Modified: WebPrototype/testpassEdit.aspx =================================================================== --- WebPrototype/testpassEdit.aspx 2006-07-11 19:44:06 UTC (rev 98) +++ WebPrototype/testpassEdit.aspx 2006-07-11 20:59:23 UTC (rev 99) @@ -90,7 +90,7 @@ <td align=left style="width: 100px"> <strong>Version: </strong> <asp:DropDownList ID="versionList" runat="server" DataSourceID=VersionDataSource - DataTextField=number DataValueField=versionID SelectedValue='<%# Bind("versionID") %>' /> + DataTextField=number DataValueField=versionID SelectedValue='<%# Bind("versionID") %>' OnDataBound=versionList_DataBound /> </td> </tr> <tr> Modified: WebPrototype/testpassEdit.aspx.cs =================================================================== --- WebPrototype/testpassEdit.aspx.cs 2006-07-11 19:44:06 UTC (rev 98) +++ WebPrototype/testpassEdit.aspx.cs 2006-07-11 20:59:23 UTC (rev 99) @@ -15,6 +15,7 @@ { int id = Convert.ToInt32(HttpContext.Current.Request.QueryString["id"]); String mode = HttpContext.Current.Request.QueryString["mode"]; + String version = HttpContext.Current.Request.QueryString["version"]; protected void Page_Load(object sender, EventArgs e) { @@ -60,4 +61,12 @@ notes.Visible = true; } + protected void versionList_DataBound(object sender, EventArgs e) + { + if (FormView1.CurrentMode==FormViewMode.Insert && version != null) + { + DropDownList versionList = (DropDownList)sender; + versionList.SelectedValue = version; + } + } } Modified: WebPrototype/versionEdit.aspx =================================================================== --- WebPrototype/versionEdit.aspx 2006-07-11 19:44:06 UTC (rev 98) +++ WebPrototype/versionEdit.aspx 2006-07-11 20:59:23 UTC (rev 99) @@ -55,7 +55,12 @@ Text="Delete"></asp:LinkButton> </td> <td colspan=3> - </td> + + <asp:LinkButton ID="newTestPass" runat="server" CommandArgument='<%# Eval("versionID") %>' + OnCommand="newTestPass">New Test Pass</asp:LinkButton> + + <asp:LinkButton ID="newBuild" runat="server" CommandArgument='<%# Eval("versionID") %>' + OnCommand="newBuild" PostBackUrl="~/buildEdit.aspx?mode=new">New Build</asp:LinkButton></td> </tr> </table> </div> @@ -135,7 +140,7 @@ <td colspan=4 align=left style="height: 18px"> <strong>Product:</strong> <asp:DropDownList ID="productList" runat="server" DataSourceID="ProductDataSource" - DataTextField="name" DataValueField="productID" SelectedValue='<%# Bind("productID") %>'> + DataTextField="name" DataValueField="productID" SelectedValue='<%# Bind("productID") %>' OnDataBound=productList_DataBound> </asp:DropDownList><asp:ObjectDataSource ID="ProductDataSource" runat="server" OldValuesParameterFormatString="original_{0}" SelectMethod="GetAllProductData" TypeName="DummyDataSetTableAdapters.productTableAdapter"> </asp:ObjectDataSource> Modified: WebPrototype/versionEdit.aspx.cs =================================================================== --- WebPrototype/versionEdit.aspx.cs 2006-07-11 19:44:06 UTC (rev 98) +++ WebPrototype/versionEdit.aspx.cs 2006-07-11 20:59:23 UTC (rev 99) @@ -14,6 +14,7 @@ { String id = HttpContext.Current.Request.QueryString["id"]; String mode = HttpContext.Current.Request.QueryString["mode"]; + String product = HttpContext.Current.Request.QueryString["product"]; protected void Page_Load(object sender, EventArgs e) { @@ -68,4 +69,20 @@ active.Checked = Boolean.Parse(row["active"].ToString()); } } + protected void newTestPass(object sender, CommandEventArgs e) + { + Response.Redirect("~/TestPassEdit.aspx?mode=new&version=" + e.CommandArgument); + } + protected void newBuild(object sender, CommandEventArgs e) + { + Response.Redirect("~/BuildEdit.aspx?mode=new&version=" + e.CommandArgument); + } + protected void productList_DataBound(object sender, EventArgs e) + { + if (FormView1.CurrentMode==FormViewMode.Insert && product != null) + { + DropDownList productList = (DropDownList)sender; + productList.SelectedValue = product; + } + } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |