From: <m_h...@us...> - 2006-08-09 04:47:42
|
Revision: 285 Author: m_hildebrand Date: 2006-08-08 21:47:23 -0700 (Tue, 08 Aug 2006) ViewCVS: http://svn.sourceforge.net/tcdb/?rev=285&view=rev Log Message: ----------- Lots more refactoring Changed Assignments Tree to use postbacks for all links rather than typical html links Added product_add graphic that I forgot to commit up earlier Modified Paths: -------------- Website/App_Code/Assignments.cs Website/App_Code/Common.cs Website/App_Code/Right.cs Website/Includes/Assignments.ascx.cs Website/Includes/AssignmentsTree.ascx Website/Includes/AssignmentsTree.ascx.cs Website/Includes/Footer.ascx.cs Website/Includes/Header.ascx Website/Includes/Header_Menu.ascx Website/Includes/Header_User.ascx Website/Role.aspx Website/TCDB.master Added Paths: ----------- Website/App_Themes/Python/Images/product_add_48.png Website/Includes/Header.ascx.cs Website/Includes/Header_Menu.ascx.cs Website/Includes/UserRoles.ascx Website/Includes/UserRoles.ascx.cs Removed Paths: ------------- Website/Includes/Roles.ascx Website/Includes/Roles.ascx.cs Modified: Website/App_Code/Assignments.cs =================================================================== --- Website/App_Code/Assignments.cs 2006-08-08 21:26:55 UTC (rev 284) +++ Website/App_Code/Assignments.cs 2006-08-09 04:47:23 UTC (rev 285) @@ -82,7 +82,7 @@ public class ActionItemDB : Page { - private static Logger m_logg = new Logger("TCDB.Assignments.ActionItemDB"); + private static Logger m_logg = new Logger("TCDB.Code.ActionItemDB"); public static bool SendNewActionItemMail(int id) { @@ -250,7 +250,7 @@ public class WorkOrderDB : Page { - private static Logger m_logg = new Logger("TCDB.Assignments.WorkOrderDB"); + private static Logger m_logg = new Logger("TCDB.Code.WorkOrderDB"); public static WorkOrder TCDB_GetWorkOrder(int id) { @@ -283,7 +283,7 @@ public class Assignment { - private static Logger m_logg = new Logger("TCDB.Assignments.Assignment"); + private static Logger m_logg = new Logger("TCDB.Code.Assignment"); private int p_id; private string p_name; @@ -469,7 +469,7 @@ public class ActionItem { - private static Logger m_logg = new Logger("TCDB.Assignments.ActionItem"); + private static Logger m_logg = new Logger("TCDB.Code.ActionItem"); private int p_id; private string p_name; @@ -544,7 +544,7 @@ public class WorkOrder { - private static Logger m_logg = new Logger("TCDB.Assignments.WorkOrder"); + private static Logger m_logg = new Logger("TCDB.Code.WorkOrder"); private int p_id; private string p_name; Modified: Website/App_Code/Common.cs =================================================================== --- Website/App_Code/Common.cs 2006-08-08 21:26:55 UTC (rev 284) +++ Website/App_Code/Common.cs 2006-08-09 04:47:23 UTC (rev 285) @@ -42,13 +42,13 @@ m_logg.Fatal(Prefix() + message, ex); } - public void Error(string message) + public new void Error(string message) { if (m_logg.IsErrorEnabled) m_logg.Error(Prefix() + message); } - public void Error(string message, Exception ex) + public new void Error(string message, Exception ex) { if (m_logg.IsErrorEnabled) m_logg.Error(Prefix() + message, ex); @@ -97,24 +97,27 @@ bool hn = false; bool ha = false; - try { + try + { if (m_user != null) u = true; } - catch {} + catch { } - try { + try + { if (m_request.UserHostName != null) hn = true; } - catch {} + catch { } - try { + try + { if (m_request.UserHostAddress != null) { if (hn && m_request.UserHostName != m_request.UserHostAddress) ha = true; } } - catch {} + catch { } if (u || hn || ha) result = "["; if (u) result = result + m_user.ToString(); @@ -1164,23 +1167,30 @@ // TODO: Look for data in the cache and return it if it exists // TODO: Look for data in the config file, save it to the cache, and return it + try + { + tcdbDataSet ds = new tcdbDataSet(); + tcdbDataSetTableAdapters.db_configTableAdapter ta = new tcdbDataSetTableAdapters.db_configTableAdapter(); + ta.GetData(userID, name); + ta.Fill(ds.db_config, userID, name); - tcdbDataSet ds = new tcdbDataSet(); - tcdbDataSetTableAdapters.db_configTableAdapter ta = new tcdbDataSetTableAdapters.db_configTableAdapter(); - ta.GetData(userID, name); - ta.Fill(ds.db_config, userID, name); + DataTableReader dr = ds.db_config.CreateDataReader(); + if (dr.HasRows && dr.Read()) + { + value = Help.DB_StringParse(dr["value"]); + } - DataTableReader dr = ds.db_config.CreateDataReader(); - if (dr.HasRows && dr.Read()) - { - value = Help.DB_StringParse(dr["value"]); + if (value == null && userID != Constants.ANONYMOUSUSERID) + { + value = GetConfigString(Constants.ANONYMOUSUSERID, name); + } + + m_logg.Debug("Loaded config data [" + name + " = " + value.ToString() + "] for userID [" + userID + "]"); } - - if (value == null && userID != Constants.ANONYMOUSUSERID) + catch { - value = GetConfigString(Constants.ANONYMOUSUSERID, name); + m_logg.Debug("Error loading config data [" + name + "] for userID [" + userID + "]"); } - // TODO: Save this value to the cache return value; @@ -1189,45 +1199,62 @@ public static int GetConfigID(int userID, String name) { int id = -1; + try + { + tcdbDataSet ds = new tcdbDataSet(); + tcdbDataSetTableAdapters.db_configTableAdapter ta = new tcdbDataSetTableAdapters.db_configTableAdapter(); + ta.GetData(userID, name); + ta.Fill(ds.db_config, userID, name); - tcdbDataSet ds = new tcdbDataSet(); - tcdbDataSetTableAdapters.db_configTableAdapter ta = new tcdbDataSetTableAdapters.db_configTableAdapter(); - ta.GetData(userID, name); - ta.Fill(ds.db_config, userID, name); - - DataTableReader dr = ds.db_config.CreateDataReader(); - if (dr.HasRows && dr.Read()) + DataTableReader dr = ds.db_config.CreateDataReader(); + if (dr.HasRows && dr.Read()) + { + id = Help.DB_IntParse(dr["id"]); + } + } + catch { - id = Help.DB_IntParse(dr["id"]); + m_logg.Debug("Error locating ConfigID for config value [" + name + "] and userID [" + userID.ToString() + "]"); } - return id; } public static void DeleteConfig(int userID, String name) { - + m_logg.Debug("Attempting to delete config [" + name + "] data for userID [" + userID + "]"); try { int id = GetConfigID(userID, name); DeleteConfig(id); + m_logg.Debug("Config [" + name + "] data for userID [" + userID + "] successfully deleted"); } - catch { } + catch (Exception ex) + { + m_logg.Debug("Unable to delete config [" + name + "] data for userID [" + userID + "]. Does it really exist?", ex); + } } public static void DeleteConfig(int id) { // TODO: Make sure to remove the config value from the cache. Don't remove // it from the config file though. - - tcdbDataSet ds = new tcdbDataSet(); - tcdbDataSetTableAdapters.db_configTableAdapter ta = new tcdbDataSetTableAdapters.db_configTableAdapter(); - ta.Delete(id); + try + { + m_logg.Debug("Removing config data [" + id + "]"); + tcdbDataSet ds = new tcdbDataSet(); + tcdbDataSetTableAdapters.db_configTableAdapter ta = new tcdbDataSetTableAdapters.db_configTableAdapter(); + ta.Delete(id); + } + catch (Exception ex) + { + m_logg.Debug("Unable to remove config data [" + id + "]", ex); + } } public static void SaveConfigString(int userID, String name, String value) { - if (Constants.IS_DEV_ENV) + m_logg.Debug("Saving config data [" + name + " = " + value + "] for userID [" + userID.ToString() + "]"); + try { tcdbDataSetTableAdapters.db_configTableAdapter configAdapter = new tcdbDataSetTableAdapters.db_configTableAdapter(); tcdbDataSet.db_configDataTable configTable = configAdapter.GetData(userID, name); @@ -1242,6 +1269,11 @@ configAdapter.Insert(userID, name, value, "u"); } } + catch (Exception ex) + { + m_logg.Debug("Error saving config string [" + name + " = " + value + "] for userID [" + userID.ToString() + "]", ex); + } + } public static void SaveConfigBool(int userID, String name, Boolean value) { @@ -1371,6 +1403,8 @@ public static string CODE_VERSION = "v"; public static string CODE_RIGHT = "rt"; public static string CODE_ROLE = "r"; + public static string CODE_MODE = "m"; + public static string CODE_CREATED = "created"; // TODO: figure this one out //public static bool ASSIGNMENT_PRIORITY_ALL = null; @@ -1388,31 +1422,37 @@ public static string RIGHTS_SITEADMIN = "siteAdmin"; public static string RIGHTS_ASSIGNASSIGNMENT = "assignAssignment"; + + public static string ASSIGNMENT_MINE = "My Assignments"; + public static string ASSIGNMENT_CREATED = "My Created Assignments"; } public static class Help { - private static Logger m_logg = new Logger("TCDB.Common.Help"); + private static Logger m_logg = new Logger("TCDB.Code.Help"); //protected void SendMail(int type, int id) public static bool SendMail(string subject, string body, bool html, User to) { + m_logg.Debug("Attempting to send mail message from TCDB site to [" + to.ToString() + "]"); string site_email = ConfigDB.GetConfigString("site_email"); string site_name = ConfigDB.GetConfigString("site_name"); - User from = new User(0, site_name, "", site_name, site_email, "", "", "", true); try { + User from = new User(0, site_name, "", site_name, site_email, "", "", "", true); return SendMail(subject, body, html, to, from); } catch (Exception ex) { - throw ex; + m_logg.Error("Error sending mail message from TCDB site to [" + to.ToString() + "]", ex); } + + return false; } public static bool SendMail(string subject, string body, bool html, User to, User from) { - m_logg.Debug("Attempting to send email"); + m_logg.Debug("Attempting to send email from [" + from.ToString() + "] to [" + to.ToString() + "] with subject [" + subject + "]"); if (!ConfigDB.GetConfigBool("enable_email")) { m_logg.Debug("Email notifications are disabled site-wide, unable to send mail"); @@ -1425,30 +1465,40 @@ } //create the mail message - MailAddress fromAddr = new MailAddress(from.EMAIL, to.FULLNAME); - MailAddress toAddr = new MailAddress(to.EMAIL, to.FULLNAME); - MailMessage mail = new MailMessage(fromAddr, toAddr); + try + { + MailAddress fromAddr = new MailAddress(from.EMAIL, to.FULLNAME); + MailAddress toAddr = new MailAddress(to.EMAIL, to.FULLNAME); + MailMessage mail = new MailMessage(fromAddr, toAddr); - //set the content - mail.Subject = subject; - mail.Body = body; - mail.IsBodyHtml = html; + //set the content + mail.Subject = subject; + mail.Body = body; + mail.IsBodyHtml = html; - //send the message - SmtpClient smtp = new SmtpClient(ConfigDB.GetConfigString("smtp_server"), ConfigDB.GetConfigInt("smtp_port")); - // TODO: allow for SMTP authentication and for SSL - try - { - smtp.Send(mail); - m_logg.Debug("Email sent to [" + to.EMAIL + "(" + to.ToString() + ")]: " + mail.Subject); + //send the message + try + { + SmtpClient smtp = new SmtpClient(ConfigDB.GetConfigString("smtp_server"), ConfigDB.GetConfigInt("smtp_port")); + // TODO: allow for SMTP authentication and for SSL + + smtp.Send(mail); + m_logg.Debug("Email sent to [" + to.EMAIL + "(" + to.ToString() + ")]: " + mail.Subject); + } + catch (Exception ex) + { + m_logg.Error("Failed to send email to [" + to.EMAIL + "(" + to.ToString() + ")]: " + mail.Subject, ex); + return false; + } } catch (Exception ex) { - m_logg.Error("Failed to send email to [" + to.EMAIL + "(" + to.ToString() + ")]: " + mail.Subject, ex); - throw ex; + m_logg.Error("Error creating the message", ex); + return false; } + m_logg.Debug("Message successfully sent"); return true; } Modified: Website/App_Code/Right.cs =================================================================== --- Website/App_Code/Right.cs 2006-08-08 21:26:55 UTC (rev 284) +++ Website/App_Code/Right.cs 2006-08-09 04:47:23 UTC (rev 285) @@ -14,7 +14,6 @@ using System.Collections; using System.Collections.Generic; using System.Collections.Specialized; -using TCDB.Plugins.AD; using System.Web.SessionState; Added: Website/App_Themes/Python/Images/product_add_48.png =================================================================== (Binary files differ) Property changes on: Website/App_Themes/Python/Images/product_add_48.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Modified: Website/Includes/Assignments.ascx.cs =================================================================== --- Website/Includes/Assignments.ascx.cs 2006-08-08 21:26:55 UTC (rev 284) +++ Website/Includes/Assignments.ascx.cs 2006-08-09 04:47:23 UTC (rev 285) @@ -21,9 +21,10 @@ public partial class Assignments : SiteUserControl { private static Logger m_logg = new Logger("TCDB.Assignments"); - private String uid = HttpContext.Current.Request.QueryString[Constants.CODE_USER]; - private String mode = HttpContext.Current.Request.QueryString["mode"]; - private int productID = Convert.ToInt32(HttpContext.Current.Request.QueryString[Constants.CODE_PRODUCT]); + + private String uid = null; + private String mode = null; + private int productID = 0; private const int MAX_NAME_LENGTH = 30; protected void Page_Load(object sender, EventArgs e) @@ -33,12 +34,30 @@ return; } m_logg.Debug("Loading assignments for [" + m_user.ToString() + "]"); + + // Load session data + try + { + uid = (String)Session[Constants.CODE_USER]; + } + catch { } + try + { + mode = (String)Session["mode"]; + } + catch { } + try + { + productID = (int)Session[Constants.CODE_PRODUCT]; + } + catch { } + if (productID == 0) productID = Constants.PRODUCT_ANYID; if (uid == null) { - m_logg.Debug("UserID not specified in the url, checking for permissions to view multiple users assignments"); + m_logg.Debug("UserID not specified in the session data, checking for permissions to view multiple users assignments"); if (m_user.HasRight("view_other_ai", productID) || m_user.HasRight("view_created_ai", productID) || m_user.HasRight("view_other_wo", productID) || m_user.HasRight("view_created_wo", productID)) { @@ -91,7 +110,7 @@ header.Text = name + "'s Assignments"; } } - if (mode == "created") + if (mode == Constants.ASSIGNMENT_CREATED) Session.Add("myID", m_user.ID); Session.Add("uid", uid); @@ -283,6 +302,7 @@ Session.Add("refresh", true); AssignmentsGridView.DataBind(); } + protected String getURL(int cid, String type, String name) { String displayName; @@ -290,7 +310,7 @@ displayName = name.Substring(0, MAX_NAME_LENGTH) + "..."; else displayName = name; - + if (type == Constants.CODE_AI) return "<a href=\"ActionItem.aspx?" + Constants.CODE_PRODUCT + "=" + productID + "&" + Constants.CODE_AI + "=" + cid + "\">" + displayName + "</a>"; else if (type == Constants.CODE_WO) Modified: Website/Includes/AssignmentsTree.ascx =================================================================== --- Website/Includes/AssignmentsTree.ascx 2006-08-08 21:26:55 UTC (rev 284) +++ Website/Includes/AssignmentsTree.ascx 2006-08-09 04:47:23 UTC (rev 285) @@ -1,10 +1,12 @@ -<%@ Control Language="C#" AutoEventWireup="true" CodeFile="AssignmentsTree.ascx.cs" Inherits="TCDB.AssignmentsTree" %> - -<asp:CheckBox ID="statusComplete" runat="server" Text="Show Completed" AutoPostBack="True" OnCheckedChanged="statusComplete_CheckedChanged" OnLoad="statusComplete_Load" Visible="false"/> +<%@ Control Language="C#" AutoEventWireup="true" CodeFile="AssignmentsTree.ascx.cs" + Inherits="TCDB.AssignmentsTree" %> +<asp:CheckBox ID="statusComplete" runat="server" Text="Show Completed" AutoPostBack="True" + OnCheckedChanged="statusComplete_CheckedChanged" OnLoad="statusComplete_Load" + Visible="false" /> <asp:TreeView ID="AssignmentTree" runat="server" SelectedNodeStyle-CssClass="selectednode" - OnTreeNodePopulate="AssignmentTree_TreeNodePopulate" - OnTreeNodeCollapsed="AssignmentTree_TreeNodeCollapsed" - OnTreeNodeExpanded="AssignmentTree_TreeNodeExpanded" OnInit="AssignmentTree_Init" OnSelectedNodeChanged="AssignmentTree_SelectedNodeChanged" ExpandDepth="1"> + OnTreeNodePopulate="AssignmentTree_TreeNodePopulate" OnTreeNodeCollapsed="AssignmentTree_TreeNodeCollapsed" + OnTreeNodeExpanded="AssignmentTree_TreeNodeExpanded" OnInit="AssignmentTree_Init" + OnSelectedNodeChanged="AssignmentTree_SelectedNodeChanged" ExpandDepth="1"> <Nodes> <asp:TreeNode Text="All Assignments" Value="Users" PopulateOnDemand="True" /> </Nodes> Modified: Website/Includes/AssignmentsTree.ascx.cs =================================================================== --- Website/Includes/AssignmentsTree.ascx.cs 2006-08-08 21:26:55 UTC (rev 284) +++ Website/Includes/AssignmentsTree.ascx.cs 2006-08-09 04:47:23 UTC (rev 285) @@ -16,6 +16,32 @@ { public partial class AssignmentsTree : SiteUserControl { + private void SetValue(TreeNode n, string key, string value) + { + string encodedValues = n.Value; + encodedValues = encodedValues + "|" + key + ":" + value; + n.Value = encodedValues; + } + + private string GetValue(TreeNode n, string key) + { + string encodedValues = n.Value; + char[] delim = "|".ToCharArray(); + string[] split = null; + split = encodedValues.Split(delim); + delim = ":".ToCharArray(); + string[] kvPair = null; + foreach (string s in split) + { + kvPair = s.Split(delim); + if (kvPair[0] == key) + return kvPair[1]; + } + + return null; + } + + private const string PREFIX = "assignmentsTree_"; private static Logger m_logg = new Logger("TCDB.AssignmentsTree"); private const int MAX_NAME_LENGTH = 30; @@ -37,6 +63,7 @@ AssignmentTree.Visible = false; } } + protected void AssignmentTree_TreeNodeCollapsed(object sender, TreeNodeEventArgs e) { ArrayList nodes = (ArrayList)Session["AssignmentNodes"]; @@ -51,22 +78,55 @@ if (e.Node.Selected && AssignmentTree.ShowExpandCollapse == false) { e.Node.Selected = false; - switch (e.Node.Depth) + String nodeType = GetValue(e.Node, "NodeType"); + if (nodeType == null) nodeType = "Root"; + String nodeValue = GetValue(e.Node, "Value"); + switch (nodeType) { - case 0: + case "Root": + Session.Remove(PREFIX + Constants.CODE_USER); + Session.Remove(PREFIX + Constants.CODE_PRODUCT); Response.Redirect("~/Assignments.aspx"); break; - case 1: - Response.Redirect("~/Assignments.aspx?" + Constants.CODE_PRODUCT + "=" + e.Node.Value); + case "Product": + Session.Remove(PREFIX + Constants.CODE_USER); + Session[PREFIX + Constants.CODE_PRODUCT] = nodeValue; + Response.Redirect("~/Assignments.aspx"); break; - case 2: - Response.Redirect("~/Assignments.aspx?" + Constants.CODE_PRODUCT + "=" + e.Node.Parent.Value + "&" + Constants.CODE_USER + "=" + e.Node.Value); + case "User": + Session[PREFIX + Constants.CODE_USER] = nodeValue; + Session[PREFIX + Constants.CODE_PRODUCT] = GetValue(e.Node.Parent, "Value"); + try + { + if (bool.Parse(GetValue(e.Node, "IsCreated"))) + { + Session.Remove(Constants.CODE_PRODUCT); + Session[Constants.CODE_CREATED] = true; + } + } + catch { } + Response.Redirect("~/Assignments.aspx"); break; + case "Created": + Session.Remove(Constants.CODE_USER); + Session.Remove(Constants.CODE_PRODUCT); + Session[Constants.CODE_CREATED] = true; + Response.Redirect("~/Assignments.aspx"); + break; + case "ActionItem": + Session[Constants.CODE_AI] = nodeValue; + Response.Redirect("~/ActionItem.aspx"); + break; + case "WorkOrer": + Session[Constants.CODE_WO] = nodeValue; + Response.Redirect("~/WorkOrder.aspx"); + break; default: break; } } } + protected void AssignmentTree_TreeNodeExpanded(object sender, TreeNodeEventArgs e) { ArrayList nodes = (ArrayList)Session["AssignmentNodes"]; @@ -80,22 +140,55 @@ if (e.Node.Selected && AssignmentTree.ShowExpandCollapse == false) { e.Node.Selected = false; - switch (e.Node.Depth) + String nodeType = GetValue(e.Node, "NodeType"); + if (nodeType == null) nodeType = "Root"; + String nodeValue = GetValue(e.Node, "Value"); + switch (nodeType) { - case 0: + case "Root": + Session.Remove(PREFIX + Constants.CODE_USER); + Session.Remove(PREFIX + Constants.CODE_PRODUCT); Response.Redirect("~/Assignments.aspx"); break; - case 1: - Response.Redirect("~/Assignments.aspx?" + Constants.CODE_PRODUCT + "=" + e.Node.Value); + case "Product": + Session.Remove(PREFIX + Constants.CODE_USER); + Session[PREFIX + Constants.CODE_PRODUCT] = nodeValue; + Response.Redirect("~/Assignments.aspx"); break; - case 2: - Response.Redirect("~/Assignments.aspx?" + Constants.CODE_USER + "=" + e.Node.Value); + case "User": + Session[PREFIX + Constants.CODE_USER] = nodeValue; + Session[PREFIX + Constants.CODE_PRODUCT] = GetValue(e.Node.Parent, "Value"); + try + { + if (bool.Parse(GetValue(e.Node, "IsCreated"))) + { + Session.Remove(Constants.CODE_PRODUCT); + Session[Constants.CODE_CREATED] = true; + } + } + catch { } + Response.Redirect("~/Assignments.aspx"); break; + case "Created": + Session.Remove(Constants.CODE_USER); + Session.Remove(Constants.CODE_PRODUCT); + Session[Constants.CODE_CREATED] = true; + Response.Redirect("~/Assignments.aspx"); + break; + case "ActionItem": + Session[Constants.CODE_AI] = nodeValue; + Response.Redirect("~/ActionItem.aspx"); + break; + case "WorkOrer": + Session[Constants.CODE_WO] = nodeValue; + Response.Redirect("~/WorkOrder.aspx"); + break; default: break; } } } + protected void AssignmentTree_SelectedNodeChanged(object sender, EventArgs e) { TreeNode node = AssignmentTree.SelectedNode; @@ -110,22 +203,55 @@ }/* else {*/ - switch (node.Depth) + String nodeType = GetValue(node, "NodeType"); + if (nodeType == null) nodeType = "Root"; + String nodeValue = GetValue(node, "Value"); + switch (nodeType) { - case 0: + case "Root": + Session.Remove(Constants.CODE_USER); + Session.Remove(Constants.CODE_PRODUCT); Response.Redirect("~/Assignments.aspx"); break; - case 1: - Response.Redirect("~/Assignments.aspx?" + Constants.CODE_PRODUCT + "=" + node.Value); + case "Product": + Session.Remove(Constants.CODE_USER); + Session[Constants.CODE_PRODUCT] = nodeValue; + Response.Redirect("~/Assignments.aspx"); break; - case 2: - Response.Redirect("~/Assignments.aspx?" + Constants.CODE_PRODUCT + "=" + node.Parent.Value + "&" + Constants.CODE_USER + "=" + node.Value); + case "User": + Session[Constants.CODE_USER] = nodeValue; + Session[Constants.CODE_PRODUCT] = GetValue(node.Parent, "Value"); + try + { + if (bool.Parse(GetValue(node, "IsCreated"))) + { + Session.Remove(Constants.CODE_PRODUCT); + Session[Constants.CODE_CREATED] = true; + } + } + catch { } + Response.Redirect("~/Assignments.aspx"); break; + case "Created": + Session.Remove(Constants.CODE_USER); + Session.Remove(Constants.CODE_PRODUCT); + Session[Constants.CODE_CREATED] = true; + Response.Redirect("~/Assignments.aspx"); + break; + case "ActionItem": + Session[Constants.CODE_AI] = nodeValue; + Response.Redirect("~/ActionItem.aspx"); + break; + case "WorkOrer": + Session[Constants.CODE_WO] = nodeValue; + Response.Redirect("~/WorkOrder.aspx"); + break; default: break; } // } } + protected void AssignmentTree_TreeNodePopulate(object sender, TreeNodeEventArgs e) { m_logg.Debug("Populating tree"); @@ -133,44 +259,53 @@ return; // Call the appropriate method to populate a node at a particular level. - switch (e.Node.Depth) + try { - case 0: - BuildProductList(e.Node); - break; - case 1: - if (e.Node.NavigateUrl.Contains("mode=created")) + String nodeType = GetValue(e.Node, "NodeType"); + if (nodeType == null) nodeType = "Root"; + switch (nodeType) + { + case "Root": + BuildProductList(e.Node); + break; + case "Product": + BuildUserList(e.Node); + break; + case "User": + BuildAssignmentList(e.Node); + break; + case "Created": BuildCreatedUserList(e.Node); - else if (e.Node.NavigateUrl.Contains("mode=mine")) - BuildAssignmentList(e.Node); - else - BuildUserList(e.Node); - break; - case 2: - BuildAssignmentList(e.Node); - break; - default: - break; + break; + default: + break; + } } + catch + { + BuildProductList(e.Node); + } } + private void BuildProductList(TreeNode parent) { ArrayList nodes = (ArrayList)Session["AssignmentNodes"]; tcdbDataSetTableAdapters.db_productsTableAdapter pAdapter = new tcdbDataSetTableAdapters.db_productsTableAdapter(); - List<Product> products = ProductDB.GetProductList(active); + List<Product> products = ProductDB.GetProductList(active); - foreach (Product product in products) + foreach (Product product in products) { - if (product.ID == Constants.PRODUCT_SITEID && !m_user.HasRight("view_admin")) + if (product.ID == Constants.PRODUCT_SITEID && !m_user.HasRight("view_admin")) continue; TreeNode child = new TreeNode(); - child.Text = product.NAME; - child.Value = product.ID.ToString(); + SetValue(child, "NodeType", "Product"); + child.Text = product.NAME; + SetValue(child, "Value", product.ID.ToString()); child.PopulateOnDemand = true; child.SelectAction = TreeNodeSelectAction.Select; - if (!product.ACTIVE) - child.Text = "<font class='deleted'>" + child.Text + "</font>"; + if (!product.ACTIVE) + child.Text = "<span class='deleted'>" + child.Text + "</span>"; parent.ChildNodes.Add(child); if (nodes.Contains(child.ValuePath)) @@ -185,15 +320,19 @@ if (m_user.HasRight("view_my_ai", Constants.PRODUCT_ANYID) || m_user.HasRight("view_my_wo", Constants.PRODUCT_ANYID)) { TreeNode mine = new TreeNode(); - mine.Text = "My Assignments"; - mine.Value = m_user.ID.ToString(); + SetValue(mine, "NodeType", "User"); + mine.Text = Constants.ASSIGNMENT_MINE; + SetValue(mine, "Value", m_user.ID.ToString()); mine.SelectAction = TreeNodeSelectAction.Select; mine.PopulateOnDemand = true; - mine.NavigateUrl = "~/Assignments.aspx?mode=mine&" + Constants.CODE_USER + "=" + m_user.ID; - parent.ChildNodes.Add(mine); if (nodes.Contains(mine.ValuePath)) mine.Expand(); + else + { + Session[PREFIX + Constants.CODE_MODE] = Constants.ASSIGNMENT_MINE; + AssignmentTree_TreeNodePopulate(AssignmentTree, new TreeNodeEventArgs(mine)); + } } // *************************** @@ -202,20 +341,21 @@ if (m_user.HasRight("view_created_ai", Constants.PRODUCT_ANYID) || m_user.HasRight("view_created_wo", Constants.PRODUCT_ANYID)) { TreeNode created = new TreeNode(); - created.Text = "My Created Assignments"; - created.Value = Constants.PRODUCT_CREATED.ToString(); + SetValue(created, "NodeType", "Created"); + created.Text = Constants.ASSIGNMENT_CREATED; + SetValue(created, "Value", Constants.PRODUCT_CREATED.ToString()); created.SelectAction = TreeNodeSelectAction.Select; created.PopulateOnDemand = true; - created.NavigateUrl = "~/Assignments.aspx?mode=created"; - parent.ChildNodes.Add(created); if (nodes.Contains(created.ValuePath)) created.Expand(); + else + AssignmentTree_TreeNodePopulate(AssignmentTree, new TreeNodeEventArgs(created)); } } private void BuildCreatedUserList(TreeNode parent) { - m_logg.Debug("Building my user list"); + m_logg.Debug("Building my created user list"); ArrayList nodes = (ArrayList)Session["AssignmentNodes"]; tcdbDataSetTableAdapters.db_usersTableAdapter uAdapter = new tcdbDataSetTableAdapters.db_usersTableAdapter(); tcdbDataSet.db_usersDataTable uTable = uAdapter.GetData(null, null); @@ -231,15 +371,20 @@ continue; // User name + m_logg.Debug("Adding user [" + row.fullName + "]"); TreeNode user = new TreeNode(); + SetValue(user, "NodeType", "User"); + SetValue(user, "IsCreated", "true"); user.Text = row.fullName; - user.Value = row.userID.ToString(); + SetValue(user, "Value", row.userID.ToString()); + user.Checked = true; user.PopulateOnDemand = true; user.SelectAction = TreeNodeSelectAction.Select; - user.NavigateUrl = "~/Assignments.aspx?mode=created&" + Constants.CODE_USER + "=" + user.Value; parent.ChildNodes.Add(user); if (nodes.Contains(user.ValuePath)) user.Expand(); + else + AssignmentTree_TreeNodePopulate(AssignmentTree, new TreeNodeEventArgs(user)); } } private void BuildUserList(TreeNode parent) @@ -247,7 +392,7 @@ m_logg.Debug("Building user list"); ArrayList nodes = (ArrayList)Session["AssignmentNodes"]; tcdbDataSetTableAdapters.db_roleProductUserTableAdapter rpuAdapter = new tcdbDataSetTableAdapters.db_roleProductUserTableAdapter(); - tcdbDataSet.db_roleProductUserDataTable rpuTable = rpuAdapter.GetData(null, Convert.ToInt32(parent.Value), true); + tcdbDataSet.db_roleProductUserDataTable rpuTable = rpuAdapter.GetData(null, Convert.ToInt32(GetValue(parent, "Value")), true); m_logg.Debug("There are currently [" + rpuTable.Count.ToString() + "] users"); // Assignment status @@ -268,8 +413,9 @@ // Create the new child node. TreeNode child = new TreeNode(); + SetValue(child, "NodeType", "User"); child.Text = row.fullName; - child.Value = row.userID.ToString(); + SetValue(child, "Value", row.userID.ToString()); child.PopulateOnDemand = true; child.SelectAction = TreeNodeSelectAction.Select; parent.ChildNodes.Add(child); @@ -280,7 +426,7 @@ } // if there are no users or only the current user - if (parent.ChildNodes.Count == 0 || (parent.ChildNodes.Count == 1 && parent.ChildNodes[0].Value == m_user.ID.ToString())) + if (parent.ChildNodes.Count == 0 || (parent.ChildNodes.Count == 1 && GetValue(parent.ChildNodes[0], "Value") == m_user.ID.ToString())) parent.Parent.ChildNodes.Remove(parent); } private void BuildAssignmentList(TreeNode parent) @@ -288,20 +434,20 @@ m_logg.Debug("Building created assignment list"); // Populate the second-level nodes with assignments int status = Constants.ASSIGNMENT_UNFINISHED; - int userID = Convert.ToInt32(parent.Value); + int userID = Convert.ToInt32(GetValue(parent, "Value")); int productID = Constants.PRODUCT_ANYID; // try and get the product id (should only fail if in "My Assignments" try { - productID = Convert.ToInt32(parent.Parent.Value); + productID = Convert.ToInt32(GetValue(parent.Parent, "Value")); } catch { } // Set status and get assignment list if (statusComplete.Checked) status = Constants.ASSIGNMENT_FINISHEDANDUNFINISHED; - List<Assignment> assignmentList = UserDB.GetUserInfo(Convert.ToInt32(parent.Value)).GetAssignments(false, status, active); + List<Assignment> assignmentList = UserDB.GetUserInfo(Convert.ToInt32(GetValue(parent, "Value"))).GetAssignments(false, status, active); m_logg.Debug("There are currently [" + assignmentList.Count.ToString() + "] assignments"); if (assignmentList.Count > 0) @@ -309,7 +455,13 @@ foreach (Assignment a in assignmentList) { // created list - if (parent.NavigateUrl.Contains("mode=created") && a.CREATOR.ID != m_user.ID) + bool p = false; + try + { + p = bool.Parse(GetValue(parent, "IsCreated")); + } + catch { } + if (p && a.CREATOR.ID != m_user.ID) continue; // Create the new child node. @@ -323,37 +475,37 @@ child.Text = a.NAME; if (a.ISACTIONITEM) { + SetValue(child, "NodeType", "ActionItem"); if ((m_user.HasRight("view_other_ai", productID)) || ((userID == m_user.ID) && m_user.HasRight("view_my_ai", productID)) || ((a.ACTIONITEM.CREATOR.ID == m_user.ID) && m_user.HasRight("view_created_ai", productID))) { - child.Value = a.ACTIONITEM.ID.ToString(); - child.NavigateUrl = "~/ActionItem.aspx?" + Constants.CODE_PRODUCT + "=" + productID + "&" + Constants.CODE_AI + "=" + child.Value; + SetValue(child, "Value", a.ACTIONITEM.ID.ToString()); } else continue; } else { + SetValue(child, "NodeType", "WorkOrder"); if ((m_user.HasRight("view_other_wo", productID)) || ((userID == m_user.ID) && m_user.HasRight("view_my_ai", productID)) || ((a.WORKORDER.CREATOR.ID == m_user.ID) && m_user.HasRight("view_created_ai", productID))) { - child.Value = a.WORKORDER.ID.ToString(); - child.NavigateUrl = "~/WorkOrder.aspx?" + Constants.CODE_PRODUCT + "=" + productID + "&" + Constants.CODE_WO + "=" + child.Value; + SetValue(child, "Value", a.WORKORDER.ID.ToString()); } else continue; } if (a.DELETED) - child.Text = "<font class='deleted'>" + child.Text + "</font>"; + child.Text = "<span class='deleted'>" + child.Text + "</span>"; else if (a.DATEFINISHED != null) - child.Text = "<font class='finished'>" + child.Text + "</font>"; + child.Text = "<span class='finished'>" + child.Text + "</span>"; else if (a.DATEDUE < DateTime.Today) - child.Text = "<font class='overdue'>" + child.Text + "</font>"; + child.Text = "<span class='overdue'>" + child.Text + "</span>"; // Add the new child node to the ChildNodes collection of the parent node. parent.ChildNodes.Add(child); } - + // if there are no assignments if (parent.ChildNodes.Count == 0) parent.Parent.ChildNodes.Remove(parent); Modified: Website/Includes/Footer.ascx.cs =================================================================== --- Website/Includes/Footer.ascx.cs 2006-08-08 21:26:55 UTC (rev 284) +++ Website/Includes/Footer.ascx.cs 2006-08-09 04:47:23 UTC (rev 285) @@ -33,7 +33,7 @@ result = loadtime.TotalSeconds.ToString("F") + " seconds"; } - m_logg.Debug("Page load for user [" + m_user.ToString() + "] from [" + Request.UserHostName + " (" + Request.UserHostAddress + ")] took [" + result + "]"); + m_logg.Debug("Page load took [" + result + "]"); return result; } Modified: Website/Includes/Header.ascx =================================================================== --- Website/Includes/Header.ascx 2006-08-08 21:26:55 UTC (rev 284) +++ Website/Includes/Header.ascx 2006-08-09 04:47:23 UTC (rev 285) @@ -1,4 +1,4 @@ -<%@ Control Language="C#" AutoEventWireup="true" Inherits="TCDB.SiteUserControl" %> +<%@ Control Language="C#" AutoEventWireup="true" Inherits="TCDB.Header" CodeFile="Header.ascx.cs" %> <%@ Register TagPrefix="TCDB" TagName="User" Src="~/Includes/Header_User.ascx" %> <%@ Register TagPrefix="TCDB" TagName="CurrentInfo" Src="~/Includes/Header_CurrentInfo.ascx" %> <%@ Register TagPrefix="TCDB" TagName="Menu" Src="~/Includes/Header_Menu.ascx" %> @@ -6,7 +6,7 @@ <div id="Logo"> </div> <% - if (m_user.ID > Constants.ANONYMOUSUSERID) + if (m_user.ID > Constants.ANONYMOUSUSERID && !m_user.AUTOMATION) { %> <div id="MainMenu"> @@ -26,7 +26,6 @@ else { // If the user doesn't exist, signout + m_logg.Debug("User is either not logged in or is an automation user, denying access"); FormsAuthentication.SignOut(); - } %> -<div id="Error"> - <asp:Label ID="ErrorControl" Text="" runat="server"></asp:Label></div> + } %> \ No newline at end of file Added: Website/Includes/Header.ascx.cs =================================================================== --- Website/Includes/Header.ascx.cs (rev 0) +++ Website/Includes/Header.ascx.cs 2006-08-09 04:47:23 UTC (rev 285) @@ -0,0 +1,22 @@ +using System; +using System.Data; +using System.Configuration; +using System.Web; +using System.Web.Security; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Web.UI.WebControls.WebParts; +using System.Web.UI.HtmlControls; +using TCDB.Code; + + +namespace TCDB +{ + /// <summary> + /// Summary description for Header + /// </summary> + public partial class Header : SiteUserControl + { + protected Logger m_logg = new Logger("TCDB.Header"); + } +} \ No newline at end of file Modified: Website/Includes/Header_Menu.ascx =================================================================== --- Website/Includes/Header_Menu.ascx 2006-08-08 21:26:55 UTC (rev 284) +++ Website/Includes/Header_Menu.ascx 2006-08-09 04:47:23 UTC (rev 285) @@ -1,7 +1,6 @@ -<%@ Control Language="C#" AutoEventWireup="true" Inherits="TCDB.SiteUserControl" %> +<%@ Control Language="C#" AutoEventWireup="true" CodeFile="Header_Menu.ascx.cs" Inherits="TCDB.Header_Menu" %> <%@ Import Namespace="TCDB.Code" %> -<a href="Assignments.aspx?<% Response.Write(Constants.CODE_USER+"="+m_user.ID); %>"> - Assignments</a> +<asp:LinkButton runat="server" id="load" OnCommand="LoadAssignments" Text="Assignments" /> <% if (Constants.IS_DEV_ENV) { %> | Execute Added: Website/Includes/Header_Menu.ascx.cs =================================================================== --- Website/Includes/Header_Menu.ascx.cs (rev 0) +++ Website/Includes/Header_Menu.ascx.cs 2006-08-09 04:47:23 UTC (rev 285) @@ -0,0 +1,28 @@ +using System; +using System.Data; +using System.Configuration; +using System.Web; +using System.Web.Security; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Web.UI.WebControls.WebParts; +using System.Web.UI.HtmlControls; +using TCDB.Code; + + +namespace TCDB +{ + /// <summary> + /// Summary description for Header_Menu + /// </summary> + public partial class Header_Menu : SiteUserControl + { + private Logger m_logg = new Logger("TCDB.Header_Menu"); + + protected void LoadAssignments(object sender, CommandEventArgs e) + { + Session[Constants.CODE_USER] = m_user.ID; + Response.Redirect("Assignments.aspx"); + } + } +} \ No newline at end of file Modified: Website/Includes/Header_User.ascx =================================================================== --- Website/Includes/Header_User.ascx 2006-08-08 21:26:55 UTC (rev 284) +++ Website/Includes/Header_User.ascx 2006-08-09 04:47:23 UTC (rev 285) @@ -10,4 +10,4 @@ <% if (m_user.HasRight("view_admin", Constants.PRODUCT_ANYID)) { %> | <a href="Administration.aspx">Admin</a> -<% } %> +<% } %> \ No newline at end of file Deleted: Website/Includes/Roles.ascx =================================================================== --- Website/Includes/Roles.ascx 2006-08-08 21:26:55 UTC (rev 284) +++ Website/Includes/Roles.ascx 2006-08-09 04:47:23 UTC (rev 285) @@ -1,226 +0,0 @@ -<%@ Control Language="C#" AutoEventWireup="true" CodeFile="Roles.ascx.cs" Inherits="TCDB.TCDBRoles" %> -<%@ 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"> - <HeaderTemplate> - <div align="left"> - <h2> - User Role</h2> - </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:ListBox ID="rightsList" runat="server" Height="150px" Width="150px" OnInit="rightsList_Init1"> - </asp:ListBox> - </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> - <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> - </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/" - Width="100%" Text='<%# Bind("roleDescription") %>' Height="200px" EnableHtmlMode="true" - DisableIEBackButton="False"> - </FTB:FreeTextBox> - </td> - </tr> - <tr> - <td class="hr" colspan="6"> - </td> - </tr> - <tr> - <td colspan="2" align="left" valign="top" width="33%"> - </td> - <td colspan="2" align="left" valign="top" width="33%"> - </td> - <td colspan="2" align="left" valign="top" width="34%"> - <strong>Rights:<br /> - <asp:LinkButton ID="newRight" runat="server" CommandName="newRight" OnCommand="newRight">New Right</asp:LinkButton><br /> - </strong> <asp:ListBox ID="rightsList" runat="server" DataSourceID="RightsDataSource" - DataTextField="rightsName" DataValueField="rightsID" SelectionMode="Multiple" - Height="150px" OnDataBound="rightsList_DataBound" Width="150px"> - </asp:ListBox> </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 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></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/" - Width="100%" Text='<%# Bind("roleDescription") %>' Height="200px" EnableHtmlMode="true"> - </FTB:FreeTextBox> - </td> - </tr> - <tr> - <td class="hr" colspan="6"> - </td> - </tr> - <tr> - <td colspan="2" align="left" valign="top" width="33%"> - </td> - <td colspan="2" align="left" valign="top" width="33%"> - </td> - <td colspan="2" align="left" valign="top" width="34%"> - <strong>Rights: - <asp:LinkButton ID="newRight" runat="server" CommandName="newRight" OnCommand="newRight">New Right</asp:LinkButton><br /> - </strong> <asp:ListBox ID="rightsList" runat="server" DataSourceID="RightsDataSource" - DataTextField="rightsName" DataValueField="rightsID" SelectionMode="Multiple" - Height="150px" Width="150px"></asp:ListBox> - </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="RoleDataSource" runat="server" InsertMethod="Insert" SelectMethod="GetData" - TypeName="tcdbDataSetTableAdapters.db_roleTableAdapter" UpdateMethod="Update" - OldValuesParameterFormatString="original_{0}"> - <UpdateParameters> - <asp:Parameter Name="roleID" Type="Int32" /> - <asp:Parameter Name="roleName" Type="String" /> - <asp:Parameter Name="roleDescription" Type="String" /> - <asp:Parameter Name="active" Typ... [truncated message content] |