using System;
using System.ComponentModel;
using DataHolder.Containers;
using DataHolder.DataPersistence;
namespace DBWebControls.Controls{
/// <summary>
/// Summary description for ActorListState.
/// </summary>
public class GenericListState : IDisposable
{
public GenericListState(GenericData p_GEfilters)
{
l_GEfilters = p_GEfilters;
}
protected GenericData l_GEfilters = null;
public GenericData GEfilters
{
get
{
return l_GEfilters;
}
}
protected string l_SortColumn = "";
public string SortColumn
{
get
{
return l_SortColumn;
}
set
{
l_SortColumn = value;
}
}
protected ListSortDirection l_SortDirection = ListSortDirection.Ascending;
public ListSortDirection SortDirection
{
get
{
return l_SortDirection;
}
set
{
l_SortDirection = value;
}
}
protected GenericDataCollection l_LoadedData;
public GenericDataCollection LoadedData
{
get{return l_LoadedData;}
set{l_LoadedData = value;}
}
public virtual ColumnFilterInfoCollection GetFilters()
{
return null;
}
public virtual ColumnFilterInfoCollection GetFilterValues()
{
ColumnFilterInfoCollection ret = new ColumnFilterInfoCollection();
ret.Add(GEfilters);
return ret;
}
public virtual OrderByInfoCollection GetorderByInfo()
{
if(SortColumn.Trim().Length > 0)
return new OrderByInfoCollection(new OrderByInfo []{new OrderByInfo(SortColumn, SortDirection)});
else
return null;
}
#region IDisposable Members
public void Dispose()
{
if(l_GEfilters != null)
l_GEfilters.Dispose();
if(LoadedData != null)
LoadedData.Dispose();
}
#endregion
}
}
|