本文整理汇总了C#中BaseFilter类的典型用法代码示例。如果您正苦于以下问题:C# BaseFilter类的具体用法?C# BaseFilter怎么用?C# BaseFilter使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
BaseFilter类属于命名空间,在下文中一共展示了BaseFilter类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: GetPageFromMonthlyStats
public List<MonthlyUserStatisticData> GetPageFromMonthlyStats(int pageNumber, int pageSize, int month, int year)
{
var filter = new BaseFilter() { CurrentPage = pageNumber, ItemsPerPage = pageSize };
List<MonthlyUserStatisticData> items = GetItemsByFilterCM(filter, SortBy.Descending("score"), month, year);
//DateTime previousPeriod = new DateTime(year, month, 1).AddDays(-1);
return items;
}
开发者ID:cmdprompt1911,项目名称:Dimmi,代码行数:9,代码来源:ReviewStatisticsRepository.cs
示例2: GetDataTable
/// <summary>
/// This is a shared function that can be used to get a DataTable to bound with a data bound control using a where clause.
/// </summary>
public static System.Data.DataTable GetDataTable(BaseFilter join, string where)
{
ReportEstimateRecord[] recs = GetRecords(join, where);
return ReportEstimateTable.Instance.CreateDataTable(recs, null);
}
开发者ID:ciswebb,项目名称:FPC-Estimate-App,代码行数:8,代码来源:BaseReportEstimateTable.cs
示例3: GetValues
public static String[] GetValues(
BaseColumn col,
BaseFilter join,
WhereClause where,
OrderBy orderBy,
int maxItems)
{
// Create the filter list.
SqlBuilderColumnSelection retCol = new SqlBuilderColumnSelection(false, true);
retCol.AddColumn(col);
return UsersTable.Instance.GetColumnValues(retCol, join, where.GetFilter(), null, orderBy, BaseTable.MIN_PAGE_NUMBER, maxItems);
}
开发者ID:ciswebb,项目名称:FPC-Estimate-App,代码行数:13,代码来源:BaseUsersTable.cs
示例4: GetRecords
public static UsersRecord[] GetRecords(
BaseFilter join,
WhereClause where,
OrderBy orderBy,
int pageIndex,
int pageSize,
ref int totalRecords)
{
ArrayList recList = UsersTable.Instance.GetRecordList(join, where.GetFilter(), null, orderBy, pageIndex, pageSize, ref totalRecords);
return (UsersRecord[])recList.ToArray(Type.GetType("FPCEstimate.Business.UsersRecord"));
}
开发者ID:ciswebb,项目名称:FPC-Estimate-App,代码行数:12,代码来源:BaseUsersTable.cs
示例5: GetRecordCount
/// <summary>
/// This is a shared function that can be used to get total number of records that will be returned using the where clause.
/// </summary>
public static int GetRecordCount(BaseFilter join, string where)
{
SqlFilter whereFilter = null;
if (where != null && where.Trim() != "")
{
whereFilter = new SqlFilter(where);
}
return (int)UsersTable.Instance.GetRecordListCount(join, whereFilter, null, null);
}
开发者ID:ciswebb,项目名称:FPC-Estimate-App,代码行数:13,代码来源:BaseUsersTable.cs
示例6: GetRecord
/// <summary>
/// This is a shared function that can be used to get a UsersRecord record using a where clause.
/// </summary>
public static UsersRecord GetRecord(BaseFilter join, string where)
{
OrderBy orderBy = null;
return GetRecord(join, where, orderBy);
}
开发者ID:ciswebb,项目名称:FPC-Estimate-App,代码行数:8,代码来源:BaseUsersTable.cs
示例7: GetDataTable
/// <summary>
/// This is a shared function that can be used to get a DataTable to bound with a data bound control using a where clause.
/// </summary>
public static System.Data.DataTable GetDataTable(BaseFilter join, string where)
{
UsersRecord[] recs = GetRecords(join, where);
return UsersTable.Instance.CreateDataTable(recs, null);
}
开发者ID:ciswebb,项目名称:FPC-Estimate-App,代码行数:8,代码来源:BaseUsersTable.cs
示例8: GetByFilterShouldUseDefaultIfPageSizeIfItIsIncorrect
public void GetByFilterShouldUseDefaultIfPageSizeIfItIsIncorrect()
{
ISelpConfiguration configuration = new InMemoryConfiguration();
configuration.DefaultPageSize = 11;
InitRepositoryParams(true, configuration);
int total;
var filter = new BaseFilter
{
PageSize = -55
};
List<FakeEntity> list = repository.GetByFilter(filter, out total);
Assert.IsNotNull(list, "Result is null");
Assert.AreEqual(11, list.Count, "Result count is wrong");
Assert.AreEqual(11, filter.PageSize, "Filter hasn't been normalized");
Assert.AreEqual(100, total, "Total is incorrect");
Assert.AreEqual(11, filter.PageSize, "Returned PageSize incorrect");
}
开发者ID:MikhailApsalikov,项目名称:Selp,代码行数:17,代码来源:GettersTests.cs
示例9: GetByFilterShouldThrowIfSortFieldNotFound
public void GetByFilterShouldThrowIfSortFieldNotFound()
{
InitRepositoryParams(true);
int total;
BaseFilter filter = new BaseFilter
{
SortDirection = ListSortDirection.Descending,
SortField = "dsadsadsada"
};
List<FakeEntity> list = repository.GetByFilter(filter, out total);
}
开发者ID:MikhailApsalikov,项目名称:Selp,代码行数:11,代码来源:GettersTests.cs
示例10: GetByFilterShouldReturnEmptyListWhenNoEntitiesFound
public void GetByFilterShouldReturnEmptyListWhenNoEntitiesFound()
{
InitRepositoryParams(false);
int total;
BaseFilter filter = new BaseFilter
{
Page = 100,
PageSize = 200
};
List<FakeEntity> list = repository.GetByFilter(filter, out total);
Assert.IsNotNull(list, "Result is null");
Assert.AreEqual(0, list.Count, "Result is not empty");
Assert.AreEqual(150, total, "Total incorrect");
Assert.AreEqual(100, filter.Page, "Page incorrect");
Assert.AreEqual(200, filter.PageSize, "PageSize incorrect");
}
开发者ID:MikhailApsalikov,项目名称:Selp,代码行数:16,代码来源:GettersTests.cs
示例11: GetByFilterShouldHaveCorrectOrderWhenItIsSpecifiedDescending
public void GetByFilterShouldHaveCorrectOrderWhenItIsSpecifiedDescending()
{
InitRepositoryParams(true);
int total;
BaseFilter filter = new BaseFilter
{
PageSize = 20,
Page = 3,
SortDirection = ListSortDirection.Descending,
SortField = "Id"
};
List<FakeEntity> list = repository.GetByFilter(filter, out total);
Assert.IsNotNull(list, "Result is null");
Assert.AreEqual(60, list[0].Id, "First item id is wrong");
Assert.AreEqual(3, filter.Page, "Page incorrect");
Assert.AreEqual(20, filter.PageSize, "PageSize incorrect");
}
开发者ID:MikhailApsalikov,项目名称:Selp,代码行数:17,代码来源:GettersTests.cs
示例12: GetByFilterShouldHaveCorrectOffsetWhenPageIsSpecified
public void GetByFilterShouldHaveCorrectOffsetWhenPageIsSpecified()
{
InitRepositoryParams(true);
int total;
BaseFilter filter = new BaseFilter
{
PageSize = 20,
Page = 2
};
List<FakeEntity> list = repository.GetByFilter(filter, out total);
Assert.IsNotNull(list, "Result is null");
Assert.AreEqual(21, list.Min(d => d.Id), "Minimal ID is wrong");
Assert.AreEqual(2, filter.Page, "Page incorrect");
Assert.AreEqual(20, filter.PageSize, "PageSize incorrect");
}
开发者ID:MikhailApsalikov,项目名称:Selp,代码行数:15,代码来源:GettersTests.cs
示例13: GetByFilterShouldHaveCorrectCountWhenPageSizeIsSpecified
public void GetByFilterShouldHaveCorrectCountWhenPageSizeIsSpecified()
{
InitRepositoryParams(true);
int total;
BaseFilter filter = new BaseFilter
{
PageSize = 20
};
List<FakeEntity> list = repository.GetByFilter(filter, out total);
Assert.IsNotNull(list, "Result is null");
Assert.AreEqual(20, list.Count, "Result count is wrong");
Assert.AreEqual(100, total, "Result total is wrong");
Assert.AreEqual(20, filter.PageSize, "PageSize incorrect");
}
开发者ID:MikhailApsalikov,项目名称:Selp,代码行数:15,代码来源:GettersTests.cs
示例14: GetRecord
/// <summary>
/// This is a shared function that can be used to get a ReportEstimateRecord record using a where clause.
/// </summary>
public static ReportEstimateRecord GetRecord(BaseFilter join, string where)
{
OrderBy orderBy = null;
return GetRecord(join, where, orderBy);
}
开发者ID:ciswebb,项目名称:FPC-Estimate-App,代码行数:8,代码来源:BaseReportEstimateTable.cs
示例15: GetRecords
public static EstimateRecord[] GetRecords(
BaseFilter join,
WhereClause where,
OrderBy orderBy,
int pageIndex,
int pageSize)
{
ArrayList recList = EstimateTable.Instance.GetRecordList(join, where.GetFilter(), null, orderBy, pageIndex, pageSize);
return (EstimateRecord[])recList.ToArray(Type.GetType("FPCEstimate.Business.EstimateRecord"));
}
开发者ID:ciswebb,项目名称:FPC-Estimate-App,代码行数:11,代码来源:BaseEstimateTable.cs
示例16: DumpInputPin
public DumpInputPin(string _name, BaseFilter _filter)
:base(_name,_filter)
{
}
开发者ID:hoeness2,项目名称:mcebuddy2,代码行数:4,代码来源:DumpFilter.cs
示例17: GetByFilterShouldUseFirstPageIfItIsIncorrect
public void GetByFilterShouldUseFirstPageIfItIsIncorrect()
{
InitRepositoryParams(true);
int total;
var filter = new BaseFilter
{
Page = -5,
PageSize = 20
};
List<FakeEntity> list = repository.GetByFilter(filter, out total);
Assert.IsNotNull(list, "Result is null");
Assert.AreEqual(1, list.Min(d => d.Id), "Minimal ID is incorrect");
Assert.AreEqual(1, filter.Page, "Filter hasn't been normalized");
Assert.AreEqual(20, filter.PageSize, "Returned PageSize incorrect");
}
开发者ID:MikhailApsalikov,项目名称:Selp,代码行数:15,代码来源:GettersTests.cs
示例18: GetByFilterShouldFilterEntitiesByName
public void GetByFilterShouldFilterEntitiesByName()
{
InitRepositoryParams(false);
int total;
var filter = new BaseFilter
{
Search = "Entity 10"
};
List<FakeEntity> list = repository.GetByFilter(filter, out total);
Assert.IsNotNull(list, "Result is null");
Assert.AreEqual(11, total, "Count is incorrect");
}
开发者ID:MikhailApsalikov,项目名称:Selp,代码行数:12,代码来源:GettersTests.cs
示例19: GetByFilterShouldFilterEntitiesByNameNotIncludedDeleted
public void GetByFilterShouldFilterEntitiesByNameNotIncludedDeleted()
{
InitRepositoryParams(true);
int total;
var filter = new BaseFilter
{
Search = "125"
};
List<FakeEntity> list = repository.GetByFilter(filter, out total);
Assert.IsNotNull(list, "Result is null");
Assert.AreEqual(0, total, "Count is incorrect");
}
开发者ID:MikhailApsalikov,项目名称:Selp,代码行数:12,代码来源:GettersTests.cs
示例20: DataForExport
public DataForExport(BaseTable tbl, WhereClause wc, OrderBy orderBy, BaseColumn[] columns, BaseFilter join)
{
this.DBTable = tbl;
this.SelectWhereClause = wc;
this.SelectOrderBy = orderBy;
this.SelectJoin = join;
if (columns != null)
ColumnList.AddRange(columns);
}
开发者ID:ciswebb,项目名称:FPC-Estimate-App,代码行数:9,代码来源:ExportData.cs
注:本文中的BaseFilter类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论