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


C# WhereSqlClauseBuilder.AppendCondition方法代码示例

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


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

示例1: OnBuildQueryCondition

		protected override void OnBuildQueryCondition(QueryCondition qc)
		{
			base.OnBuildQueryCondition(qc);
			qc.SelectFields = "*";
			qc.FromClause = TimePointContext.Current.UseCurrentTime ? "SC.AUAdminScopeItemSnapshot_Current" : "SC.AUAdminScopeItemSnapshot";

			if (string.IsNullOrEmpty(qc.OrderByClause))
				qc.OrderByClause = "AUScopeItemName ASC";

			WhereSqlClauseBuilder builder = new WhereSqlClauseBuilder();
			builder.AppendCondition("SchemaType", this.scopeType).NormalFor("Status");
			var timeBuilder = VersionStrategyQuerySqlBuilder.Instance.TimePointToBuilder();

			var allCondition = new ConnectiveSqlClauseCollection(builder, timeBuilder).ToSqlString(TSqlBuilder.Instance);

			if (string.IsNullOrEmpty(qc.WhereClause))
			{
				qc.WhereClause = allCondition;
			}
			else
			{
				qc.WhereClause = qc.WhereClause + "AND (" + allCondition + ")";
			}

		}
开发者ID:jerryshi2007,项目名称:AK47Source,代码行数:25,代码来源:AdminScopeItemDataSource.cs

示例2: OnBuildQueryCondition

		protected override void OnBuildQueryCondition(QueryCondition qc)
		{
			base.OnBuildQueryCondition(qc);
			qc.SelectFields = "S.*";
			qc.FromClause = this.FromSqlClause;
			if (string.IsNullOrEmpty(qc.OrderByClause))
				qc.OrderByClause = "S.Name ASC";

			var timeCondition = VersionStrategyQuerySqlBuilder.Instance.TimePointToBuilder("S.");
			var timeCondition2 = VersionStrategyQuerySqlBuilder.Instance.TimePointToBuilder("R.");
			WhereSqlClauseBuilder where = new WhereSqlClauseBuilder().NormalFor("S.Status").NormalFor("R.Status");
			var allConditions = new ConnectiveSqlClauseCollection(timeCondition, timeCondition2, where);
			where.AppendCondition("S.AUSchemaID", this.schemaID);
			where.AppendCondition("R.ParentID", this.parentID);
			if (string.IsNullOrEmpty(qc.WhereClause) == false)
				qc.WhereClause += " AND ";

			qc.WhereClause += allConditions.ToSqlString(TSqlBuilder.Instance);
		}
开发者ID:jerryshi2007,项目名称:AK47Source,代码行数:19,代码来源:AdminUnitDataSource.cs

示例3: BuildCondition

		private void BuildCondition(QueryCondition qc)
		{
			WhereSqlClauseBuilder builder = new WhereSqlClauseBuilder();
			if (this.deepOption == 1)
			{
				builder.AppendCondition("C.ContainerID", this.scope.ID);
			}
			else
			{
				if (deepOption == 2)
				{
					builder.AppendItem("C.ContainerID", this.scope.ID, "<>");
				}
			}
			builder.NormalFor("C.Status").NormalFor("S.Status").NormalFor("SM.Status").NormalFor("AUS.Status");
			var timeBulder1 = VersionStrategyQuerySqlBuilder.Instance.TimePointToBuilder("C.");
			var timeBulder2 = VersionStrategyQuerySqlBuilder.Instance.TimePointToBuilder("S.");
			var time3 = VersionStrategyQuerySqlBuilder.Instance.TimePointToBuilder("AUS.");
			var time4 = VersionStrategyQuerySqlBuilder.Instance.TimePointToBuilder("SM.");

			var conditionClause = new ConnectiveSqlClauseCollection(builder, timeBulder1, timeBulder2, time3, time4).ToSqlString(TSqlBuilder.Instance);

			if (string.IsNullOrEmpty(qc.WhereClause) == false)
				qc.WhereClause += " AND (" + conditionClause + ")";
			else
				qc.WhereClause = conditionClause;
		}
开发者ID:jerryshi2007,项目名称:AK47Source,代码行数:27,代码来源:AUAdminScopeFullMemberDataSource.cs

示例4: BuildWhere

		protected virtual void BuildWhere(WhereSqlClauseBuilder where)
		{
			where.AppendCondition("S.Status", (int)SchemaObjectStatus.Normal);
			where.AppendCondition("M.Status", (int)SchemaObjectStatus.Normal);
		}
开发者ID:jerryshi2007,项目名称:AK47Source,代码行数:5,代码来源:AUMemberViewDataSourceBase.cs


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