From: <ro...@us...> - 2006-06-22 23:23:41
|
Revision: 47 Author: rouquin Date: 2006-06-22 16:23:19 -0700 (Thu, 22 Jun 2006) ViewCVS: http://svn.sourceforge.net/tcdb/?rev=47&view=rev Log Message: ----------- Updated Assignments, ActionItemEdit, and WorkOrderEdit to user AssignmentMaster.master which has the Assignment Tree and notes columns. Fixed some formatting issues. Added Priority Flag on assignments, added priority filtering, combined workorders and features, move "new note" link to top, changed disabled controls to labels in view modes, added set all buttons for test case status, added dynamic test status header. Add TestMaster and updated TestManagement and ProductEdit to use it. TestMaster contains Feature Tree and Note view. Updated Product format and added redirection after insert and delete. Added link buttons to create new product/feature/objective/testcase on TestManagement screen (maybe change these to icons or something.) Tried to add an update panel to FormViews. This worked for WorkOrderEdit but not for ActionItemEdit. (couldn't change into editmode). I couldn't figure out why but I think it may be a timing issue. I removed them. All ready to connect to the real database when the queries are ready. Modified Paths: -------------- WebPrototype/ActionItemEdit.aspx WebPrototype/ActionItemEdit.aspx.cs WebPrototype/App_Code/DummyDataSet.xsd WebPrototype/App_Code/DummyDataSet.xss WebPrototype/App_Data/ASPNETDB.MDF WebPrototype/App_Data/Database.mdf WebPrototype/App_Data/Database_log.LDF WebPrototype/App_Data/aspnetdb_log.ldf WebPrototype/AssignmentMaster.master WebPrototype/Assignments.aspx WebPrototype/Assignments.aspx.cs WebPrototype/ProductEdit.aspx WebPrototype/ProductEdit.aspx.cs WebPrototype/TestManagement.aspx WebPrototype/TestManagement.aspx.cs WebPrototype/Web.sitemap WebPrototype/WorkOrderEdit.aspx WebPrototype/WorkOrderEdit.aspx.cs Added Paths: ----------- WebPrototype/TestMaster.master WebPrototype/TestMaster.master.cs Modified: WebPrototype/ActionItemEdit.aspx =================================================================== --- WebPrototype/ActionItemEdit.aspx 2006-06-21 18:37:29 UTC (rev 46) +++ WebPrototype/ActionItemEdit.aspx 2006-06-22 23:23:19 UTC (rev 47) @@ -1,361 +1,261 @@ -<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" +<%@ Page Language="C#" MasterPageFile="~/AssignmentMaster.master" AutoEventWireup="true" ValidateRequest="false" CodeFile="ActionItemEdit.aspx.cs" Inherits="ActionItemEdit" Title="Action Item" %> +<%@ MasterType VirtualPath="~/AssignmentMaster.master" %> <%@ Register Assembly="EclipseWebSolutions.CustomControls" Namespace="EclipseWebSolutions.CustomControls" TagPrefix="cc1" %> <%@ Register Assembly="FreeTextBox" Namespace="FreeTextBoxControls" TagPrefix="FTB" %> <%@ Register Assembly="AtlasControlToolkit" Namespace="AtlasControlToolkit" TagPrefix="atlas" %> <asp:Content ID="Content1" ContentPlaceHolderID="PageContent" runat="Server"> - - <table border="0" cellpadding="0" cellspacing="0" width="100%"> - <tr> - <td valign=top> - <asp:TreeView ID=TreeView1 runat="server" SelectedNodeStyle-CssClass="selectednode" - OnTreeNodePopulate=TreeView1_TreeNodePopulate> - <Nodes> - <asp:TreeNode Text="User Assignments" Value="Users" PopulateOnDemand="True" SelectAction=Expand NavigateUrl="~/Assignments.aspx" /> - </Nodes> - <SelectedNodeStyle CssClass="selectednode" /> - </asp:TreeView> - </td> - <td width="700px" valign="top"> - <asp:FormView ID="FormView1" runat="server" DataSourceID="ActionItemDataSource" DataKeyNames="actionItemID" - CellPadding=4 ForeColor="#333333" Height=348px OnItemUpdated=FormView1_ItemUpdated - OnItemInserted=FormView1_ItemInserted OnDataBound=FormView1_DataBound OnItemDeleted=FormView1_ItemDeleted> - <EditItemTemplate> - <div class="xsnazzy"> - <b class="xtop"><b class="xb1"></b><b class="xb2"></b><b class="xb3"></b><b class="xb4"> - </b></b> - <div class="xboxcontent"> - <table> - <tr> - <td colspan="2" width="55%"> - <strong> Name:</strong><br /> - <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("name") %>' Width="80%" /> - <br /> - <asp:CheckBox ID="priorityBox" runat="server" Checked='<%# Eval("highPriorityID") %>' />: - <strong>High Priority</strong></td> - <td align=right colspan=2 width="45%"> - <strong>Assigned: - </strong> - <cc1:DatePicker ID="assignedDate" runat="server" DateFormatString="MM/dd/yyyy" DateValue='<%# Eval("dateAssigned") %>' /><br /> - <strong>Due: - </strong> - <cc1:DatePicker ID="dueDate" runat="server" DateFormatString="MM/dd/yyyy" DateValue='<%# Eval("dateDue") %>'/><br /> - <strong>Finished: - </strong> - <cc1:DatePicker ID="finishedDate" runat="server" DateFormatString="MM/dd/yyyy" DateValue='<%# Eval("dateFinished") %>'/> - </td> - </tr> - <tr> - <td colspan="4" class="hr"> - <img alt="" src="images/spacer.gif" height="5" /><br /> - </td> - </tr> - <tr> - <td colspan="4" style="height: 197px"> - <strong>Description:</strong><br /> - <FTB:FreeTextBox ID="FreeTextBox1" runat="server" SupportFolder="~" Text='<%# Bind("description") %>' - Height="100%" Width="100%" /> - </td> - </tr> - <tr> - <td colspan="4" class="hr"> - <img alt="" src="images/spacer.gif" height="5" /><br /> - </td> - </tr> - <tr> - <td colspan=2 width="60%"> - <asp:LinkButton ID="UpdateButton" runat="server" CausesValidation="True" CommandName="Update" - Text="Update"> - </asp:LinkButton> | - <asp:LinkButton ID="UpdateCancelButton" runat="server" CausesValidation="False" CommandName="Cancel" - Text="Cancel"> - </asp:LinkButton> - </td> - <td align=right colspan=2 width="%40"> - <strong>Created By: - <asp:DropDownList ID="createdBy" runat="server" DataSourceID="UserDataSource" - DataTextField="Name" DataValueField="id" SelectedValue='<%# Eval("creatorID","{0}") %>'> - </asp:DropDownList> - </strong> - <br /> - <strong>Assigned To: - <asp:DropDownList ID="assignedTo" runat="server" DataSourceID="UserDataSource" - DataTextField="Name" DataValueField="id" SelectedValue='<%# Eval("assignedID","{0}") %>'> - </asp:DropDownList></strong> - <asp:ObjectDataSource ID="UserDataSource" runat="server" OldValuesParameterFormatString="original_{0}" - SelectMethod="GetUserNames" TypeName="DummyDataSetTableAdapters.UsersTableAdapter"> - </asp:ObjectDataSource> - </td> - </tr> - </table> - </div> - <b class="xbottom"><b class="xb4"></b><b class="xb3"></b><b class="xb2"></b><b class="xb1"> - </b></b> - </div> - </EditItemTemplate> - <ItemTemplate> - <div class="xsnazzy"> - <b class="xtop"><b class="xb1"></b><b class="xb2"></b><b class="xb3"></b><b class="xb4"> - </b></b> - <div class="xboxcontent"> - <table> - <tr> - <td colspan=2 style="width: 55%"> - <asp:Label ID="nameLabel" runat="server" Text='<%# Eval("name") %>' Style="font-size: large; - color: black; font-family: Arial;"></asp:Label> - <br /> - <asp:CheckBox ID="priorityBox" runat="server" Checked='<%# Eval("highPriorityID") %>' - Enabled="False" />: <strong>High Priority</strong></td> - <td align=right colspan=2 width="40%"> - <strong>Assigned: - </strong> - <cc1:DatePicker ID="assignedDate" runat="server" DateFormatString="MM/dd/yyyy" Enabled=False /><br /> - <strong>Due: - </strong> - <cc1:DatePicker ID="dueDate" runat="server" DateFormatString="MM/dd/yyyy" Enabled=False/><br /> - <strong>Finished: - </strong> - <cc1:DatePicker ID="finishedDate" runat="server" DateFormatString="MM/dd/yyyy" Enabled=False/> - </td> - </tr> - <tr> - <td colspan="4" class="hr"> - <img alt="" src="images/spacer.gif" height="5" /><br /> - </td> - </tr> - <tr> - <td colspan=4 style="height: 197px" valign=top> - <strong>Description:</strong><br /> - <asp:Label ID="descriptionLabel" runat="server" Text='<%# Eval("description") %>'></asp:Label> - </td> - </tr> - <tr> - <td colspan="4" class="hr"> - <img alt="" src="images/spacer.gif" height="5" /><br /> - </td> - </tr> - <tr> - <td colspan=2 style="width: 55%"> - <br /> - <asp:LinkButton ID="EditButton" runat="server" CausesValidation="False" CommandName="Edit" - Text="Edit"> - </asp:LinkButton> - | - <asp:LinkButton ID="NewButton" runat="server" CausesValidation="False" CommandName="New" - Text="New"> - </asp:LinkButton> - | - <asp:LinkButton ID="DeleteButton" runat="server" CausesValidation="False" CommandName="Delete" - Text="Delete"> - </asp:LinkButton></td> - <td align=right colspan=2 width="45%"> - <strong>Created By: - <asp:DropDownList ID="createdBy" runat="server" DataSourceID="UserDataSource" - DataTextField="Name" DataValueField="id" SelectedValue='<%# Eval("creatorID","{0}") %>' Enabled=False> - </asp:DropDownList> - </strong> - <br /> - <strong>Assigned To: - <asp:DropDownList ID="assignedTo" runat="server" DataSourceID="UserDataSource" - DataTextField="Name" DataValueField="id" SelectedValue='<%# Eval("assignedID","{0}") %>' Enabled=False> - </asp:DropDownList></strong> - <asp:ObjectDataSource ID="UserDataSource" runat="server" OldValuesParameterFormatString="original_{0}" - SelectMethod="GetUserNames" TypeName="DummyDataSetTableAdapters.UsersTableAdapter"> - </asp:ObjectDataSource> - </td> - </tr> - </table> - </div> - <b class="xbottom"><b class="xb4"></b><b class="xb3"></b><b class="xb2"></b><b class="xb1"> - </b></b> - </div> - </ItemTemplate> - <HeaderTemplate> - <div id="ActionItem"> - <table> - <tr> - <td style="width: 179px; height: 37px"> - <h2> - Action Item</h2> - </td> - <td align=right style="width: 657px; height: 37px"> - <div id="radiolist"> - <strong>Status: </strong> <asp:DropDownList ID="statusList" runat="server" - AutoPostBack="True" OnSelectedIndexChanged="DropDownList1_SelectedIndexChanged" - DataSourceID=StatusDataSource DataTextField=stateName DataValueField=id AppendDataBoundItems=True> - <asp:ListItem Selected=True /> - </asp:DropDownList><br /> - <strong>Percent Complete: </strong> - <asp:RadioButtonList ID="percentList" runat="server" RepeatDirection="Horizontal" - AutoPostBack=True OnSelectedIndexChanged=RadioButtonList1_SelectedIndexChanged> - <asp:ListItem Selected=True>0</asp:ListItem> - <asp:ListItem>25</asp:ListItem> - <asp:ListItem>50</asp:ListItem> - <asp:ListItem>75</asp:ListItem> - <asp:ListItem>100</asp:ListItem> - </asp:RadioButtonList> - <asp:ObjectDataSource ID="StatusDataSource" runat="server" OldValuesParameterFormatString="original_{0}" - SelectMethod="GetStatusDataByGroup" TypeName="DummyDataSetTableAdapters.StatusTableAdapter"> - <SelectParameters> - <asp:Parameter DefaultValue="ActionItem" Name="groupName" Type="String" /> - </SelectParameters> - </asp:ObjectDataSource> - </div> - </td> - </tr> - </table> - </div> - </HeaderTemplate> - <InsertItemTemplate> - <div class="xsnazzy"> - <b class="xtop"><b class="xb1"></b><b class="xb2"></b><b class="xb3"></b><b class="xb4"> - </b></b> - <div class="xboxcontent"> - <table> - <tr> - <td colspan="2" width="55%"> - <strong> Name:</strong><br /> - <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("name") %>' Width="80%" /> - <br /> - <asp:CheckBox ID="priorityBox" runat="server" />: <strong>High Priority</strong></td> - <td align=right colspan=2 width="45%"> - <strong>Assigned: - </strong> - <cc1:DatePicker ID="assignedDate" runat="server" DateFormatString="MM/dd/yyyy" /><br /> - <strong>Due: - </strong> - <cc1:DatePicker ID="dueDate" runat="server" DateFormatString="MM/dd/yyyy" /><br /> - <strong>Finished: - </strong> - <cc1:DatePicker ID="finishedDate" runat="server" DateFormatString="MM/dd/yyyy" /> - </td> - </tr> - <tr> - <td colspan="4" class="hr"> - <img alt="" src="images/spacer.gif" height="5" /><br /> - </td> - </tr> - <tr> - <td colspan="4" style="height: 197px"> - <FTB:FreeTextBox ID="FreeTextBox1" runat="server" SupportFolder="~" Text='<%# Bind("description") %>' - Height="100%" Width="100%" /> - </td> - </tr> - <tr> - <td colspan="4" class="hr" style="height: 1px"> - <img alt="" src="images/spacer.gif" height="5" /><br /> - </td> - </tr> - <tr> - <td colspan=2 width="60%"> - <asp:LinkButton ID="InsertButton" runat="server" CausesValidation="True" CommandName="Insert" - Text="Insert"> - </asp:LinkButton> | - <asp:LinkButton ID="InsertCancelButton" runat="server" CausesValidation="False" CommandName="Cancel" - Text="Cancel"> - </asp:LinkButton> - </td> - <td align=right colspan=2 width="40%"> - <strong>Created By: - <asp:DropDownList ID="createdBy" runat="server" DataSourceID="UserDataSource" - DataTextField="Name" DataValueField="id" AppendDataBoundItems=True > - </asp:DropDownList> - </strong> - <br /> - <strong>Assigned To: - <asp:DropDownList ID="assignedTo" runat="server" DataSourceID="UserDataSource" - DataTextField="Name" DataValueField="id" AppendDataBoundItems=True > - </asp:DropDownList></strong> - <asp:ObjectDataSource ID="UserDataSource" runat="server" OldValuesParameterFormatString="original_{0}" - SelectMethod="GetUserNames" TypeName="DummyDataSetTableAdapters.UsersTableAdapter"> - </asp:ObjectDataSource> - </td> - </tr> - </table> - </div> - <b class="xbottom"><b class="xb4"></b><b class="xb3"></b><b class="xb2"></b><b class="xb1"> - </b></b> - </div> - </InsertItemTemplate> - </asp:FormView> - <asp:ObjectDataSource ID="ActionItemDataSource" - runat="server" - OldValuesParameterFormatString="original_{0}" - SelectMethod="GetAssignmentDataByID" - TypeName="DummyDataSetTableAdapters.ActionItemTableAdapter" - DeleteMethod=DeleteByID - InsertMethod=InsertActionItem - UpdateMethod=UpdateActionItemByID> - <SelectParameters> - <asp:Parameter Name="id" Type="Int32" /> - </SelectParameters> - <DeleteParameters> - <asp:Parameter Name="original_actionItemID" Type="Object" /> - </DeleteParameters> - <UpdateParameters> - <asp:Parameter Name="name" Type="String" /> - <asp:Parameter Name="description" Type="String" /> - <asp:Parameter Name="original_actionItemID" Type="Int32" /> - </UpdateParameters> - <InsertParameters> - <asp:Parameter Name="name" Type="String" /> - <asp:Parameter Name="description" Type="String" /> - </InsertParameters> - </asp:ObjectDataSource> - </td> - <td width="300px" align="right" valign="top"> - <table width="100%" cellpadding="0" cellspacing="0" border="0" style="padding: 10px;"> + <asp:FormView ID="FormView1" runat="server" DataSourceID="ActionItemDataSource" DataKeyNames="actionItemID" + CellPadding=4 ForeColor="#333333" OnItemUpdated=FormView1_ItemUpdated + OnItemInserted=FormView1_ItemInserted OnDataBound=FormView1_DataBound OnItemDeleted=FormView1_ItemDeleted + OnModeChanged=FormView1_ModeChanged> + <HeaderTemplate> + <div id="ActionItem"> + <table width=700> <tr> - <td width="100%"> - <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> + <td> + <h2> + Action Item</h2> + </td> + <td align=right> + <div id="radiolist"> + <strong>Status: </strong> <asp:DropDownList ID="statusList" runat="server" AutoPostBack="True" + OnSelectedIndexChanged="DropDownList1_SelectedIndexChanged" DataSourceID=StatusDataSource + DataTextField=stateName DataValueField=id AppendDataBoundItems=True> + <asp:ListItem Selected=True /> + </asp:DropDownList><br /> + <strong>Percent Complete: </strong> + <asp:RadioButtonList ID="percentList" runat="server" RepeatDirection="Horizontal" + AutoPostBack=True OnSelectedIndexChanged=RadioButtonList1_SelectedIndexChanged> + <asp:ListItem Selected=True>0</asp:ListItem> + <asp:ListItem>25</asp:ListItem> + <asp:ListItem>50</asp:ListItem> + <asp:ListItem>75</asp:ListItem> + <asp:ListItem>100</asp:ListItem> + </asp:RadioButtonList> + <asp:ObjectDataSource ID="StatusDataSource" runat="server" OldValuesParameterFormatString="original_{0}" + SelectMethod="GetStatusDataByGroup" TypeName="DummyDataSetTableAdapters.StatusTableAdapter"> + <SelectParameters> + <asp:Parameter DefaultValue="ActionItem" Name="groupName" Type="String" /> + </SelectParameters> + </asp:ObjectDataSource> </div> - <b class="notebottom"><b class="noteb4"></b><b class="noteb3"></b><b class="noteb2"> - </b></b><b class="noteb1"></b></td> + </td> </tr> </table> - <div style="padding-left: 10px; text-align: left;"> - <a href="#" style="padding-left: 10px; text-align: left;">New Note</a></div> - </td> - </tr> - </table> + </div> + </HeaderTemplate> + <ItemTemplate> + <div class="xsnazzy"> + <b class="xtop"><b class="xb1"></b><b class="xb2"></b><b class="xb3"></b><b class="xb4"> + </b></b> + <div class="xboxcontent"> + <table width="700"> + <tr> + <td colspan=2 width="60%"> + <asp:ImageButton ID="priorityImg" runat="server" Enabled="False" Height="19px" ImageUrl="~/Images/no-exclamation.jpg" + OnClick="priorityImg_Click" Width="20px" /> + <asp:Label ID="nameLabel" runat="server" Text='<%# Eval("name") %>' Style="font-size: large; + color: black; font-family: Arial;"></asp:Label></td> + <td align=right colspan=2 width="40%"> + <strong>Assigned: </strong><asp:Label ID="dateAssignedLbl" runat="server" + Text='<%# Eval("dateAssigned") %>'></asp:Label><br /> + <strong>Due: <asp:Label ID="dateDueLbl" runat="server" Font-Bold="False" Text='<%# Eval("dateDue") %>'></asp:Label></strong><br /> + <strong>Finished: <asp:Label ID="dateFinishedLbl" runat="server" Font-Bold="False" Text='<%# Eval("dateFinished") %>'></asp:Label><br /> + </strong></td> + </tr> + <tr> + <td colspan="4" class="hr"> + <img alt="" src="images/spacer.gif" height="5" /><br /> + </td> + </tr> + <tr> + <td colspan=4 valign=top> + <strong>Description:</strong><br /> + <asp:Label ID="descriptionLabel" runat="server" Text='<%# Eval("description") %>'></asp:Label> + </td> + </tr> + <tr> + <td colspan="4" class="hr"> + <img alt="" src="images/spacer.gif" height="5" /><br /> + </td> + </tr> + <tr> + <td colspan=2 width="55%"> + <asp:LinkButton ID="NewButton" runat="server" CausesValidation="False" CommandName="New" + Text="New" /> | <asp:LinkButton ID="EditButton" runat="server" CausesValidation="False" + CommandName="Edit" Text="Edit" /> | <asp:LinkButton ID="DeleteButton" runat="server" + CausesValidation="False" CommandName="Delete" Text="Delete" /> + </td> + <td align=right colspan=2 width="45%"> + <strong>Created By: + <asp:Label ID="createdByLbl" runat="server" Font-Bold="False" Text='<%# Eval("createdBy") %>'></asp:Label></strong><br /> + <strong>Assigned To: + <asp:Label ID="assignedToLbl" runat="server" Font-Bold="False" Text='<%# Eval("assignedTo") %>'></asp:Label><br /> + </strong> </td> + </tr> + </table> + </div> + <b class="xbottom"><b class="xb4"></b><b class="xb3"></b><b class="xb2"></b><b class="xb1"> + </b></b> + </div> + </ItemTemplate> + <EditItemTemplate> + <div class="xsnazzy"> + <b class="xtop"><b class="xb1"></b><b class="xb2"></b><b class="xb3"></b><b class="xb4"> + </b></b> + <div class="xboxcontent"> + <table width=700> + <tr> + <td colspan="2" width="55%"> + <strong> <asp:ImageButton ID="priorityImg" runat="server" Height="19px" ImageUrl="~/Images/no-exclamation.jpg" + OnClick="priorityImg_Click" Width="20px" /> + Name: </strong><asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("name") %>' + Width="70%" /> + </td> + <td align=right colspan=2 width="45%"> + <strong>Assigned: </strong> + <cc1:DatePicker ID="assignedDate" runat="server" DateFormatString="MM/dd/yyyy" DateValue='<%# Eval("dateAssigned") %>' /> + <br /> + <strong>Due: </strong> + <cc1:DatePicker ID="dueDate" runat="server" DateFormatString="MM/dd/yyyy" DateValue='<%# Eval("dateDue") %>' /> + <br /> + <strong>Finished: </strong> + <cc1:DatePicker ID="finishedDate" runat="server" DateFormatString="MM/dd/yyyy" DateValue='<%# Eval("dateFinished") %>' /> + <br /> + </td> + </tr> + <tr> + <td colspan="4" class="hr"> + <img alt="" src="images/spacer.gif" height="5" /><br /> + </td> + </tr> + <tr> + <td colspan="4"> + <strong>Description:</strong><br /> + <FTB:FreeTextBox ID="FreeTextBox1" runat="server" SupportFolder="~" Text='<%# Bind("description") %>' + Height="100%" Width="100%" /> + </td> + </tr> + <tr> + <td colspan="4" class="hr"> + <img alt="" src="images/spacer.gif" height="5" /><br /> + </td> + </tr> + <tr> + <td colspan=2 width="60%"> + <asp:LinkButton ID="UpdateButton" runat="server" CausesValidation="True" CommandName="Update" + Text="Update"> + </asp:LinkButton> | + <asp:LinkButton ID="UpdateCancelButton" runat="server" CausesValidation="False" CommandName="Cancel" + Text="Cancel"> + </asp:LinkButton> + </td> + <td align=right colspan=2 width="%40"> + <strong>Created By:</strong> + <asp:DropDownList ID="createdBy" runat="server" DataSourceID="UserDataSource" DataTextField="Name" + DataValueField="id" SelectedValue='<%# Eval("creatorID","{0}") %>'> + </asp:DropDownList><br /> + <strong>Assigned To:</strong> + <asp:DropDownList ID="assignedTo" runat="server" DataSourceID="UserDataSource" DataTextField="Name" + DataValueField="id" SelectedValue='<%# Eval("assignedID","{0}") %>'> + </asp:DropDownList><br /> + <asp:ObjectDataSource ID="UserDataSource" runat="server" OldValuesParameterFormatString="original_{0}" + SelectMethod="GetUserNames" TypeName="DummyDataSetTableAdapters.UsersTableAdapter"> + </asp:ObjectDataSource> + </td> + </tr> + </table> + </div> + <b class="xbottom"><b class="xb4"></b><b class="xb3"></b><b class="xb2"></b><b class="xb1"> + </b></b> + </div> + </EditItemTemplate> + <InsertItemTemplate> + <div class="xsnazzy"> + <b class="xtop"><b class="xb1"></b><b class="xb2"></b><b class="xb3"></b><b class="xb4"> + </b></b> + <div class="xboxcontent"> + <table width=700> + <tr> + <td colspan="2" width="55%"> + <strong> + <asp:ImageButton ID="priorityImg" runat="server" Height="19px" ImageUrl="~/Images/no-exclamation.jpg" + OnClick="priorityImg_Click" Width="20px" /> Name:</strong> + <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("name") %>' Width="70%" /> + <br /> + <td align=right colspan=2 width="45%"> + <strong>Assigned: </strong> + <cc1:DatePicker ID="assignedDate" runat="server" DateFormatString="MM/dd/yyyy" /><br /> + <strong>Due: </strong> + <cc1:DatePicker ID="dueDate" runat="server" DateFormatString="MM/dd/yyyy" /><br /> + <strong>Finished: </strong><cc1:DatePicker ID="finishedDate" runat="server" DateFormatString="MM/dd/yyyy" /><br /> + </td> + </tr> + <tr> + <td colspan="4" class="hr"> + <img alt="" src="images/spacer.gif" height="5" /><br /> + </td> + </tr> + <tr> + <td colspan="4"> + <FTB:FreeTextBox ID="FreeTextBox1" runat="server" SupportFolder="~" Text='<%# Bind("description") %>' + Height="100%" Width="100%" /> + </td> + </tr> + <tr> + <td colspan="4" class="hr"> + <img alt="" src="images/spacer.gif" height="5" /><br /> + </td> + </tr> + <tr> + <td colspan=2 width="60%"> + <asp:LinkButton ID="InsertButton" runat="server" CausesValidation="True" CommandName="Insert" + Text="Insert"> + </asp:LinkButton> | + <asp:LinkButton ID="InsertCancelButton" runat="server" CausesValidation="False" CommandName="Cancel" + Text="Cancel"> + </asp:LinkButton> + </td> + <td align=right colspan=2 width="40%"> + <strong>Created By: <asp:DropDownList ID="createdBy" runat="server" DataSourceID="UserDataSource" DataTextField="Name" + DataValueField="id" AppendDataBoundItems=True> + </asp:DropDownList></strong><br /> + <strong>Assigned To: <asp:DropDownList ID="assignedTo" runat="server" DataSourceID="UserDataSource" DataTextField="Name" + DataValueField="id" AppendDataBoundItems=True> + </asp:DropDownList></strong><br /> + <asp:ObjectDataSource ID="UserDataSource" runat="server" OldValuesParameterFormatString="original_{0}" + SelectMethod="GetUserNames" TypeName="DummyDataSetTableAdapters.UsersTableAdapter"> + </asp:ObjectDataSource> + </td> + </tr> + </table> + </div> + <b class="xbottom"><b class="xb4"></b><b class="xb3"></b><b class="xb2"></b><b class="xb1"> + </b></b> + </div> + </InsertItemTemplate> + </asp:FormView> + <asp:ObjectDataSource ID="ActionItemDataSource" runat="server" OldValuesParameterFormatString="original_{0}" + SelectMethod="GetAssignmentDataByID" TypeName="DummyDataSetTableAdapters.ActionItemTableAdapter" + DeleteMethod=DeleteByID InsertMethod=InsertActionItem UpdateMethod=UpdateActionItemByID> + <SelectParameters> + <asp:Parameter Name="id" Type="Int32" /> + </SelectParameters> + <DeleteParameters> + <asp:Parameter Name="original_actionItemID" Type="Object" /> + </DeleteParameters> + <UpdateParameters> + <asp:Parameter Name="name" Type="String" /> + <asp:Parameter Name="description" Type="String" /> + <asp:Parameter Name="original_actionItemID" Type="Int32" /> + </UpdateParameters> + <InsertParameters> + <asp:Parameter Name="name" Type="String" /> + <asp:Parameter Name="description" Type="String" /> + </InsertParameters> + </asp:ObjectDataSource> </asp:Content> Modified: WebPrototype/ActionItemEdit.aspx.cs =================================================================== --- WebPrototype/ActionItemEdit.aspx.cs 2006-06-21 18:37:29 UTC (rev 46) +++ WebPrototype/ActionItemEdit.aspx.cs 2006-06-22 23:23:19 UTC (rev 47) @@ -14,19 +14,21 @@ public partial class ActionItemEdit : System.Web.UI.Page { private int id = System.Convert.ToInt32(HttpContext.Current.Request.QueryString["id"]); - SqlConnection DBConnection = new System.Data.SqlClient.SqlConnection("Data Source=.\\SQLEXPRESS;AttachDbFilename=|DataDirectory|\\Database.mdf;Integrated Security=True;User Instance=True"); + bool priority; protected void Page_Load(object sender, EventArgs e) { + ImageButton priorityImg = (ImageButton)FormView1.FindControl("priorityImg"); + ActionItemDataSource.SelectParameters["id"].DefaultValue = id.ToString(); - DBConnection.Open(); + if (priorityImg != null && priorityImg.ImageUrl == "~/Images/exclamation.jpg") priority = true; } protected void RadioButtonList1_SelectedIndexChanged(object sender, EventArgs e) { if (FormView1.CurrentMode != FormViewMode.Insert) { RadioButtonList percentList = (RadioButtonList)sender; - SqlCommand cmd = new SqlCommand("UPDATE ActionItem SET percentComplete="+percentList.SelectedValue+" WHERE actionItemID="+id, DBConnection); + SqlCommand cmd = new SqlCommand("UPDATE ActionItem SET percentComplete="+percentList.SelectedValue+" WHERE actionItemID="+id, Master.DBConnection); cmd.ExecuteNonQuery(); } } @@ -35,7 +37,7 @@ if (FormView1.CurrentMode != FormViewMode.Insert) { DropDownList statusList = (DropDownList)sender; - SqlCommand cmd = new SqlCommand("UPDATE Assignments SET statusID=" + statusList.SelectedValue + " WHERE actionItemID=" + id, DBConnection); + SqlCommand cmd = new SqlCommand("UPDATE Assignments SET statusID=" + statusList.SelectedValue + " WHERE actionItemID=" + id, Master.DBConnection); cmd.ExecuteNonQuery(); FormView1.DataBind(); } @@ -48,7 +50,6 @@ DatePicker finishedDate = (DatePicker)FormView1.FindControl("finishedDate"); DropDownList createdBy = (DropDownList)FormView1.FindControl("createdBy"); DropDownList assignedTo = (DropDownList)FormView1.FindControl("assignedTo"); - CheckBox priorityBox = (CheckBox)FormView1.FindControl("priorityBox"); SqlCommand cmd = new SqlCommand("UPDATE Assignments SET " + "dateAssigned='" + assignedDate.DateValue + @@ -56,11 +57,11 @@ "',dateFinished='" + finishedDate.DateValue + "',creatorID='" + createdBy.SelectedValue + "',assignedID='" + assignedTo.SelectedValue + - "',highPriorityID='" + priorityBox.Checked + - "' WHERE actionItemID=" + id, DBConnection); + "',highPriorityID='" + priority + + "' WHERE actionItemID=" + id, Master.DBConnection); cmd.ExecuteNonQuery(); - updateTree(); + Master.updateTree(); } protected void FormView1_ItemInserted(object sender, FormViewInsertedEventArgs e) { @@ -71,10 +72,9 @@ DropDownList assignedTo = (DropDownList)FormView1.FindControl("assignedTo"); DropDownList statusList = (DropDownList)FormView1.FindControl("statusList"); RadioButtonList percentList = (RadioButtonList)FormView1.FindControl("percentList"); - CheckBox priorityBox = (CheckBox)FormView1.FindControl("priorityBox"); // Get inserted ActionItem - SqlDataAdapter DBAdapter = new SqlDataAdapter("SELECT MAX(actionItemID) AS newID FROM ActionItem",DBConnection); + SqlDataAdapter DBAdapter = new SqlDataAdapter("SELECT MAX(actionItemID) AS newID FROM ActionItem",Master.DBConnection); DataSet data = new DataSet(); DBAdapter.Fill(data); id = Convert.ToInt32(data.Tables[0].Rows[0]["newID"]); @@ -95,127 +95,20 @@ createdBy.SelectedValue + "','" + assignedTo.SelectedValue + "','" + statusList.SelectedValue + "','" + - priorityBox.Checked + "')", DBConnection); + priority + "')", Master.DBConnection); cmd.ExecuteNonQuery(); cmd.CommandText = "UPDATE ActionItem SET percentComplete=" + percentList.SelectedValue + " WHERE actionItemID=" + id; cmd.ExecuteNonQuery(); - updateTree(); + Master.updateTree(); Response.Redirect("~/ActionItemEdit.aspx?id=" + id); } protected void FormView1_ItemDeleted(object sender, FormViewDeletedEventArgs e) { - SqlCommand cmd = new SqlCommand("DELETE FROM Assignments WHERE actionItemID=" + id, DBConnection); + SqlCommand cmd = new SqlCommand("DELETE FROM Assignments WHERE actionItemID=" + id, Master.DBConnection); cmd.ExecuteNonQuery(); - updateTree(); + Master.updateTree(); } - protected 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 id,firstName,lastName FROM Users", 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 = row["firstName"]+" "+row["lastName"]; - newNode.Value = row["id"].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 = "~/Assignments.aspx?id=" + row["id"]; - - // Add the new node to the ChildNodes collection of the parent node. - e.Node.ChildNodes.Add(newNode); - } - } - break; - case 1: - // Populate the second-level nodes. - query = "SELECT ActionItem.actionItemID, ActionItem.name FROM ActionItem "+ - "INNER JOIN Assignments ON ActionItem.actionItemID = Assignments.actionItemID "+ - "WHERE (Assignments.assignedID = " + 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 = row["name"].ToString(); - newNode.Value = row["actionItemID"].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 = "~/ActionItemEdit.aspx?id=" + newNode.Value; - - // Add the new node to the ChildNodes collection of the parent node. - e.Node.ChildNodes.Add(newNode); - } - } - ResultsDataSet.Clear(); - query = "SELECT WorkOrder.WorkOrderID, WorkOrder.name FROM WorkOrder " + - "INNER JOIN Assignments ON WorkOrder.WorkOrderID = Assignments.workOrderID " + - "WHERE (Assignments.assignedID = " + 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 = row["name"].ToString(); - newNode.Value = row["workOrderID"].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 = "~/WorkOrderEdit.aspx?id=" + newNode.Value; - - // Add the new node to the ChildNodes collection of the parent node. - e.Node.ChildNodes.Add(newNode); - } - } - break; - - } - } + protected void FormView1_DataBound(object sender, EventArgs e) { DatePicker assignedDate = (DatePicker)FormView1.FindControl("assignedDate"); @@ -223,28 +116,66 @@ DatePicker finishedDate = (DatePicker)FormView1.FindControl("finishedDate"); DropDownList statusList = (DropDownList) FormView1.FindControl("statusList"); RadioButtonList percentList = (RadioButtonList)FormView1.FindControl("percentList"); + Image priorityImg = (Image)FormView1.FindControl("priorityImg"); DataRowView data = (DataRowView)FormView1.DataItem; if (data != null) { - String assigned = data["dateAssigned"].ToString(); - String due = data["dateDue"].ToString(); - String finished = data["dateFinished"].ToString(); String status = data["statusID"].ToString(); String percent = data["percentComplete"].ToString(); + String highpriority = data["highPriorityID"].ToString(); - if (assigned != "") - assignedDate.DateValue = Convert.ToDateTime(assigned); - if (due != "") - dueDate.DateValue = Convert.ToDateTime(due); - if (finished != "") - finishedDate.DateValue = Convert.ToDateTime(finished); if (status != "") statusList.SelectedValue = status; if (percent != "") percentList.SelectedValue = percent; + if (highpriority == "True") + { + priorityImg.ImageUrl = "Images/exclamation.jpg"; + priority = true; + } + else + { + priorityImg.ImageUrl = "Images/no-exclamation.jpg"; + priority = false; + } + + if (FormView1.CurrentMode != FormViewMode.ReadOnly) + { + String assigned = data["dateAssigned"].ToString(); + String due = data["dateDue"].ToString(); + String finished = data["dateFinished"].ToString(); + + if (assigned != "") + assignedDate.DateValue = Convert.ToDateTime(assigned); + if (due != "") + dueDate.DateValue = Convert.ToDateTime(due); + if (finished != "") + finishedDate.DateValue = Convert.ToDateTime(finished); + } } } + protected void priorityImg_Click(object sender, ImageClickEventArgs e) + { + ImageButton priorityImg = (ImageButton)sender; + if (FormView1.CurrentMode != FormViewMode.ReadOnly) + { + if (priority) + { + priorityImg.ImageUrl = "~/Images/no-exclamation.jpg"; + priority = false; + } + else + { + priorityImg.ImageUrl = "~/Images/exclamation.jpg"; + priority = true; + } + } + } + protected void FormView1_ModeChanged(object sender, EventArgs e) + { + + } } Modified: WebPrototype/App_Code/DummyDataSet.xsd =================================================================== --- WebPrototype/App_Code/DummyDataSet.xsd 2006-06-21 18:37:29 UTC (rev 46) +++ WebPrototype/App_Code/DummyDataSet.xsd 2006-06-22 23:23:19 UTC (rev 47) @@ -455,9 +455,17 @@ <DbSource ConnectionRef="DummyDatabaseConnectionString (Web.config)" DbObjectName="dbo.Products" DbObjectType="Table" GenerateMethods="Get" GenerateShortCommands="False" GeneratorGetMethodName="GetProductDataByID" GetMethodModifier="Public" GetMethodName="GetProductDataByID" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="False" UserGetMethodName="GetProductDataByID" UserSourceName="GetProductDataByID"> <SelectCommand> <DbCommand CommandType="Text" ModifiedByUser="True"> - <CommandText>SELECT id, Name, Description, DevManager, QAManager, DevLead, QALead, ProductManager, Code -FROM Products -WHERE id=@id</CommandText> + <CommandText>SELECT p.id, p.Name, p.Description, p.Code, u1.firstName + ' ' + u1.lastName AS ProductManager, p.ProductManager AS ProductManagerID, + u2.firstName + ' ' + u2.lastName AS DevManager, p.DevManager AS DevManagerID, u3.firstName + ' ' + u3.lastName AS DevLead, + p.DevLead AS DevLeadID, u4.firstName + ' ' + u4.lastName AS QAManager, p.QAManager AS QAManagerID, + u5.firstName + ' ' + u5.lastName AS QALead, p.QALead AS QALeadID +FROM Products AS p LEFT OUTER JOIN + Users AS u1 ON u1.id = p.ProductManager LEFT OUTER JOIN + Users AS u2 ON u2.id = p.DevManager LEFT OUTER JOIN + Users AS u3 ON u3.id = p.DevLead LEFT OUTER JOIN + Users AS u4 ON u4.id = p.QAManager LEFT OUTER JOIN + Users AS u5 ON u5.id = p.QALead... [truncated message content] |