From: <m_h...@us...> - 2006-07-12 17:32:08
|
Revision: 108 Author: m_hildebrand Date: 2006-07-12 10:32:00 -0700 (Wed, 12 Jul 2006) ViewCVS: http://svn.sourceforge.net/tcdb/?rev=108&view=rev Log Message: ----------- Started implementing some rights based stuff Modified Paths: -------------- Website/App_Code/TCDB_Common.cs Website/App_Code/TCDB_Users.cs Website/Includes/Authenticate.ascx Added Paths: ----------- Website/Bin/FreeTextBox.dll Modified: Website/App_Code/TCDB_Common.cs =================================================================== --- Website/App_Code/TCDB_Common.cs 2006-07-12 17:21:24 UTC (rev 107) +++ Website/App_Code/TCDB_Common.cs 2006-07-12 17:32:00 UTC (rev 108) @@ -85,6 +85,9 @@ public static bool ASSIGNMENT_DEFAULTHIGHPRIORITY = false; public static int WORKORDER_DEFAULTID = 0; + + public static string RIGHTS_ASSIGNPERMISSION = "assignPermission"; + public static string RIGHTS_SITEADMIN = "siteAdmin"; } public static class TCDB_Help Modified: Website/App_Code/TCDB_Users.cs =================================================================== --- Website/App_Code/TCDB_Users.cs 2006-07-12 17:21:24 UTC (rev 107) +++ Website/App_Code/TCDB_Users.cs 2006-07-12 17:32:00 UTC (rev 108) @@ -338,6 +338,12 @@ return FULLNAME; } + public bool HasRight(string right, int productID) + { + // TODO: Implement this function! + return false; + } + public List<TCDB_Right> GetRights(bool reload) { // TODO: If rights == null Added: Website/Bin/FreeTextBox.dll =================================================================== (Binary files differ) Property changes on: Website/Bin/FreeTextBox.dll ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Modified: Website/Includes/Authenticate.ascx =================================================================== --- Website/Includes/Authenticate.ascx 2006-07-12 17:21:24 UTC (rev 107) +++ Website/Includes/Authenticate.ascx 2006-07-12 17:32:00 UTC (rev 108) @@ -112,11 +112,11 @@ TCDB_User admin = product.QALEAD; /* // TODO: What happens if there is more than one user with this right? - if (product.QALEAD.GetRights().HasRight(TCDB_Constant.RIGHTS_ASSIGNPERMISSION, product)) + if (product.QALEAD.HasRight(TCDB_Constant.RIGHTS_ASSIGNPERMISSION, product.ID)) { admin = product.QALEAD; } - else if (product.QAMANAGER.GetRights().HasRight(TCDB_Constant.RIGHTS_ASSIGNPERMISSION, product)) + else if (product.QAMANAGER.HasRight(TCDB_Constant.RIGHTS_ASSIGNPERMISSION, product.ID)) { admin = product.QAMANAGER; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <m_h...@us...> - 2006-08-09 20:32:47
|
Revision: 291 Author: m_hildebrand Date: 2006-08-09 13:32:34 -0700 (Wed, 09 Aug 2006) ViewCVS: http://svn.sourceforge.net/tcdb/?rev=291&view=rev Log Message: ----------- CSS changes making things pretty. Modified Paths: -------------- Website/App_Code/Assignments.cs Website/App_Code/tcdbDataSet.xsd Website/App_Code/tcdbDataSet.xss Website/App_Themes/Python/Python.skin Website/App_Themes/Python/python.css Website/Bin/App_Licenses.dll Website/Includes/Assignments.ascx Website/Includes/Assignments.ascx.cs Website/Includes/Products.ascx Website/Includes/Products.ascx.cs Website/Includes/Rights.ascx Website/Includes/UserRoles.ascx Website/Includes/UserRoles.ascx.cs Website/Includes/UserSettings.ascx Website/Includes/UserSettings.ascx.cs Modified: Website/App_Code/Assignments.cs =================================================================== --- Website/App_Code/Assignments.cs 2006-08-09 19:34:56 UTC (rev 290) +++ Website/App_Code/Assignments.cs 2006-08-09 20:32:34 UTC (rev 291) @@ -15,6 +15,67 @@ { private static Logger m_logg = new Logger("TCDB.Code.AssignmentDB"); + public static Assignment GetAssignment(int id) + { + // TODO: Uncomment these two blocks after Jon changes stored proc sel_assignments + /* + tcdbDataSetTableAdapters.db_assignmentsTableAdapter ta = new tcdbDataSetTableAdapters.db_assignmentsTableAdapter(); + tcdbDataSet.db_assignmentsDataTable aTable; + aTable = ta.GetData(id, null, null, null, null, null, null); + */ + Assignment assignment = new Assignment(); + /* + foreach (tcdbDataSet.db_assignmentsRow row in aTable) + { + assignment.DELETED = !row.active; + assignment.NAME = row.aName; + assignment.DATEASSIGNED = row.dateAssigned; + try + { + assignment.DATEDUE = row.dateDue; + } + catch { } + assignment.HIGHPRIORITY = row.highPriority; + assignment.STATUSNAME = row.statusName; + try + { + assignment.DATEFINISHED = row.dateFinished; + } + catch { } + + string type = row.aType; + if (type == Constants.CODE_AI) + { + assignment.ACTIONITEM = ActionItemDB.GetActionItem(row.childID, active); + assignment.WOTOTALTEST = 0; + assignment.WOPASSRATE = 0; + assignment.WOPASS = 0; + assignment.WOFAIL = 0; + assignment.WOERROR = 0; + + assignment.ASSIGNED = assignment.ACTIONITEM.ASSIGNED; + assignment.CREATOR = assignment.ACTIONITEM.CREATOR; + } + else if (type == Constants.CODE_WO) + { + assignment.WORKORDER = WorkOrderDB.TCDB_GetWorkOrder(row.childID); + assignment.WOTOTALTEST = row.WOTotalTest; + //assignment.WOPASSRATE = Convert.ToInt32(row.WOPassRate); + assignment.WOPASS = row.WOPass; + assignment.WOFAIL = row.WOFail; + assignment.WOERROR = row.WOError; + + assignment.ASSIGNED = assignment.WORKORDER.ASSIGNED; + assignment.CREATOR = assignment.WORKORDER.CREATOR; + } + + return assignment; + } + */ + return assignment; + + } + public static List<Assignment> GetAssignmentList(string aType, int finished, int assignedID, string highPriority, Nullable<int> creatorID, Nullable<bool> active) { tcdbDataSetTableAdapters.db_assignmentsTableAdapter ta = new tcdbDataSetTableAdapters.db_assignmentsTableAdapter(); Modified: Website/App_Code/tcdbDataSet.xsd =================================================================== --- Website/App_Code/tcdbDataSet.xsd 2006-08-09 19:34:56 UTC (rev 290) +++ Website/App_Code/tcdbDataSet.xsd 2006-08-09 20:32:34 UTC (rev 291) @@ -1507,4 +1507,4 @@ <xs:field xpath="mstns:noteID" /> </xs:unique> </xs:element> -</xs:schema> \ No newline at end of file +</xs:schema> Modified: Website/App_Code/tcdbDataSet.xss =================================================================== --- Website/App_Code/tcdbDataSet.xss 2006-08-09 19:34:56 UTC (rev 290) +++ Website/App_Code/tcdbDataSet.xss 2006-08-09 20:32:34 UTC (rev 291) @@ -4,7 +4,7 @@ Changes to this file may cause incorrect behavior and will be lost if the code is regenerated. </autogenerated>--> -<DiagramLayout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" ex:showrelationlabel="False" ViewPortX="-10" ViewPortY="286" xmlns:ex="urn:schemas-microsoft-com:xml-msdatasource-layout-extended" xmlns="urn:schemas-microsoft-com:xml-msdatasource-layout"> +<DiagramLayout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" ex:showrelationlabel="False" ViewPortX="209" ViewPortY="-1" xmlns:ex="urn:schemas-microsoft-com:xml-msdatasource-layout-extended" xmlns="urn:schemas-microsoft-com:xml-msdatasource-layout"> <Shapes> <Shape ID="DesignTable:db_products" ZOrder="17" X="28" Y="453" Height="241" Width="213" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="194" /> <Shape ID="DesignTable:db_actionItems" ZOrder="16" X="619" Y="9" Height="292" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="228" SplitterPosition="228" /> @@ -25,4 +25,4 @@ <Shape ID="DesignTable:db_rights" ZOrder="1" X="585" Y="658" Height="156" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="109" /> </Shapes> <Connectors /> -</DiagramLayout> \ No newline at end of file +</DiagramLayout> Modified: Website/App_Themes/Python/Python.skin =================================================================== --- Website/App_Themes/Python/Python.skin 2006-08-09 19:34:56 UTC (rev 290) +++ Website/App_Themes/Python/Python.skin 2006-08-09 20:32:34 UTC (rev 291) @@ -27,4 +27,8 @@ <asp:Image runat="server" SkinId="priority_high_small" ImageUrl="Images/priority_high_small.png" /> <asp:Image runat="server" SkinId="priority_high_large" ImageUrl="Images/priority_high_large.png" /> <asp:Image runat="server" SkinId="priority_normal_small" ImageUrl="" /> -<asp:Image runat="server" SkinId="priority_normal_large" ImageUrl="" /> \ No newline at end of file +<asp:Image runat="server" SkinId="priority_normal_large" ImageUrl="" /> +<asp:Panel runat="server" SkinID="ItemList" Height="100%" Width="100%" /> +<asp:ListBox runat="server" SkinID="RightsBox" SelectionMode="Multiple" Height="150px" Width="250px" /> + +<%-- TODO: Replace the FreeTextBox objects with something that is skinable --%> \ No newline at end of file Modified: Website/App_Themes/Python/python.css =================================================================== --- Website/App_Themes/Python/python.css 2006-08-09 19:34:56 UTC (rev 290) +++ Website/App_Themes/Python/python.css 2006-08-09 20:32:34 UTC (rev 291) @@ -100,6 +100,11 @@ font-family: 'Arial Narrow'; } +INPUT:focus +{ + outline: solid 1px blue; +} + .item .checkbox INPUT { margin: 0; @@ -174,7 +179,8 @@ .indent { - display: inline; + margin-left: 5em; + text-indent: -5em } .pictureMenu @@ -645,6 +651,25 @@ } /************ END Priority Classes *************/ +/******** BEGIN Rights Assignment ************/ +#RightsAssignment .item +{ + display: block; + float: left; + margin: 5px 10px 5px 10px; +} + +#RightsAssignment .hr +{ + clear: both; +} + +#RightsAssignment #Buttons +{ + margin-top: 25px; +} + + /************* DEBUGGING ***************/ /* #MainContent Modified: Website/Bin/App_Licenses.dll =================================================================== (Binary files differ) Modified: Website/Includes/Assignments.ascx =================================================================== --- Website/Includes/Assignments.ascx 2006-08-09 19:34:56 UTC (rev 290) +++ Website/Includes/Assignments.ascx 2006-08-09 20:32:34 UTC (rev 291) @@ -23,10 +23,10 @@ </div> <div class="right"> <div class="buttons"> - <asp:LinkButton ID="newActionItem" runat="server" PostBackUrl="~/ActionItem.aspx?mode=new" - OnInit="newActionItem_Init">New Action Item</asp:LinkButton> + <asp:LinkButton ID="newActionItem" runat="server" + OnInit="newActionItem_Init" OnCommand="newActionItem_Command">New Action Item</asp:LinkButton> - <asp:LinkButton ID="newWorkOrder" runat="server" PostBackUrl="~/WorkOrder.aspx?mode=new" OnInit="newWorkOrder_Init">New Work Order</asp:LinkButton> + <asp:LinkButton ID="newWorkOrder" runat="server" OnInit="newWorkOrder_Init" OnCommand="newWorkOrder_Command">New Work Order</asp:LinkButton> </div> <div class="quickFilter"> <asp:CheckBox ID="cboShowCompleted" runat="server" Text="Show Completed" TextAlign="Left" @@ -44,22 +44,19 @@ </b></b> <div class="xboxcontent"> <asp:Label runat="server" ID="NoAssignments" Text="*" Visible="false" CssClass="errorMessage"></asp:Label> + <!-- // TODO: Change the DataTextField onthe ButtonField to aID after Jon changes stored proc sel_assignments --> <asp:GridView ID="AssignmentsGridView" runat="server" GridLines="None" AllowSorting="True" AutoGenerateColumns="False" DataSourceID="AssignmentDataSource" OnRowDataBound="AssignmentsGridView_RowDataBound" EnableTheming="True" SkinID="assignments" RowStyle-CssClass="hover" HeaderStyle-CssClass="header" - OnDataBinding="AssignmentsGridView_DataBinding" OnDataBound="AssignmentsGridView_DataBound" OnSorted="AssignmentsGridView_Sorted"> + OnDataBinding="AssignmentsGridView_DataBinding" OnDataBound="AssignmentsGridView_DataBound" OnSorted="AssignmentsGridView_Sorted" + OnRowCommand="AssignmentsGridView_RowCommand"> <Columns> <asp:TemplateField HeaderText="(!)" SortExpression="highPriority"> <ItemTemplate> <asp:Literal runat="server" Text="<div class='priority_high_small'></div>" Visible='<%# (Convert.ToBoolean(Eval("highPriority")) == true) %>' /> </ItemTemplate> </asp:TemplateField> - <asp:TemplateField HeaderText="Assignment" SortExpression="aName"> - <ItemTemplate> - <asp:Literal ID="url" runat="server" - Text='<%# getURL(Convert.ToInt32(Eval("childID")),Convert.ToString(Eval("aType")),Convert.ToString(Eval("aName"))) %>' /> - </ItemTemplate> - </asp:TemplateField> + <asp:ButtonField ButtonType="Link" CommandName="View" DataTextField="aName" HeaderText="Assignment" SortExpression="aName" /> <asp:BoundField DataField="assigned" HeaderText="Assignee" SortExpression="assigned" /> <asp:BoundField DataField="creator" HeaderText="Creator" ReadOnly="True" SortExpression="creator" /> <asp:BoundField DataField="dateAssigned" DataFormatString="{0:M-dd-yyyy}" HeaderText="Assigned" Modified: Website/Includes/Assignments.ascx.cs =================================================================== --- Website/Includes/Assignments.ascx.cs 2006-08-09 19:34:56 UTC (rev 290) +++ Website/Includes/Assignments.ascx.cs 2006-08-09 20:32:34 UTC (rev 291) @@ -805,5 +805,32 @@ if (!m_user.HasRight("dev_access")) newWorkOrder.Visible = false; } + protected void newActionItem_Command(object sender, EventArgs e) + { + Session[Constants.CODE_MODE] = "new"; + Response.Redirect("~/ActionItem.aspx"); + } + protected void newWorkOrder_Command(object sender, EventArgs e) + { + Session[Constants.CODE_MODE] = "new"; + Response.Redirect("~/WorkOrder.aspx"); + } + protected void AssignmentsGridView_RowCommand(object sender, GridViewCommandEventArgs e) + { + if (e.CommandName == "View") + { + Assignment a = AssignmentDB.GetAssignment(int.Parse(e.CommandArgument.ToString())); + if (a.ISACTIONITEM) + { + Session[Constants.CODE_AI] = a.ACTIONITEM.ID; + Response.Redirect("~/ActionItem.aspx"); + } + else if (a.ISWORKORDER) + { + Session[Constants.CODE_WO] = a.WORKORDER.ID; + Response.Redirect("~/WorkOrder.aspx"); + } + } + } } } Modified: Website/Includes/Products.ascx =================================================================== --- Website/Includes/Products.ascx 2006-08-09 19:34:56 UTC (rev 290) +++ Website/Includes/Products.ascx 2006-08-09 20:32:34 UTC (rev 291) @@ -1,139 +1,113 @@ -<%@ Control Language="C#" AutoEventWireup="true" CodeFile="Products.ascx.cs" Inherits="TCDB.Products" %> +<%@ Control Language="C#" AutoEventWireup="true" CodeFile="Products.ascx.cs" Inherits="TCDB.Products" %> <%@ Register Assembly="FreeTextBox" Namespace="FreeTextBoxControls" TagPrefix="FTB" %> <%@ Import Namespace="TCDB.Code" %> - <asp:FormView ID="ProductsView" runat="server" DataKeyNames="productID" DataSourceID="ProductData" OnItemInserted="ProductsView_ItemInserted" OnItemUpdated="ProductsView_ItemUpdated" OnDataBound="ProductsView_DataBound" OnItemCommand="ProductsView_ItemCommand"> <HeaderTemplate> <div class="ch"> - <h2> - Product</h2> + <div class="left"> + <h2> + Product</h2> + </div> + <div class="right"> + <asp:Label ID="activeLbl" runat="server" Text="Active"></asp:Label> + <asp:CheckBox ID="activeBox" runat="server" AutoPostBack="True" OnCheckedChanged="activeBox_CheckedChanged" + OnInit="activeBox_Init" /></div> + <div class="end"> + </div> </div> - <div align="right"> - <asp:Label ID="activeLbl" runat="server" Text="Active"></asp:Label> - <asp:CheckBox ID="activeBox" runat="server" AutoPostBack="True" OnCheckedChanged="activeBox_CheckedChanged" - OnInit="activeBox_Init" /></div> - <div class="cc"> </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"> - <div class="ct"> - <div class="item"> - <label> - Product Name:</label> - <asp:Label ID="NameLabel" runat="server" Text='<%# Bind("Name") %>'></asp:Label></div> - <div class="item"> - <label> - Abbreviation:</label> - <asp:Label ID="CodeLabel" runat="server" Text='<%# Eval("codeName") %>'></asp:Label> + <div class="cc"> + <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"> + <div class="ct"> + <div class="item"> + <label> + Product Name:</label> + <asp:Label ID="NameLabel" runat="server" Text='<%# Bind("Name") %>'></asp:Label></div> + <div class="item"> + <label> + Abbreviation:</label> + <asp:Label ID="CodeLabel" runat="server" Text='<%# Eval("codeName") %>'></asp:Label> + </div> + <div class="hr"> + </div> </div> - <div class="hr"> + <div class="cm"> + <asp:Label ID="DescriptionLabel" runat="server" Text='<%# Eval("Description") %>'></asp:Label> + <div class="hr"> + </div> </div> - </div> - <div class="cm"> - <asp:Label ID="DescriptionLabel" runat="server" Text='<%# Eval("Description") %>'></asp:Label> - <div class="hr"> + <div class="cm"> + <asp:Panel ID="RoleUsersPanel" SkinID="ItemList" runat="server" OnInit="RoleUsersPanel_Init" /> + <div class="hr"> + </div> </div> - </div> - <div class="cm"> - <asp:Panel ID="RoleUsersPanel" runat="server" Height="100%" Width="100%" OnInit="RoleUsersPanel_Init"> - </asp:Panel> - <div class="hr"> + <div class="cb"> + <asp:LinkButton ID="New" runat="server" CommandName="New" OnInit="New_Init">New</asp:LinkButton><asp:Label + ID="newLbl" runat="server"> | </asp:Label><asp:LinkButton ID="Edit" runat="server" + CommandName="Edit" OnInit="Edit_Init">Edit</asp:LinkButton><asp:Label ID="deleteLbl" + runat="server"> | </asp:Label><asp:LinkButton ID="Delete" runat="server" + CommandName="DeleteCmd" OnInit="Delete_Init" OnCommand="deleteCmd">Delete</asp:LinkButton><br /> </div> </div> - <div class="cb"> - <asp:LinkButton ID="New" runat="server" CommandName="New" OnInit="New_Init">New</asp:LinkButton><asp:Label - ID="newLbl" runat="server"> | </asp:Label><asp:LinkButton ID="Edit" runat="server" - CommandName="Edit" OnInit="Edit_Init">Edit</asp:LinkButton><asp:Label ID="deleteLbl" - runat="server"> | </asp:Label><asp:LinkButton ID="Delete" runat="server" - CommandName="DeleteCmd" OnInit="Delete_Init" OnCommand="deleteCmd">Delete</asp:LinkButton><br /> - </div> + <b class="xbottom"><b class="xb4"></b><b class="xb3"></b><b class="xb2"></b><b class="xb1"> + </b></b> </div> - <b class="xbottom"><b class="xb4"></b><b class="xb3"></b><b class="xb2"></b><b class="xb1"> - </b></b> </div> </ItemTemplate> <EditItemTemplate> - <asp:RequiredFieldValidator ID="nameValidator" runat="server" ErrorMessage="You must enter a right name." - ControlToValidate="nameBox"></asp:RequiredFieldValidator> - <asp:RequiredFieldValidator ID="codeValidator" runat="server" ErrorMessage="You must enter a right code." - ControlToValidate="codeBox"></asp:RequiredFieldValidator> - <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="3" width="75%" style="height: 44px"> - <strong>Name: </strong><asp:TextBox ID="nameBox" runat="server" Text='<%# Bind("Name") %>' - Width="80%"></asp:TextBox> + <div class="cc"> + <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"> + <div class="ct"> + <div class="item"> + <asp:CheckBox ID="active" runat="server" Checked='<%# Bind("active") %>' Enabled="False" + Visible="False" /><label> + Name:</label><asp:TextBox ID="nameBox" runat="server" Text='<%# Bind("Name") %>' + Width="80%"></asp:TextBox> <asp:Label ID="nameLbl" runat="server" Text='<%# Eval("Name") %>' Visible="False" OnLoad="nameLbl_Load"></asp:Label> - </td> - <td colspan="1" width="25%" style="height: 44px"> - <strong>Abbreviation: </strong> + </div> + <div class="item"> + <label> + Abbreviation: </label> <asp:TextBox ID="codeBox" runat="server" Text='<%# Bind("codeName") %>'></asp:TextBox> <asp:Label ID="codeLbl" runat="server" Text='<%# Eval("codeName") %>' Visible="False"></asp:Label> - </td> - </tr> - <tr> - <td class="hr" colspan="4"> - </td> - </tr> - <tr> - <td colspan="4" height="200" valign="top" align="left"> - <strong>Description:</strong><br /> + </div> + <div class="hr"> + </div> + </div> + <div class="cm"> + <div class="item"> + <label> + Description:</label><br /> <FTB:FreeTextBox ID="descriptionBox" runat="server" SupportFolder="~/aspnet_client/FreeTextBox/" Width="100%" Text='<%# Bind("Description") %>' Height="200px"> </FTB:FreeTextBox> <asp:Label ID="descriptionLbl" runat="server" Text='<%# Eval("Description") %>' Visible="False"></asp:Label> - </td> - </tr> - <tr> - <td class="hr" colspan="4"> - </td> - </tr> - <tr> - <td colspan="2"> - <strong>Roles: </strong> - <asp:DropDownList ID="roleList" runat="server" OnInit="roleList_Init" OnSelectedIndexChanged="roleList_SelectedIndexChanged" - AutoPostBack="True"> - </asp:DropDownList><br /> - <br /> - <asp:LinkButton ID="newRole" runat="server" OnInit="newRole_Init">New Role</asp:LinkButton> - </td> - <td colspan="2"> - <strong>Users: </strong> - <br /> - <asp:ListBox ID="userList" runat="server" Height="150px" Width="150px" OnInit="userList_Init" - SelectionMode="Multiple"></asp:ListBox> - </td> - </tr> - <tr> - <td class="hr" colspan="4"> - </td> - </tr> - <tr> - <td colspan="1" width="25%"> - <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 colspan="3" width="75%"> - <asp:CheckBox ID="active" runat="server" Checked='<%# Bind("active") %>' Enabled="False" - Visible="False" /></td> - </tr> - </table> + </div> + <div class="hr"> + </div> + </div> + <div class="cb"> + <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> + </div> + </div> + <b class="xbottom"><b class="xb4"></b><b class="xb3"></b><b class="xb2"></b><b class="xb1"> + </b></b> </div> - <b class="xbottom"><b class="xb4"></b><b class="xb3"></b><b class="xb2"></b><b class="xb1"> - </b></b> </div> </EditItemTemplate> <InsertItemTemplate> @@ -141,74 +115,46 @@ ControlToValidate="nameBox"></asp:RequiredFieldValidator> <asp:RequiredFieldValidator ID="codeValidator" runat="server" ErrorMessage="You must enter a right code." ControlToValidate="codeBox"></asp:RequiredFieldValidator> - <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="3" width="75%"> - <strong>Name:<br /> - <asp:TextBox ID="nameBox" runat="server" Text='<%# Bind("Name") %>' Width="80%"></asp:TextBox></strong></td> - <td colspan="1" width="25%"> - <strong>Abbreviation:</strong> - <asp:TextBox ID="codeBox" runat="server" Text='<%# Bind("codeName") %>'></asp:TextBox></td> - </tr> - <tr> - <td class="hr" colspan="4" style="height: 1px"> - </td> - </tr> - <tr> - <td colspan="4" align="left" valign="top" height="200"> - <strong>Description:</strong><br /> + <div class="cc"> + <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"> + <div class="ct"> + <div class="item"> + <label> + Name:</label> + <asp:TextBox ID="nameBox" runat="server" Text='<%# Bind("Name") %>' Width="80%"></asp:TextBox></div> + <div class="item"> + <label> + Abbreviation:</label> + <asp:TextBox ID="codeBox" runat="server" Text='<%# Bind("codeName") %>'></asp:TextBox></div> + <div class="hr"> + </div> + </div> + <div class="cm"> + <div class="item"> + <label> + Description:</label><br /> <FTB:FreeTextBox ID="FreeTextBox1" runat="server" SupportFolder="~/aspnet_client/FreeTextBox/" Width="100%" Text='<%# Bind("Description", "{0}") %>' Height="200px"> </FTB:FreeTextBox> - </td> - </tr> - <tr> - <td class="hr" colspan="4"> - </td> - </tr> - <tr> - <td colspan="2"> - <strong>Roles: </strong> - <asp:DropDownList ID="roleList" runat="server" OnInit="roleList_Init" OnSelectedIndexChanged="roleList_SelectedIndexChanged" - AutoPostBack="True"> - </asp:DropDownList><br /> - <br /> - <asp:LinkButton ID="newRole" runat="server" OnInit="newRole_Init">New Role</asp:LinkButton> - </td> - <td colspan="2"> - <strong>Users: </strong> - <br /> - <asp:ListBox ID="userList" runat="server" Height="150px" Width="150px" OnInit="userList_Init" - SelectionMode="Multiple"></asp:ListBox> - </td> - </tr> - <tr> - <td class="hr" colspan="4"> - </td> - </tr> - <tr> - <td colspan="1" width="25%"> - <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 colspan="3" width="75%"> - </td> - </tr> - </table> + </div> + <div class="hr"> + </div> + </div> + <div class="cb"> + <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> + </div> + </div> + <b class="xbottom"><b class="xb4"></b><b class="xb3"></b><b class="xb2"></b><b class="xb1"> + </b></b> </div> - <b class="xbottom"><b class="xb4"></b><b class="xb3"></b><b class="xb2"></b><b class="xb1"> - </b></b> </div> </InsertItemTemplate> - <FooterTemplate> - </div> - </FooterTemplate> </asp:FormView> <asp:ObjectDataSource ID="ProductData" runat="server" InsertMethod="Insert" SelectMethod="GetData" TypeName="tcdbDataSetTableAdapters.db_productsTableAdapter" UpdateMethod="Update"> Modified: Website/Includes/Products.ascx.cs =================================================================== --- Website/Includes/Products.ascx.cs 2006-08-09 19:34:56 UTC (rev 290) +++ Website/Includes/Products.ascx.cs 2006-08-09 20:32:34 UTC (rev 291) @@ -145,8 +145,8 @@ { int roleID = rRow.roleID; - Label Role = new Label(); - Role.Text = "<div class=\"item\"><label>" + rRow.roleName + ":</label><div class=\"indent\">"; + Literal Role = new Literal(); + Role.Text = "<div class=\"item\"><div class=\"indent\"><label>" + rRow.roleName + ":</label>"; ruPanel.Controls.Add(Role); tcdbDataSetTableAdapters.db_roleProductUserTableAdapter rpuAdapter = new tcdbDataSetTableAdapters.db_roleProductUserTableAdapter(); @@ -222,138 +222,6 @@ } } } - protected void newRole_Init(object sender, EventArgs e) - { - LinkButton newRoleBtn = (LinkButton)sender; - - if (!m_user.HasRight("create_role", Constants.PRODUCT_ANYID)) - newRoleBtn.Visible = false; - } - - protected void roleList_SelectedIndexChanged(object sender, EventArgs e) - { - ListBox userList = (ListBox)ProductsView.FindControl("userList"); - DropDownList roleList = (DropDownList)sender; - - // Check for bad state - if (ProductsView.CurrentMode == FormViewMode.Edit) - { - FreeTextBoxControls.FreeTextBox ftb = (FreeTextBoxControls.FreeTextBox)ProductsView.FindControl("descriptionBox"); - if (ftb.Text == "") - ProductsView.DataBind(); - } - - // Get Product Users - if (Session["RoleUsers"] == null) - updateRoleUsers(); - Dictionary<String, ArrayList> RoleUsers = (Dictionary<String, ArrayList>)Session["RoleUsers"]; - - // update selected role - String roleID; - if (Session["role"] != null) - { - roleID = Session["role"].ToString(); - - // Update ProductUsers - int[] indices = userList.GetSelectedIndices(); - ArrayList users = new ArrayList(); - foreach (int index in indices) - users.Add(userList.Items[index].Value); - if (RoleUsers.ContainsKey(roleID)) - RoleUsers[roleID] = users; - } - - Session["role"] = roleList.SelectedValue; - // Update userlist - userList_populate(); - } - protected void updateRoleUsers() - { - // Init RoleUsers - if (Session["RoleUsers"] == null) - Session.Add("RoleUsers", new Dictionary<String, ArrayList>()); - Dictionary<String, ArrayList> RoleUsers = (Dictionary<String, ArrayList>)Session["RoleUsers"]; - RoleUsers.Clear(); - - if (ProductsView.CurrentMode == FormViewMode.Insert) - return; - - tcdbDataSetTableAdapters.db_roleTableAdapter rAdapter = new tcdbDataSetTableAdapters.db_roleTableAdapter(); - tcdbDataSet.db_roleDataTable rTable = rAdapter.GetData(null, null, active); - - foreach (tcdbDataSet.db_roleRow rRow in rTable) - { - ArrayList users = new ArrayList(); - String roleID = rRow.roleID.ToString(); - - tcdbDataSetTableAdapters.db_roleProductUserTableAdapter roleProductUserAdapter = new tcdbDataSetTableAdapters.db_roleProductUserTableAdapter(); - tcdbDataSet.db_roleProductUserDataTable roleProductUserTable = roleProductUserAdapter.GetData(Convert.ToInt32(roleID), productID, true); - - foreach (tcdbDataSet.db_roleProductUserRow row in roleProductUserTable) - users.Add(row.userID.ToString()); - - if (RoleUsers.ContainsKey(roleID)) - RoleUsers[roleID] = users; - else - RoleUsers.Add(roleID, users); - } - } - protected void userList_populate() - { - ListBox userList = (ListBox)ProductsView.FindControl("userList"); - int roleID = Convert.ToInt32(Session["role"]); - - tcdbDataSetTableAdapters.db_usersTableAdapter uAdapter = new tcdbDataSetTableAdapters.db_usersTableAdapter(); - tcdbDataSet.db_usersDataTable uTable = uAdapter.GetData(null, null); - - updateRoleUsers(); - Dictionary<String, ArrayList> RoleUsers = (Dictionary<String, ArrayList>)Session["RoleUsers"]; - - // Init selected user list - ArrayList users; - if (RoleUsers.ContainsKey(roleID.ToString())) - users = RoleUsers[roleID.ToString()]; - else - users = new ArrayList(); - - // populate user list - userList.Items.Clear(); - foreach (tcdbDataSet.db_usersRow row in uTable) - { - ListItem item = new ListItem(row.fullName, row.userID.ToString()); - if (users.Contains(row.userID.ToString())) - item.Selected = true; - userList.Items.Add(item); - } - } - protected void userList_Init(object sender, EventArgs e) - { - ListBox userList = (ListBox)sender; - - if (!m_user.HasRight("edit_role_users", Constants.PRODUCT_ANYID)) - userList.Enabled = false; - } - protected void roleList_Init(object sender, EventArgs e) - { - tcdbDataSetTableAdapters.db_roleTableAdapter rAdapter = new tcdbDataSetTableAdapters.db_roleTableAdapter(); - tcdbDataSet.db_roleDataTable rTable = rAdapter.GetData(null, null, active); - DropDownList roleList = (DropDownList)sender; - ListBox userList = (ListBox)ProductsView.FindControl("userList"); - - // populate roles - foreach (tcdbDataSet.db_roleRow row in rTable) - { - ListItem item = new ListItem(row.roleName, row.roleID.ToString()); - if (!row.active) - item.Attributes.CssStyle.Add("text-decoration", "line-through"); - - roleList.Items.Add(item); - } - - Session["role"] = roleList.SelectedValue; - userList_populate(); - } - protected void activeBox_Init(object sender, EventArgs e) { CheckBox activeBox = (CheckBox)sender; Modified: Website/Includes/Rights.ascx =================================================================== --- Website/Includes/Rights.ascx 2006-08-09 19:34:56 UTC (rev 290) +++ Website/Includes/Rights.ascx 2006-08-09 20:32:34 UTC (rev 291) @@ -4,167 +4,57 @@ OnItemCommand="FormView1_ItemCommand" OnItemInserted="FormView1_ItemInserted" OnItemUpdated="FormView1_ItemUpdated" OnDataBound="FormView1_DataBound"> <HeaderTemplate> - <div align="left"> - <h2> - User Rights</h2> + <div class="ch"> + <div class="left"> + <h2> + User Rights</h2> + </div> + <div class="right"> + <asp:Label ID="activeLbl" runat="server" Text="Active"></asp:Label> + <asp:CheckBox ID="activeBox" runat="server" AutoPostBack="True" OnCheckedChanged="activeBox_CheckedChanged" + OnInit="activeBox_Init" /></div> + <div class="end"> + </div> </div> - <div align="right"> - <asp:Label ID="activeLbl" runat="server" Text="Active"></asp:Label> - <asp:CheckBox ID="activeBox" runat="server" AutoPostBack="True" OnCheckedChanged="activeBox_CheckedChanged" - OnInit="activeBox_Init" /></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 align="left" colspan="3"> - <strong>Name:</strong> - <asp:Label ID="nameLabel" runat="server" Text='<%# Eval("rightsName") %>'></asp:Label></td> - <td align="left" colspan="3"> - <strong>Code:</strong> - <asp:Label ID="codeLabel" runat="server" Text='<%# Eval("rightsCode") %>'></asp:Label></td> - </tr> - <tr> - <td class="hr" colspan="6"> - </td> - </tr> - <tr> - <td align="left" colspan="6" valign="top"> - <strong>Description:</strong><br /> - <asp:Label ID="descriptionLbl" runat="server" Text='<%# Eval("rightsDescription") %>'></asp:Label></td> - </tr> - <tr> - <td class="hr" colspan="6" style="height: 1px"> - </td> - </tr> - <tr> - <td align="left" colspan="2" valign="top" width="33%"> - <strong>Roles:<br /> - </strong> - <asp:Literal ID="roleList" runat="server" OnInit="roleList_Init"></asp:Literal> </td> - <td align="left" colspan="2" valign="top" width="33%"> - </td> - <td align="left" colspan="2" valign="top" width="34%"> - </td> - </tr> - <tr> - <td class="hr" colspan="6"> - </td> - </tr> - <tr> - <td align="left" colspan="6"> - <asp:LinkButton ID="New" runat="server" CommandName="new" OnInit="New_Init">New</asp:LinkButton><asp:Label - ID="newLbl" runat="server" Text="Label"> | </asp:Label><asp:LinkButton - ID="Edit" runat="server" CommandName="edit">Edit</asp:LinkButton></td> - </tr> - </table> + <div class="cc"> + <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"> + <div class="ct"> + <div class="item"> + <label> + Name:</label> + <asp:Label ID="nameLabel" runat="server" Text='<%# Eval("rightsName") %>'></asp:Label></div> + <div class="item"> + <label> + Code:</label> + <asp:Label ID="codeLabel" runat="server" Text='<%# Eval("rightsCode") %>'></asp:Label></div> + <div class="hr"> + </div> + </div> + <div class="cm"> + <div class="item"> + <label> + Description:</label><br /> + <asp:Label ID="descriptionLbl" runat="server" Text='<%# Eval("rightsDescription") %>'></asp:Label></div> + <div class="hr"> + </div> + </div> + <div class="cm"> + <div class="item"> + <label> + Assigned to Roles:</label><br /> + <asp:Literal ID="roleList" runat="server" OnInit="roleList_Init"></asp:Literal></div> + </div> + </div> + <b class="xbottom"><b class="xb4"></b><b class="xb3"></b><b class="xb2"></b><b class="xb1"> + </b></b> </div> - <b class="xbottom"><b class="xb4"></b><b class="xb3"></b><b class="xb2"></b><b class="xb1"> - </b></b> </div> </ItemTemplate> - <EditItemTemplate> - <asp:RequiredFieldValidator ID="nameValidator" runat="server" ErrorMessage="You must enter a right name." - ControlToValidate="nameBox"></asp:RequiredFieldValidator> - <asp:RequiredFieldValidator ID="codeValidator" runat="server" ErrorMessage="You must enter a right code." - ControlToValidate="codeBox"></asp:RequiredFieldValidator> - <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 align="left" colspan="3"> - <strong>Name:</strong> - <asp:TextBox ID="nameBox" runat="server" Text='<%# Bind("rightsName") %>' Width="70%"></asp:TextBox></td> - <td align="left" colspan="3"> - <strong>Code:</strong> - <asp:TextBox ID="codeBox" runat="server" Text='<%# Bind("rightsCode") %>'></asp:TextBox> - <asp:CheckBox ID="active" runat="server" Checked='<%# Bind("active") %>' Enabled="False" - Visible="False" /></td> - </tr> - <tr> - <td class="hr" colspan="6"> - </td> - </tr> - <tr> - <td align="left" colspan="6" valign="top"> - <strong>Description:</strong><br /> - <FTB:FreeTextBox ID="descriptionBox" runat="server" Height="200px" SupportFolder="~/aspnet_client/FreeTextBox/" - Text='<%# Bind("rightsDescription") %>' Width="100%" EnableHtmlMode="True"> - </FTB:FreeTextBox></td> - </tr> - <tr> - <td class="hr" colspan="6"> - </td> - </tr> - <tr> - <td align="left" colspan="6"> - <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> - </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> - <asp:RequiredFieldValidator ID="nameValidator" runat="server" ErrorMessage="You must enter a right name." - ControlToValidate="nameBox"></asp:RequiredFieldValidator> - <asp:RequiredFieldValidator ID="codeValidator" runat="server" ErrorMessage="You must enter a right code." - ControlToValidate="codeBox"></asp:RequiredFieldValidator> - <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 align="left" colspan="3"> - <strong>Name:</strong> - <asp:TextBox ID="nameBox" runat="server" Text='<%# Bind("rightsName") %>' Width="70%"></asp:TextBox></td> - <td align="left" colspan="3"> - <strong>Code:</strong> - <asp:TextBox ID="codeBox" runat="server" Text='<%# Bind("rightsCode") %>'></asp:TextBox></td> - </tr> - <tr> - <td class="hr" colspan="6"> - </td> - </tr> - <tr> - <td align="left" colspan="6" valign="top"> - <strong>Description:</strong><br /> - <FTB:FreeTextBox ID="FreeTextBox1" runat="server" Height="200px" SupportFolder="~/aspnet_client/FreeTextBox/" - Text='<%# Bind("rightsDescription") %>' Width="100%" EnableHtmlMode="True"> - </FTB:FreeTextBox> - </td> - </tr> - <tr> - <td class="hr" colspan="6"> - </td> - </tr> - <tr> - <td align="left" colspan="6"> - <asp:LinkButton ID="InsertButton" runat="server" CausesValidation="True" CommandName="Insert" - Text="Insert"></asp:LinkButton> - | - <asp:LinkButton ID="UpdateCancelButton" runat="server" CausesValidation="False" CommandName="Cancel" - Text="Cancel"> - </asp:LinkButton></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="RightsDataSource" runat="server" SelectMethod="GetData" TypeName="tcdbDataSetTableAdapters.db_rightsTableAdapter" InsertMethod="Insert" UpdateMethod="Update"> Modified: Website/Includes/UserRoles.ascx =================================================================== --- Website/Includes/UserRoles.ascx 2006-08-09 19:34:56 UTC (rev 290) +++ Website/Includes/UserRoles.ascx 2006-08-09 20:32:34 UTC (rev 291) @@ -1,203 +1,200 @@ <%@ Control Language="C#" AutoEventWireup="true" CodeFile="UserRoles.ascx.cs" Inherits="TCDB.UserRoles" %> <%@ Register Assembly="FreeTextBox" Namespace="FreeTextBoxControls" TagPrefix="FTB" %> -<asp:FormView ID="FormView1" runat="server" DataKeyNames="roleID" DataSourceID="RoleDataSource" - OnItemInserted="FormView1_ItemInserted" OnItemUpdated="FormView1_ItemUpdated" - OnItemCommand="FormView1_ItemCommand" OnDataBound="FormView1_DataBound"> +<asp:FormView ID="UserRoleView" runat="server" DataKeyNames="roleID" DataSourceID="RoleDataSource" + OnItemInserted="UserRoleView_ItemInserted" OnItemUpdated="UserRoleView_ItemUpdated" + OnItemCommand="UserRoleView_ItemCommand" OnDataBound="UserRoleView_DataBound"> <HeaderTemplate> - <div align="left"> - <h2> - User Role</h2> + <div class="ch"> + <div class="left"> + <h2> + User Role</h2> + </div> + <div class="right"> + <asp:Label ID="ActiveLbl" runat="server" Text="Active"></asp:Label> + <asp:CheckBox ID="ActiveBox" runat="server" AutoPostBack="True" OnCheckedChanged="ActiveBox_CheckedChanged" + OnInit="ActiveBox_Init" /></div> </div> - <div align="right"> - <asp:Label ID="activeLbl" runat="server" Text="Active"></asp:Label> - <asp:CheckBox ID="activeBox" runat="server" AutoPostBack="True" OnCheckedChanged="activeBox_CheckedChanged" - OnInit="activeBox_Init" /></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="6" align="left"> - <strong>Name:</strong> - <asp:Label ID="nameLabel" runat="server" Text='<%# Eval("roleName") %>'></asp:Label></td> - </tr> - <tr> - <td class="hr" colspan="6"> - </td> - </tr> - <tr> - <td align="left" colspan="6" valign="top"> - <strong>Description:</strong><br /> - <asp:Label ID="descriptionLbl" runat="server" Text='<%# Eval("roleDescription") %>'></asp:Label></td> - </tr> - <tr> - <td class="hr" colspan="6"> - </td> - </tr> - <tr> - <td colspan="4" align="left" valign="top" width="33%" style="height: 132px"> - <asp:Panel ID="ProductUserPanel" runat="server" Height="100%" Width="100%" OnInit="ProductUserPanel_Init" - ScrollBars="Horizontal" Wrap="False"> - </asp:Panel> - <br /> - <asp:LinkButton ID="editAssignments" runat="server" CommandName="editAssignments" - OnCommand="editAssignments_Command">Edit Role Assignments</asp:LinkButton> - </td> - <td colspan="2" align="left" valign="top" width="34%" style="height: 132px"> - <strong>Rights:</strong><br /> - - <asp:Literal ID="rightsList" runat="server" OnInit="rightsList_Init"></asp:Literal></td> - </tr> - <tr> - <td colspan="6" class="hr"> - </td> - </tr> - <tr> - <td align="left" colspan="6"> - <asp:LinkButton ID="New" runat="server" CommandName="new" OnInit="New_Init">New</asp:LinkButton><asp:Label - ID="newLbl" runat="server" Text=" | "></asp:Label><asp:LinkButton ID="Edit" - runat="server" CommandName="edit" OnInit="Edit_Init">Edit</asp:LinkButton><asp:Label - ID="deleteLbl" runat="server" Text=" | "></asp:Label><asp:LinkButton ID="Delete" - runat="server" CommandName="deleteCmd" OnCommand="deleteCmd" OnLoad="Delete_Load">Delete</asp:LinkButton></td> - </tr> - </table> + <div class="cc"> + <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"> + <div class="ct"> + <div class="item"> + <label> + Name:</label> + <asp:Label ID="NameLabel" runat="server" Text='<%# Eval("roleName") %>'></asp:Label></div> + <div class="hr"> + </div> + </div> + <div class="cm"> + <div class="item"> + <label> + Description:</label> + <asp:Label ID="DescriptionLbl" runat="server" Text='<%# Eval("roleDescription") %>'></asp:Label></div> + <div class="hr"> + </div> + </div> + <div class="cm"> + <div class="item"> + <label> + User Assignments:</label><br /> + <asp:Panel ID="ProductUserPanel" SkinID="ItemList" runat="server" OnInit="ProductUserPanel_Init" /> + </div> + <br /> + <div class="item"> + <div class="indent"> + <label> + Rights:</label> + <asp:Literal ID="RightsList" runat="server" OnInit="RightsList_Init"></asp:Literal></div> + </div> + <div class="hr"> + </div> + </div> + <div class="cb"> + <asp:LinkButton ID="New" runat="server" CommandName="new" OnInit="New_Init">New</asp:LinkButton><asp:Label + ID="NewLbl" runat="server" Text=" | "></asp:Label><asp:LinkButton ID="Edit" + runat="server" CommandName="edit" OnInit="Edit_Init">Edit</asp:LinkButton><asp:Label + ID="EditLbl" runat="server" Text=" | "></asp:Label><asp:LinkButton ID="Delete" + runat="server" CommandName="DeleteCmd" OnCommand="DeleteCmd" OnLoad="Delete_Load">Delete</asp:LinkButton><asp:Label + ID="DeleteLbl" runat="server" Text=" | "></asp:Label><asp:LinkButton ID="EditAssignments" + runat="server" CommandName="EditAssignments" OnCommand="EditAssignments_Command">Edit Role Assignments</asp:LinkButton> + </div> + </div> + <b class="xbottom"><b class="xb4"></b><b class="xb3"></b><b class="xb2"></b><b class="xb1"> + </b></b> </div> - <b class="xbottom"><b class="xb4"></b><b class="xb3"></b><b class="xb2"></b><b class="xb1"> - </b></b> </div> </ItemTemplate> <EditItemTemplate> - <asp:RequiredFieldValidator ID="nameValidator" runat="server" ErrorMessage="You must enter a role name." - ControlToValidate="nameBox"></asp:RequiredFieldValidator> - <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 align="left" colspan="6"> - <strong>Name:</strong> - <asp:TextBox ID="nameBox" runat="server" Text='<%# Bind("roleName") %>' Width="70%"></asp:TextBox> - <asp:CheckBox ID="active" runat="server" Checked='<%# Bind("active") %>' Enabled="False" - Visible="False" /></td> - </tr> - <tr> - <td class="hr" colspan="6"> - </td> - </tr> - <tr> - <td align="left" colspan="6" valign="top"> - <strong>Description:</strong><br /> - <FTB:FreeTextBox ID="descriptionBox" runat="server" SupportFolder="~/aspnet_client/FreeTextBox/" + <asp:RequiredFieldValidator ID="NameValidator" runat="server" ErrorMessage="You must enter a role name." + ControlToValidate="NameBox"></asp:RequiredFieldValidator> + <div class="cc"> + <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"> + <div class="ct"> + <div class="item"> + <asp:CheckBox ID="Active" runat="server" Checked='<%# Bind("active") %>' Enabled="False" + Visible="False" /><label> + ... [truncated message content] |