Esempio n. 1
0
        private void CreateHeader(HtmlTable tblProviders, Dictionary <ItemCollectionAttribute, PropertyInfo> properties, bool showCheckers)
        {
            List <HtmlTableCell> headerCells = new List <HtmlTableCell>();

            // Checkbox for all items, presented in the table
            if (showCheckers)
            {
                headerCells.Add(CheckItemCell());
            }

            foreach (var itemHead in properties.Keys)
            {
                if (itemHead.IsId && !showCheckers)
                {
                    continue;
                }
                LayoutFactory.DrawHeader(itemHead, headerCells);
            }

            HtmlTableRow headRow = new HtmlTableRow();

            headRow.Attributes["class"] = "header";

            headerCells.ForEach(cell => headRow.Cells.Add(cell));
            tblProviders.Rows.Add(headRow);
        }