void UpdateDataEdit(string selLinkTypeId) { panelGrid.Visible = false; if ((selLinkTypeId != null) && (selLinkTypeId.Length > 0)) { webTab.EnableViewState = false; webTab.Tabs.FromKeyTab("Properties").ContentPane.TargetUrl = "./linktypes/linktype_properties.aspx?t=" + selLinkTypeId; LinkType linkType = LinkType.GetByKey(Convert.ToInt32(selLinkTypeId)); if (linkType == null) // create new link type { lbTitle.Text = "LinkType: New"; webTab.Tabs.FromKeyTab("Items").Visible = false; // hide Items tab webTab.Tabs.FromKeyTab("ItemTypes").Visible = false; // hide ItemTypes tab } else // update link type { lbTitle.Text = "LinkType: " + linkType.Name; webTab.Tabs.FromKeyTab("Items").ContentPane.TargetUrl = "./linktypes/linktype_items.aspx?t=" + selLinkTypeId; webTab.Tabs.FromKeyTab("Items").Visible = true; webTab.Tabs.FromKeyTab("Items").Text = "Items (" + linkType.GetItemCount(false).ToString() + ")"; // LinkFrom is false (count of companions) lbTitle.Text = "LinkType: " + linkType.Name; webTab.Tabs.FromKeyTab("ItemTypes").ContentPane.TargetUrl = "./linktypes/linktype_itemtypes.aspx?t=" + selLinkTypeId; webTab.Tabs.FromKeyTab("ItemTypes").Visible = true; webTab.Tabs.FromKeyTab("ItemTypes").Text = "Item types (" + linkType.GetItemTypeCount().ToString() + ")"; } webTab.Visible = true; } }