From: <ro...@us...> - 2006-07-12 17:06:30
|
Revision: 106 Author: rouquin Date: 2006-07-12 10:06:23 -0700 (Wed, 12 Jul 2006) ViewCVS: http://svn.sourceforge.net/tcdb/?rev=106&view=rev Log Message: ----------- Done with ActionItems for now. Its waiting for stored procedures (select needs to be updated, also need update and delete). Also, need image for priority flag and the datePicker that Matt says is good. Modified Paths: -------------- Website/App_Code/TCDB_Assignments.cs Website/Includes/ActionItems.ascx Website/Includes/Assignments.ascx Website/Includes/AssignmentsTree.ascx Modified: Website/App_Code/TCDB_Assignments.cs =================================================================== --- Website/App_Code/TCDB_Assignments.cs 2006-07-12 16:52:44 UTC (rev 105) +++ Website/App_Code/TCDB_Assignments.cs 2006-07-12 17:06:23 UTC (rev 106) @@ -275,6 +275,17 @@ } } + public bool ISINACTIVE + { + get + { + if (p_statusName == "Inactive") + return true; + else + return false; + } + } + public int WOTOTALTEST { get { return p_woTotalTest; } Modified: Website/Includes/ActionItems.ascx =================================================================== --- Website/Includes/ActionItems.ascx 2006-07-12 16:52:44 UTC (rev 105) +++ Website/Includes/ActionItems.ascx 2006-07-12 17:06:23 UTC (rev 106) @@ -6,11 +6,9 @@ <%@ 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">TCDB_User g_user = TCDB_UserDB.TCDB_GetUserInstance(); -</script> - -<script runat=server> +<script runat="server"> String id = HttpContext.Current.Request.QueryString[TCDB_Constant.CODE_AI]; String mode = HttpContext.Current.Request.QueryString["mode"]; //bool priority; @@ -20,7 +18,7 @@ if (id == null && mode == null) Response.Redirect("Assignments.aspx"); Session.Add("id", id); - + if (mode != null && mode == "new") FormView1.ChangeMode(FormViewMode.Insert); @@ -69,55 +67,55 @@ protected void FormView1_ItemUpdated(object sender, FormViewUpdatedEventArgs e) { - /* - DatePicker dueDate = (DatePicker)FormView1.FindControl("dueDate"); - DropDownList assignedTo = (DropDownList)FormView1.FindControl("assignedTo"); + /* + DatePicker dueDate = (DatePicker)FormView1.FindControl("dueDate"); + DropDownList assignedTo = (DropDownList)FormView1.FindControl("assignedTo"); - SqlCommand cmd = new SqlCommand("UPDATE Assignments SET " + - "dateDue='" + dueDate.DateValue + - "',assignedID='" + assignedTo.SelectedValue + - "',highPriorityID='" + priority + - "' WHERE actionItemID=" + id, Master.DBConnection); - cmd.ExecuteNonQuery(); + SqlCommand cmd = new SqlCommand("UPDATE Assignments SET " + + "dateDue='" + dueDate.DateValue + + "',assignedID='" + assignedTo.SelectedValue + + "',highPriorityID='" + priority + + "' WHERE actionItemID=" + id, Master.DBConnection); + cmd.ExecuteNonQuery(); - Master.updateTree(); - */ + Master.updateTree(); + */ } protected void FormView1_ItemInserted(object sender, FormViewInsertedEventArgs e) { - /* - Label createdBy = (Label)FormView1.FindControl("createdByLbl"); - Label dateAssigned = (Label)FormView1.FindControl("dateAssignedLbl"); - DatePicker dueDate = (DatePicker)FormView1.FindControl("dueDate"); - DropDownList assignedTo = (DropDownList)FormView1.FindControl("assignedTo"); - DropDownList statusList = (DropDownList)FormView1.FindControl("statusList"); - RadioButtonList percentList = (RadioButtonList)FormView1.FindControl("percentList"); + /* + Label createdBy = (Label)FormView1.FindControl("createdByLbl"); + Label dateAssigned = (Label)FormView1.FindControl("dateAssignedLbl"); + DatePicker dueDate = (DatePicker)FormView1.FindControl("dueDate"); + DropDownList assignedTo = (DropDownList)FormView1.FindControl("assignedTo"); + DropDownList statusList = (DropDownList)FormView1.FindControl("statusList"); + RadioButtonList percentList = (RadioButtonList)FormView1.FindControl("percentList"); - // Get inserted ActionItem - SqlDataAdapter DBAdapter = new SqlDataAdapter("SELECT MAX(actionItemID) AS newID FROM ActionItem",Master.DBConnection); - DataSet data = new DataSet(); - DBAdapter.Fill(data); - id = data.Tables[0].Rows[0]["newID"].ToString(); + // Get inserted ActionItem + SqlDataAdapter DBAdapter = new SqlDataAdapter("SELECT MAX(actionItemID) AS newID FROM ActionItem",Master.DBConnection); + DataSet data = new DataSet(); + DBAdapter.Fill(data); + id = data.Tables[0].Rows[0]["newID"].ToString(); - String due = "null"; + String due = "null"; - if (dueDate.DateValue != DateTime.MinValue) - due = "'" + dueDate.DateValue + "'"; + if (dueDate.DateValue != DateTime.MinValue) + due = "'" + dueDate.DateValue + "'"; - SqlCommand cmd = new SqlCommand("INSERT INTO Assignments (actionItemID,dateAssigned,dateDue,creatorID,assignedID,statusID,highPriorityID) VALUES ('" + - id + "','" + - dateAssigned.Text + "'," + - due + "," + - createdBy.Attributes["id"] + "," + - assignedTo.SelectedValue + "," + - statusList.SelectedValue + ",'" + - priority + "')", Master.DBConnection); - cmd.ExecuteNonQuery(); - cmd.CommandText = "UPDATE ActionItem SET percentComplete=" + percentList.SelectedValue + " WHERE actionItemID=" + id; - cmd.ExecuteNonQuery(); - Master.updateTree(); - Response.Redirect("~/ActionItemEdit.aspx?id=" + id); - */ + SqlCommand cmd = new SqlCommand("INSERT INTO Assignments (actionItemID,dateAssigned,dateDue,creatorID,assignedID,statusID,highPriorityID) VALUES ('" + + id + "','" + + dateAssigned.Text + "'," + + due + "," + + createdBy.Attributes["id"] + "," + + assignedTo.SelectedValue + "," + + statusList.SelectedValue + ",'" + + priority + "')", Master.DBConnection); + cmd.ExecuteNonQuery(); + cmd.CommandText = "UPDATE ActionItem SET percentComplete=" + percentList.SelectedValue + " WHERE actionItemID=" + id; + cmd.ExecuteNonQuery(); + Master.updateTree(); + Response.Redirect("~/ActionItemEdit.aspx?id=" + id); + */ } protected void FormView1_ItemDeleted(object sender, FormViewDeletedEventArgs e) { @@ -129,58 +127,59 @@ Response.Redirect("Assignments.aspx?id=" + Profile.userID); * */ } - + protected void FormView1_DataBound(object sender, EventArgs e) { - /* - DatePicker dueDate = (DatePicker)FormView1.FindControl("dueDate"); - DropDownList statusList = (DropDownList) FormView1.FindControl("statusList"); - RadioButtonList percentList = (RadioButtonList)FormView1.FindControl("percentList"); - Image priorityImg = (Image)FormView1.FindControl("priorityImg"); - DataRowView data = (DataRowView)FormView1.DataItem; + /* + DatePicker dueDate = (DatePicker)FormView1.FindControl("dueDate"); + 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 status = data["statusID"].ToString(); - String percent = data["percentComplete"].ToString(); - String highpriority = data["highPriorityID"].ToString(); - - if (status != "") - statusList.SelectedValue = status; - if (percent != "") - percentList.SelectedValue = percent; - if (highpriority == "True") + if (data != null) { - priorityImg.ImageUrl = "Images/exclamation.jpg"; - priority = true; - } - else - { - priorityImg.ImageUrl = "Images/no-exclamation.jpg"; - priority = false; - } + String status = data["statusID"].ToString(); + String percent = data["percentComplete"].ToString(); + String highpriority = data["highPriorityID"].ToString(); - if (FormView1.CurrentMode != FormViewMode.ReadOnly) - { - String due = data["dateDue"].ToString(); + 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 (due != "") - dueDate.DateValue = Convert.ToDateTime(due); + if (FormView1.CurrentMode != FormViewMode.ReadOnly) + { + String due = data["dateDue"].ToString(); + + if (due != "") + dueDate.DateValue = Convert.ToDateTime(due); + } } - } - else if (FormView1.CurrentMode == FormViewMode.Insert) - { - Label createdBy = (Label)FormView1.FindControl("createdByLbl"); - Label dateAssigned = (Label)FormView1.FindControl("dateAssignedLbl"); - DropDownList assignedTo = (DropDownList)FormView1.FindControl("assignedTo"); + else + * */ + if (FormView1.CurrentMode == FormViewMode.Insert) + { + Label createdBy = (Label)FormView1.FindControl("createdByLbl"); + Label dateAssigned = (Label)FormView1.FindControl("dateAssignedLbl"); + DropDownList assignedTo = (DropDownList)FormView1.FindControl("assignedTo"); - createdBy.Text = Profile.FirstName + " " + Profile.LastName; - createdBy.Attributes.Add("id", Profile.userID); - dateAssigned.Text = DateTime.Today.ToShortDateString(); - dueDate.DateValue = DateTime.Today; - assignedTo.SelectedValue = Profile.userID; - } - */ + createdBy.Text = g_user.FULLNAME; + createdBy.Attributes.Add("id", g_user.ID.ToString()); + dateAssigned.Text = DateTime.Today.ToShortDateString(); + //dueDate.DateValue = DateTime.Today; + assignedTo.SelectedValue = g_user.ID.ToString(); + } } protected void priorityImg_Click(object sender, ImageClickEventArgs e) { @@ -213,228 +212,197 @@ <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 OnItemCommand=FormView1_ItemCommand > + OnDataBound=FormView1_DataBound OnItemDeleted=FormView1_ItemDeleted OnItemCommand=FormView1_ItemCommand> <HeaderTemplate> - <div id="ActionItem"> - <table width=700> - <tr> - <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=statusName DataValueField=statusID AppendDataBoundItems=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="GetData" TypeName="dadDataSetTableAdapters.db_statusTableAdapter"> - <SelectParameters> - <asp:Parameter DefaultValue="ActionItem" Name="statusGroup" Type="String" /> - <asp:Parameter Name="statusName" Type="String" /> - <asp:Parameter Name="statusID" Type="Int32" /> - </SelectParameters> - </asp:ObjectDataSource> - </div> - </td> - </tr> - </table> - </div> + <table width=900 border=1> + <tr> + <td> + <h2> + Action Item</h2> + </td> + <td align=center> + <strong>Status:</strong> <asp:DropDownList ID="statusList" runat="server" AutoPostBack="True" + OnSelectedIndexChanged="DropDownList1_SelectedIndexChanged" DataSourceID=StatusDataSource + DataTextField=statusName DataValueField=statusID AppendDataBoundItems=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="GetData" TypeName="dadDataSetTableAdapters.db_statusTableAdapter"> + <SelectParameters> + <asp:Parameter DefaultValue="ActionItem" Name="statusGroup" Type="String" /> + <asp:Parameter Name="statusName" Type="String" /> + <asp:Parameter Name="statusID" Type="Int32" /> + </SelectParameters> + </asp:ObjectDataSource> + </td> + </tr> + </table> </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%" align=left> - <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><br /> - <strong>Test Pass:</strong> - <asp:Label ID="testPassLbl" runat="server" Text='<%# Eval("testPassName") %>'></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:</strong> <asp:Label ID="dateFinishedLbl" runat="server" Font-Bold="False" - Text='<%# Eval("dateFinished") %>'></asp:Label></td> - </tr> - <tr> - <td colspan="4" class="hr"></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"></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:</strong> <asp:Label ID="assignedToLbl" runat="server" Font-Bold="False" - Text='<%# Eval("assignedTo") %>'></asp:Label> - </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> + <table width="900" border=1> + <tr> + <td colspan=2 width="60%" align=left> + <asp:ImageButton ID="priorityImg" runat="server" Enabled="False" Height="19px" ImageUrl="~/Images/no-exclamation.jpg" + OnClick="priorityImg_Click" Width="20px" AlternateText=priority /> + <asp:Label ID="nameLabel" runat="server" Text='<%# Eval("name") %>' Style="font-size: large; + color: black; font-family: Arial;"></asp:Label><br /> + <strong>Test Pass:</strong> + <asp:Label ID="testPassLbl" runat="server"></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:</strong> <asp:Label ID="dateFinishedLbl" runat="server" Font-Bold="False"></asp:Label></td> + </tr> + <tr> + <td colspan="4" class="hr"> + </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"> + </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:</strong> <asp:Label ID="assignedToLbl" runat="server" Font-Bold="False"></asp:Label> + </td> + </tr> + </table> </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%" align=left valign=top> - <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 /> - <strong>Test Pass:</strong> - <asp:DropDownList ID="DropDownList1" runat="server" AppendDataBoundItems="True" SelectedValue='<%# Bind("testPassID") %>'> - <asp:ListItem Value="-1"><none></asp:ListItem> - </asp:DropDownList></td> - <td align=right colspan=2 width="45%"> - <strong>Assigned: - <asp:Label ID="dateAssignedLbl" runat="server" Font-Bold="False" Text='<%# Eval("dateAssigned") %>'></asp:Label></strong><br /> - <strong>Due: </strong> - <!-- <cc1:DatePicker ID="dueDate" run at="server" DateFormatString="MM/dd/yyyy" DateValue='<%# Eval("dateDue") %>' /> --> - <br /> - <strong>Finished: - <asp:Label ID="dateFinishedLbl" runat="server" Font-Bold="False" Text='<%# Eval("dateFinished") %>'></asp:Label> </strong> - </td> - </tr> - <tr> - <td colspan="4" class="hr"><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"><br /> - </td> - </tr> - <tr> - <td colspan=2 width="60%" align=left> - <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:Label ID="createdByLbl" runat="server" Text='<%# Eval("createdBy") %>'></asp:Label><br /> - <strong>Assigned To:</strong> - <asp:DropDownList ID="assignedTo" runat="server" DataSourceID="UserDataSource" DataTextField="Name" - DataValueField="userID" 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> + <table width=700 border=1> + <tr> + <td colspan="2" width="55%" align=left valign=top> + <strong> <asp:ImageButton ID="priorityImg" runat="server" Height="19px" ImageUrl="~/Images/no-exclamation.jpg" + OnClick="priorityImg_Click" Width="20px" AlternateText="priority"/> + Name: </strong><asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("name") %>' + Width="70%" /> + <br /> + <strong>Test Pass:</strong> + <asp:DropDownList ID="DropDownList1" runat="server" AppendDataBoundItems="True"> + <asp:ListItem Value="-1" Selected=True><none></asp:ListItem> + </asp:DropDownList></td> + <td align=right colspan=2 width="45%"> + <strong>Assigned: + <asp:Label ID="dateAssignedLbl" runat="server" Font-Bold="False" Text='<%# Eval("dateAssigned") %>'></asp:Label></strong><br /> + <strong>Due: </strong> + <!-- <cc1:DatePicker ID="dueDate" run at="server" DateFormatString="MM/dd/yyyy" DateValue='<%# Eval("dateDue") %>' /> --> + <br /> + <strong>Finished: + <asp:Label ID="dateFinishedLbl" runat="server" Font-Bold="False"></asp:Label> </strong> + </td> + </tr> + <tr> + <td colspan="4" class="hr"> + </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"> + </td> + </tr> + <tr> + <td colspan=2 width="60%" align=left> + <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:Label ID="createdByLbl" runat="server" Text='<%# Eval("createdBy") %>'></asp:Label><br /> + <strong>Assigned To:</strong> + <asp:DropDownList ID="assignedTo" runat="server" DataSourceID="UserDataSource" DataTextField="fullName" + DataValueField="userID"> + </asp:DropDownList><br /> + </td> + </tr> + </table> </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%" align=left valign=top> - <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 /> - <strong>Test Pass:</strong> - <asp:DropDownList ID="DropDownList1" runat="server" AppendDataBoundItems="True" SelectedValue='<%# Bind("testPassID") %>'> - <asp:ListItem Value="-1"><none></asp:ListItem> - </asp:DropDownList> - <td align=right colspan=2 width="45%"> - <strong>Assigned: </strong> - <asp:Label ID="dateAssignedLbl" runat="server" Text="Label"></asp:Label><br /> - <strong>Due: </strong> - <!-- <cc1:DatePicker ID="dueDate" run at="server" DateFormatString="MM/dd/yyyy" /><br /> --> - <strong>Finished: <asp:Label ID="dateFinishedLbl" runat="server" Font-Bold="False"></asp:Label></strong></td> - </tr> - <tr> - <td colspan="4" class="hr"></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"></td> - </tr> - <tr> - <td colspan=2 width="60%" align=left> - <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:Label ID="createdByLbl" runat="server" Font-Bold="False" - Text="Label"></asp:Label></strong><br /> - <strong>Assigned To: <asp:DropDownList ID="assignedTo" runat="server" DataSourceID="UserDataSource" - DataTextField="Name" DataValueField="userID" 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> + <table width=700 border=1> + <tr> + <td colspan="2" width="55%" align=left valign=top> + <strong> + <asp:ImageButton ID="priorityImg" runat="server" Height="19px" ImageUrl="~/Images/no-exclamation.jpg" + OnClick="priorityImg_Click" Width="20px" AlternateText="priority" /> Name:</strong> + <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("name") %>' Width="70%" /> + <br /> + <strong>Test Pass:</strong> + <asp:DropDownList ID="DropDownList1" runat="server" AppendDataBoundItems="True"> + <asp:ListItem Value="-1" Selected=True><none></asp:ListItem> + </asp:DropDownList> + <td align=right colspan=2 width="45%"> + <strong>Assigned: </strong> + <asp:Label ID="dateAssignedLbl" runat="server" Text="Label"></asp:Label><br /> + <strong>Due: </strong> + <!-- <cc1:DatePicker ID="dueDate" run at="server" DateFormatString="MM/dd/yyyy" /><br /> --> + <strong>Finished: <asp:Label ID="dateFinishedLbl" runat="server" Font-Bold="False"></asp:Label></strong></td> + </tr> + <tr> + <td colspan="4" class="hr"> + </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"> + </td> + </tr> + <tr> + <td colspan=2 width="60%" align=left> + <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:Label ID="createdByLbl" runat="server" Font-Bold="False" + Text="Label"></asp:Label></strong><br /> + <strong>Assigned To: <asp:DropDownList ID="assignedTo" runat="server" DataSourceID="UserDataSource" + DataTextField="fullName" DataValueField="userID" AppendDataBoundItems=True> + </asp:DropDownList></strong> + </td> + </tr> + </table> </InsertItemTemplate> </asp:FormView> <asp:ObjectDataSource ID="ActionItemDataSource" runat="server" OldValuesParameterFormatString="original_{0}" - SelectMethod="GetData" TypeName="dadDataSetTableAdapters.db_actionItemsTableAdapter" InsertMethod=Insert UpdateMethod=Update DataObjectTypeName=dadDataSet> + SelectMethod="GetData" TypeName="dadDataSetTableAdapters.db_actionItemsTableAdapter" + InsertMethod=Insert UpdateMethod=Update DataObjectTypeName=dadDataSet> <SelectParameters> <asp:SessionParameter Name="actionItemID" SessionField="id" Type="Int32" /> </SelectParameters> @@ -448,4 +416,32 @@ <asp:Parameter Name="highPriority" Type="Boolean" /> </InsertParameters> </asp:ObjectDataSource> - + <asp:ObjectDataSource ID="UserDataSource" runat="server" OldValuesParameterFormatString="original_{0}" + SelectMethod="GetData" TypeName="dadDataSetTableAdapters.db_usersTableAdapter" InsertMethod=Insert UpdateMethod=Update> + <UpdateParameters> + <asp:Parameter Name="userID" Type="Int32" /> + <asp:Parameter Name="username" Type="String" /> + <asp:Parameter Name="email" Type="String" /> + <asp:Parameter Name="officePhone" Type="String" /> + <asp:Parameter Name="homePhone" Type="String" /> + <asp:Parameter Name="cellPhone" Type="String" /> + <asp:Parameter Name="firstName" Type="String" /> + <asp:Parameter Name="lastName" Type="String" /> + <asp:Parameter Name="automation" Type="Boolean" /> + </UpdateParameters> + <SelectParameters> + <asp:Parameter Name="username" Type="String" /> + <asp:Parameter Name="userID" Type="Int32" /> + </SelectParameters> + <InsertParameters> + <asp:Parameter Name="username" Type="String" /> + <asp:Parameter Name="firstName" Type="String" /> + <asp:Parameter Name="lastName" Type="String" /> + <asp:Parameter Name="email" Type="String" /> + <asp:Parameter Name="officePhone" Type="String" /> + <asp:Parameter Name="homePhone" Type="String" /> + <asp:Parameter Name="cellPhone" Type="String" /> + <asp:Parameter Name="automation" Type="Boolean" /> + </InsertParameters> + </asp:ObjectDataSource> + \ No newline at end of file Modified: Website/Includes/Assignments.ascx =================================================================== --- Website/Includes/Assignments.ascx 2006-07-12 16:52:44 UTC (rev 105) +++ Website/Includes/Assignments.ascx 2006-07-12 17:06:23 UTC (rev 106) @@ -356,7 +356,7 @@ <h2> My Assignments</h2> <div id="quickFilter"> - s</div> + </div> <asp:CheckBox ID="cboShowCompleted" runat="server" Text="Show Completed" TextAlign="Left" AutoPostBack="true" OnCheckedChanged="cboShowCompleted_CheckedChanged" /> <div class="xsnazzy"> @@ -476,7 +476,7 @@ OnCheckedChanged="cboFilterNotStarted_CheckedChanged" AutoPostBack="True" /><br /> <asp:CheckBox ID="cboFilterCompleted" runat="server" Text="Completed" Checked="false" OnCheckedChanged="cboFilterCompleted_CheckedChanged" AutoPostBack="True" /><br /> - <asp:CheckBox ID="cboFilterInactive" runat="server" Text="Inactive" Checked="true" + <asp:CheckBox ID="cboFilterInactive" runat="server" Text="Inactive" Checked="false" OnCheckedChanged="cboFilterInactive_CheckedChanged" AutoPostBack="True" /> </td> </tr> Modified: Website/Includes/AssignmentsTree.ascx =================================================================== --- Website/Includes/AssignmentsTree.ascx 2006-07-12 16:52:44 UTC (rev 105) +++ Website/Includes/AssignmentsTree.ascx 2006-07-12 17:06:23 UTC (rev 106) @@ -43,7 +43,7 @@ if (assignmentList.Count > 0) { foreach (TCDB_Assignment a in assignmentList) - { + { // Create the new child node. TreeNode child = new TreeNode(); child.Text = a.NAME; @@ -54,7 +54,6 @@ } else { - // TODO: Enable this! child.Value = a.WORKORDER.ID.ToString(); child.NavigateUrl = "~/WorkOrder.aspx?" + TCDB_Constant.CODE_WO + "=" + child.Value; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |