2024-10-13 16:15:32 +04:00

27 lines
970 B
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace NotVisualComponent.Models
{
public class TableWithHeaderConfig<T> : DocumentConfig
{
public (int Columns, int Rows) ColumnsRowsDataCount { get; set; }
public List<(int Column, int Row)>? ColumnsRowsWidth { get; set; }
public List<(int ColumnIndex, int RowIndex, string Header, string PropertyName)>? Headers { get; set; }
public List<T>? Data { get; set; }
public void CheckFields()
{
if (Data == null || Data.Count == 0)
throw new ArgumentNullException("No data");
if (ColumnsRowsWidth is null || ColumnsRowsWidth.Count == 0)
throw new ArgumentNullException("Rows width invalid");
if (Headers is null || Headers.Count == 0)
throw new ArgumentNullException("Header data invalid");
}
}
}