Exemplo n.º 1
0
        /// <summary>
        /// 添加表头复选框
        /// </summary>
        private void AddHeadCheckbox(TableRowBuilder rowBuilder)
        {
            var headColumnBuilder = new TableHeadColumnBuilder();

            headColumnBuilder.AddCheckBox(_config.Id);
            rowBuilder.AppendContent(headColumnBuilder);
        }
Exemplo n.º 2
0
        /// <summary>
        /// 添加内容
        /// </summary>
        protected virtual void AddBody(TableBodyBuilder tableBodyBuilder)
        {
            var rowBuilder = new TableRowBuilder();

            rowBuilder.NgFor($"let row of {_config.Id}.data");
            rowBuilder.AppendContent(_config.Content);
            tableBodyBuilder.AppendContent(rowBuilder);
        }
Exemplo n.º 3
0
        /// <summary>
        /// 创建行生成器
        /// </summary>
        private TableRowBuilder CreateRowBuilder()
        {
            var rowBuilder = new TableRowBuilder();

            rowBuilder.NgIf($"{GetWrapperId()}.isShow(row)");
            rowBuilder.AppendContent(_config.Content);
            return(rowBuilder);
        }
Exemplo n.º 4
0
 /// <summary>
 /// 添加标题列表
 /// </summary>
 private void AddHeadTitles(TableRowBuilder rowBuilder)
 {
     foreach (var title in _config.Titles)
     {
         var headColumnBuilder = new TableHeadColumnBuilder();
         headColumnBuilder.Title(title);
         rowBuilder.AppendContent(headColumnBuilder);
     }
 }
Exemplo n.º 5
0
 /// <summary>
 /// 添加标题列
 /// </summary>
 private void AddHeadColumns(TableRowBuilder rowBuilder)
 {
     foreach (var column in _config.Columns)
     {
         var headColumnBuilder = new TableHeadColumnBuilder();
         headColumnBuilder.Title(column.Title);
         headColumnBuilder.AddSort(column.GetSortKey());
         rowBuilder.AppendContent(headColumnBuilder);
     }
 }
Exemplo n.º 6
0
        /// <summary>
        /// 添加表头复选框
        /// </summary>
        private void AddHeadCheckbox(TableRowBuilder rowBuilder)
        {
            if (_config.AutoCreateHeadCheckbox == false)
            {
                return;
            }
            var headColumnBuilder = new TableHeadColumnBuilder();

            headColumnBuilder.AddCheckBox(_config.Id);
            rowBuilder.AppendContent(headColumnBuilder);
        }
Exemplo n.º 7
0
        /// <summary>
        /// 添加行
        /// </summary>
        protected void AddRow(TagBuilder tableBuilder)
        {
            if (_config.AutoCreateRow == false)
            {
                return;
            }
            var tableBodyBuilder = new TableBodyBuilder();
            var rowBuilder       = new TableRowBuilder();

            rowBuilder.NgFor($"let row of {_config.Id}.data");
            rowBuilder.AppendContent(_config.Content);
            tableBodyBuilder.AppendContent(rowBuilder);
            tableBuilder.AppendContent(tableBodyBuilder);
        }
Exemplo n.º 8
0
 /// <summary>
 /// 添加标题列
 /// </summary>
 protected override void AddHeadColumns(TableRowBuilder rowBuilder)
 {
     for (int i = 0; i < _config.Columns.Count; i++)
     {
         var headColumnBuilder = new TableHeadColumnBuilder();
         var column            = _config.Columns[i];
         if (i == 0)
         {
             AddCheckboxColumn(headColumnBuilder, column);
         }
         else
         {
             AddColumn(headColumnBuilder, column);
         }
         rowBuilder.AppendContent(headColumnBuilder);
     }
 }
Exemplo n.º 9
0
 /// <summary>
 /// 添加标题列
 /// </summary>
 private void AddHeadColumns(TableRowBuilder rowBuilder)
 {
     foreach (var column in _config.Columns)
     {
         var headColumnBuilder = new TableHeadColumnBuilder();
         if (column.IsCheckbox)
         {
             headColumnBuilder.AddCheckBox(_config.Id);
         }
         else
         {
             headColumnBuilder.Title(column.Title);
             headColumnBuilder.AddSort(column.GetSortKey());
         }
         rowBuilder.AppendContent(headColumnBuilder);
     }
 }
Exemplo n.º 10
0
        /// <summary>
        /// 添加表头
        /// </summary>
        protected virtual void AddHead(TagBuilder tableBuilder)
        {
            if (_config.Titles.Count == 0 || _config.AutoCreateHead == false)
            {
                return;
            }
            var headBuilder = new TableHeadBuilder();

            tableBuilder.AppendContent(headBuilder);
            var rowBuilder = new TableRowBuilder();

            headBuilder.AppendContent(rowBuilder);
            foreach (var title in _config.Titles)
            {
                var headColumnBuilder = new TableHeadColumnBuilder();
                headColumnBuilder.Title(title);
                rowBuilder.AppendContent(headColumnBuilder);
            }
        }