当前位置: 首页>>代码示例>>C#>>正文


C# WhereClause.GetFilter方法代码示例

本文整理汇总了C#中WhereClause.GetFilter方法的典型用法代码示例。如果您正苦于以下问题:C# WhereClause.GetFilter方法的具体用法?C# WhereClause.GetFilter怎么用?C# WhereClause.GetFilter使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在WhereClause的用法示例。


在下文中一共展示了WhereClause.GetFilter方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: 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

示例2: GetRecordCount

 public static int GetRecordCount(BaseFilter join, WhereClause where)
 {
     return (int)UsersTable.Instance.GetRecordListCount(join, where.GetFilter(), null, null);
 }
开发者ID:ciswebb,项目名称:FPC-Estimate-App,代码行数:4,代码来源:BaseUsersTable.cs

示例3: GetColumnValues

        /// <summary>
        /// Return an array of values from the database.  The values returned are DISTINCT values.
        /// For example, GetColumnValues("Employees", "City") will return a list of all Cities
        /// from the Employees table. There will be no duplicates in the list.
        /// This function adds a Where Clause.  So you can say something like "Country = 'USA'" and in this
        /// case only cities in the US will be returned.
        /// You can use the IN operator to compare the values.  You can also use the resulting array to display
        /// such as String.Join(", ", GetColumnValues("Employees", "City", "Country = 'USA'")
        /// to display: New York, Chicago, Los Angeles, San Francisco
        /// </summary>
        /// <returns>An array of values for the given field as an Object.</returns>
        public static string[] GetColumnValues(string tableName, string fieldName, string whereStr)
        {
            // Find the
            PrimaryKeyTable bt = null;
            bt = (PrimaryKeyTable)DatabaseObjects.GetTableObject(tableName);
            if (bt == null)
            {
                throw new Exception("GETCOLUMNVALUES(" + tableName + ", " + fieldName + ", " + whereStr + "): " + Resource("Err:NoRecRetrieved"));
            }

            BaseColumn col = bt.TableDefinition.ColumnList.GetByCodeName(fieldName);
            if (col == null)
            {
                throw new Exception("GETCOLUMNVALUES(" + tableName + ", " + fieldName + ", " + whereStr + "): " + Resource("Err:NoRecRetrieved"));
            }

            string[] values = null;

            try
            {
                // Always start a transaction since we do not know if the calling function did.
                SqlBuilderColumnSelection sqlCol = new SqlBuilderColumnSelection(false, true);
                sqlCol.AddColumn(col);

                WhereClause wc = new WhereClause();
                if (!(whereStr == null) && whereStr.Trim().Length > 0)
                {
                    wc.iAND(whereStr);
                }
                BaseClasses.Data.BaseFilter join = null;
                values = bt.GetColumnValues(sqlCol, join, wc.GetFilter(), null, null, BaseTable.MIN_PAGE_NUMBER, BaseTable.MAX_BATCH_SIZE);
            }
            catch
            {
            }

            // The value can be null.  In this case, return an empty array since
            // that is an acceptable value.
            if (values == null)
            {
                values = new string[0];
            }

            return values;
        }
开发者ID:ciswebb,项目名称:FPC-Estimate-App,代码行数:56,代码来源:BaseFormulaUtils.cs

示例4: Export

        public static string Export(WhereClause where)
        {
            BaseFilter whereFilter = null;
            if (where != null)
            {
            whereFilter = where.GetFilter();
            }

            return UsersTable.Instance.ExportRecordData(whereFilter);
        }
开发者ID:ciswebb,项目名称:FPC-Estimate-App,代码行数:10,代码来源:BaseUsersTable.cs

示例5: GetRecords

        public static VwPropSBondBudgetDetailRecord[] GetRecords(
		WhereClause where,
		OrderBy orderBy,
		int pageIndex,
		int pageSize,
		ref int totalRecords)
        {
            BaseClasses.Data.BaseFilter join = null;
            ArrayList recList = VwPropSBondBudgetDetailView.Instance.GetRecordList(join, where.GetFilter(), null, orderBy, pageIndex, pageSize, ref totalRecords);

            return (VwPropSBondBudgetDetailRecord[])recList.ToArray(Type.GetType("FPCEstimate.Business.VwPropSBondBudgetDetailRecord"));
        }
开发者ID:ciswebb,项目名称:FPC-Estimate-App,代码行数:12,代码来源:BaseVwPropSBondBudgetDetailView.cs

示例6: 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

示例7: GetRecords

        public static ReportRecord[] GetRecords(
		WhereClause where,
		OrderBy orderBy,
		int pageIndex,
		int pageSize,
		ref int totalRecords)
        {
            BaseClasses.Data.BaseFilter join = null;
            ArrayList recList = ReportTable.Instance.GetRecordList(join, where.GetFilter(), null, orderBy, pageIndex, pageSize, ref totalRecords);

            return (ReportRecord[])recList.ToArray(Type.GetType("FPCEstimate.Business.ReportRecord"));
        }
开发者ID:ciswebb,项目名称:FPC-Estimate-App,代码行数:12,代码来源:BaseReportTable.cs

示例8: GetCount

        public static string GetCount(
		BaseColumn col,
		WhereClause where,
		OrderBy orderBy,
		int pageIndex,
		int pageSize)
        {
            SqlBuilderColumnSelection colSel = new SqlBuilderColumnSelection(false, false);
            colSel.AddColumn(col, SqlBuilderColumnOperation.OperationType.Count);

            return EstimateTable.Instance.GetColumnStatistics(colSel, null, where.GetFilter(), null, orderBy, pageIndex, pageSize);
        }
开发者ID:ciswebb,项目名称:FPC-Estimate-App,代码行数:12,代码来源:BaseEstimateTable.cs

示例9: GetSum

        public static string GetSum(
		BaseColumn col,
		WhereClause where,
		OrderBy orderBy,
		int pageIndex,
		int pageSize)
        {
            SqlBuilderColumnSelection colSel = new SqlBuilderColumnSelection(false, false);
            colSel.AddColumn(col, SqlBuilderColumnOperation.OperationType.Sum);

            return VwPropSBondBudgetView.Instance.GetColumnStatistics(colSel, null, where.GetFilter(), null, orderBy, pageIndex, pageSize);
        }
开发者ID:ciswebb,项目名称:FPC-Estimate-App,代码行数:12,代码来源:BaseVwPropSBondBudgetView.cs

示例10: GetRecordCount

 public static int GetRecordCount(WhereClause where)
 {
     return (int)VwAreaView.Instance.GetRecordListCount(null, where.GetFilter(), null, null);
 }
开发者ID:ciswebb,项目名称:FPC-Estimate-App,代码行数:4,代码来源:BaseVwAreaView.cs

示例11: GetRecords

        public static VwPropSBondBudgetRecord[] GetRecords(
        BaseFilter join,
		WhereClause where,
		OrderBy orderBy,
		int pageIndex,
		int pageSize)
        {
            ArrayList recList = VwPropSBondBudgetView.Instance.GetRecordList(join, where.GetFilter(), null, orderBy, pageIndex, pageSize);

            return (VwPropSBondBudgetRecord[])recList.ToArray(Type.GetType("FPCEstimate.Business.VwPropSBondBudgetRecord"));
        }
开发者ID:ciswebb,项目名称:FPC-Estimate-App,代码行数:11,代码来源:BaseVwPropSBondBudgetView.cs

示例12: GetRecordCount

 public static int GetRecordCount(BaseFilter join, WhereClause where)
 {
     return (int)VwPropSBondBudgetView.Instance.GetRecordListCount(join, where.GetFilter(), null, null);
 }
开发者ID:ciswebb,项目名称:FPC-Estimate-App,代码行数:4,代码来源:BaseVwPropSBondBudgetView.cs

示例13: Export

        public static string Export(WhereClause where)
        {
            BaseFilter whereFilter = null;
            if (where != null)
            {
            whereFilter = where.GetFilter();
            }

            return VwPropSBondBudgetView.Instance.ExportRecordData(whereFilter);
        }
开发者ID:ciswebb,项目名称:FPC-Estimate-App,代码行数:10,代码来源:BaseVwPropSBondBudgetView.cs

示例14: GetSum

        public static string GetSum(
		BaseColumn col,
		BaseFilter join, 
		WhereClause where,
		OrderBy orderBy,
		int pageIndex,
		int pageSize)
        {
            SqlBuilderColumnSelection colSel = new SqlBuilderColumnSelection(false, false);
            colSel.AddColumn(col, SqlBuilderColumnOperation.OperationType.Sum);

            return UsersTable.Instance.GetColumnStatistics(colSel, join, where.GetFilter(), null, orderBy, pageIndex, pageSize);
        }
开发者ID:ciswebb,项目名称:FPC-Estimate-App,代码行数:13,代码来源:BaseUsersTable.cs

示例15: GetRecordCount

 public static int GetRecordCount(WhereClause where)
 {
     return (int)EstimateTable.Instance.GetRecordListCount(null, where.GetFilter(), null, null);
 }
开发者ID:ciswebb,项目名称:FPC-Estimate-App,代码行数:4,代码来源:BaseEstimateTable.cs


注:本文中的WhereClause.GetFilter方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。