This commit is contained in:
2021-01-29 21:40:08 +00:00
parent 2e9c570272
commit 740323c67d
21 changed files with 55 additions and 40 deletions

View File

@@ -0,0 +1,9 @@
using System.Collections.Generic;
namespace AyaNova.Models
{
public class DataListColumnFilter
{
public string op { get; set; }
public string value { get; set; }
}
}

View File

@@ -2,20 +2,7 @@ using System.Collections.Generic;
namespace AyaNova.Models
{
//common base class for data table display at client, reporting and mass bulk operations
public class DataListBase
{
public string DataListKey { get; set; }
public Dictionary<string, string> SortBy { get; set; }
public List<DataListFilterOption> Filter { get; set; }
public string ClientCriteria { get; set; }
public DataListBase()
{
SortBy = new Dictionary<string, string>();
Filter = new List<DataListFilterOption>();
}
}
/*
OLD EXAMPLE:
@@ -52,9 +39,4 @@ namespace AyaNova.Models
}
}
public class DataListColumnFilter
{
public string op { get; set; }
public string value { get; set; }
}
}

View File

@@ -0,0 +1,21 @@
using System.Collections.Generic;
namespace AyaNova.Models
{
//common base class for data table display at client, reporting and mass bulk operations
public class DataListProcessingBase
{
public string DataListKey { get; set; }
public Dictionary<string, string> SortBy { get; set; }
public List<DataListFilterOption> Filter { get; set; }
public string ClientCriteria { get; set; }
public DataListProcessingBase()
{
SortBy = new Dictionary<string, string>();
Filter = new List<DataListFilterOption>();
}
}
}

View File

@@ -3,7 +3,7 @@ namespace AyaNova.Models
{
//Request version of selection request used by report and bulk ops
//handles posts from client
public class DataListSelectedRequest : DataListBase
public class DataListSelectedRequest : DataListProcessingBase
{
public AyaType ObjectType { get; set; }
public long[] SelectedRowIds { get; set; }

View File

@@ -5,7 +5,7 @@ namespace AyaNova.Models
//Used to drive processes that rely on selections made at client from a datalist
//either a preselected list of id's or a datalist key and listview filter object that can
//be used to rehydrate a list of id's
public class DataListSelectionOptions : DataListBase
public class DataListSelectionOptions : DataListProcessingBase
{
public AyaType ObjectType { get; set; }
public long[] SelectedRowIds { get; set; }

View File

@@ -3,7 +3,7 @@ using System.Collections.Generic;
namespace AyaNova.Models
{
public sealed class DataListTableOptions : DataListBase
public sealed class DataListTableOptions : DataListProcessingBase
{
public List<string> Columns { get; set; }
public const int MaxPageSize = 1000;