當前位置: 首頁>>代碼示例>>C#>>正文


C# BaseFilter類代碼示例

本文整理匯總了C#中BaseFilter的典型用法代碼示例。如果您正苦於以下問題:C# BaseFilter類的具體用法?C# BaseFilter怎麽用?C# BaseFilter使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


BaseFilter類屬於命名空間,在下文中一共展示了BaseFilter類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的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


注:本文中的BaseFilter類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。