• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# WhereSqlClauseBuilder类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中WhereSqlClauseBuilder的典型用法代码示例。如果您正苦于以下问题:C# WhereSqlClauseBuilder类的具体用法?C# WhereSqlClauseBuilder怎么用?C# WhereSqlClauseBuilder使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



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

示例1: QueryParents

		public static IEnumerable<SCSimpleObject> QueryParents(string unitID, bool includingSelf, DateTime timePoint)
		{
			if (string.IsNullOrEmpty(unitID) == false)
			{
				string timeString = timePoint == DateTime.MinValue ? TSqlBuilder.Instance.DBCurrentTimeFunction : TSqlBuilder.Instance.FormatDateTime(timePoint);

				WhereSqlClauseBuilder where = new WhereSqlClauseBuilder().AppendCondition("ID", unitID);

				string sql = string.Format(sqlTemplate, timeString, where.ToSqlString(TSqlBuilder.Instance));

				DataTable table = DbHelper.RunSqlReturnDS(sql, ConnectionName).Tables[0];
				DataView view = new DataView(table);
				view.Sort = "ID";

				SCSimpleObjectCollection tempParents = new SCSimpleObjectCollection();

				FillAllParents(unitID, view, includingSelf, tempParents);

				tempParents.Reverse();

				return tempParents;
			}
			else
			{
				return emptyResult;
			}
		}
开发者ID:jerryshi2007,项目名称:AK47Source,代码行数:27,代码来源:AURecursiveDataSource.cs


示例2: SchemaStrict

 private static ConnectiveSqlClauseCollection SchemaStrict(ConnectiveSqlClauseCollection c, string prefix, PC.StandardObjectSchemaType schema)
 {
     WhereSqlClauseBuilder where = new WhereSqlClauseBuilder();
     where.AppendItem(prefix + "SchemaType", schema);
     c.Add(where);
     return c;
 }
开发者ID:jerryshi2007,项目名称:AK47Source,代码行数:7,代码来源:OguObjectGenerator1.cs


示例3: Query

		public DataView Query(int startRowIndex, int maximumRows, string appName, string programName, WfApplicationAuthType authType, string where, string orderBy, ref int totalCount)
		{
			WhereSqlClauseBuilder builder = new WhereSqlClauseBuilder();

			if (string.IsNullOrEmpty(appName) == false)
			{
				builder.AppendItem("APPLICATION_NAME", appName);

				if (string.IsNullOrEmpty(programName) == false)
				{
					builder.AppendItem("PROGRAM_NAME", programName);
				}
			}

			if (authType != WfApplicationAuthType.None)
			{
				builder.AppendItem("AUTH_TYPE", authType.ToString());
			}

			string sql = builder.ToSqlString(TSqlBuilder.Instance);

			if (string.IsNullOrEmpty(where) == false)
			{
				sql = (string.IsNullOrEmpty(sql) ? where : sql + " AND (" + where + ")");
			}

			return base.Query(startRowIndex, maximumRows, sql, orderBy, ref totalCount);
		}
开发者ID:jerryshi2007,项目名称:AK47Source,代码行数:28,代码来源:CagetoryDataSource.cs


示例4: BindDataGrid

		private void BindDataGrid()
		{
			WhereSqlClauseBuilder builder = ConditionMapping.GetWhereSqlClauseBuilder(this.UserUploadCondition);

			if (this.processUsers.ReadOnly)
			{
				this.ObjectDataSourceUploadLogs.Condition = builder;
			}
			else
			{
				ConnectiveSqlClauseCollection collection = new ConnectiveSqlClauseCollection(LogicOperatorDefine.And);
				collection.Add(builder);

				WhereSqlClauseBuilder userwherebuilder = new WhereSqlClauseBuilder();
				userwherebuilder.LogicOperator = LogicOperatorDefine.Or;
				foreach (var item in this.processUsers.SelectedOuUserData)
				{
					userwherebuilder.AppendItem("OPERATOR_ID", item.ID);
				}
				collection.Add(userwherebuilder);

				this.ObjectDataSourceUploadLogs.Condition = collection.ToSqlString(TSqlBuilder.Instance);
			}
			this.ObjectDataSourceUploadLogs.LastQueryRowCount = -1;

			this.DeluxeGridUploadLog.PageIndex = 0;
			this.DeluxeGridUploadLog.SelectedKeys.Clear();
			this.DeluxeGridUploadLog.DataBind();
		}
开发者ID:jerryshi2007,项目名称:AK47Source,代码行数:29,代码来源:UserUploadFileHistory.aspx.cs


示例5: OnBuildQueryCondition

		protected override void OnBuildQueryCondition(QueryCondition qc)
		{
			qc.FromClause = "SC.OperationLog";
			qc.SelectFields = "*";
			if (string.IsNullOrEmpty(qc.OrderByClause))
				qc.OrderByClause = "CreateTime DESC";

			WhereSqlClauseBuilder builder = new WhereSqlClauseBuilder();

			if (this.catelog.IsNotEmpty())
			{
				builder.AppendItem("SchemaType", this.catelog);
			}

			if (this.operationType.IsNotEmpty())
			{
				builder.AppendItem("OperationType", operationType);
			}

			if (builder.IsEmpty == false && qc.WhereClause.IsNotEmpty())
			{
				qc.WhereClause += " AND ";
			}

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


示例6: LoadCurrentUsers

		public SchemaObjectCollection LoadCurrentUsers(string ownerID)
		{
			ownerID.CheckStringIsNullOrEmpty("ownerID");

			var timePointBuilder = VersionStrategyQuerySqlBuilder.Instance.TimePointToBuilder(DateTime.MinValue);

			WhereSqlClauseBuilder whereBuilder = new WhereSqlClauseBuilder();

			whereBuilder.AppendItem("C.OwnerID", ownerID);

			timePointBuilder.Add(whereBuilder);

			string sql = string.Format(
				"SELECT SC.* FROM {0} SC INNER JOIN SC.ConditionCalculateResult C ON SC.ID = C.UserID WHERE {1}",
				ORMapping.GetMappingInfo(typeof(SchemaObjectBase)).TableName, timePointBuilder.ToSqlString(TSqlBuilder.Instance));

			SchemaObjectCollection result = new SchemaObjectCollection();

			using (DbContext context = DbContext.GetContext(this.GetConnectionName()))
			{
				result.LoadFromDataView(DbHelper.RunSqlReturnDS(sql, this.GetConnectionName()).Tables[0].DefaultView);
			}

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


示例7: GetConditionHistoryEntries

		/// <summary>
		/// 获取与指定对象关联的条件历史
		/// </summary>
		/// <param name="id">对象ID</param>
		/// <param name="type">类型,如果为<see langword="null"/>则不限。</param>
		/// <returns></returns>
		public IEnumerable<SCCondition> GetConditionHistoryEntries(string id, string type)
		{
			SCConditionCollection entries = new SCConditionCollection();
			using (var context = DbHelper.GetDBContext(this.GetConnectionName()))
			{
				Database db = DatabaseFactory.Create(context);

				WhereSqlClauseBuilder builder = new WhereSqlClauseBuilder();
				builder.AppendItem("OwnerID", id);

				if (type != null)
				{
					builder.AppendItem("Type", type);
				}

				var sql = @"SELECT *  FROM [SC].[Conditions] WHERE " + builder.ToSqlString(TSqlBuilder.Instance) + " ORDER BY [VersionEndTime] DESC, SortID ASC";
				var cmd = db.GetSqlStringCommand(sql);
				using (var dr = db.ExecuteReader(cmd))
				{
					ORMapping.DataReaderToCollection(entries, dr);
				}

				return entries;
			}
		}
开发者ID:jerryshi2007,项目名称:AK47Source,代码行数:31,代码来源:HistoryAdapter.cs


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


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


示例10: QueryApplications

        public SchemaObjectCollection QueryApplications(string[] schemaTypes, bool includingDeleted, DateTime timePoint)
        {
            SchemaObjectCollection result = new SchemaObjectCollection();

            ConnectiveSqlClauseCollection timeConditionC = VersionStrategyQuerySqlBuilder.Instance.TimePointToBuilder(timePoint, "SC.");

            InSqlClauseBuilder schemaBuilder = new InSqlClauseBuilder("SC.SchemaType");

            schemaBuilder.AppendItem(schemaTypes);

            WhereSqlClauseBuilder builderC = new WhereSqlClauseBuilder();

            if (includingDeleted == false)
                builderC.AppendItem("SC.Status", (int)SchemaObjectStatus.Normal);

            ConnectiveSqlClauseCollection connectiveBuilder = new ConnectiveSqlClauseCollection(schemaBuilder, builderC, timeConditionC);

            string sql = string.Format("SELECT SC.*" +
                "\nFROM SC.SchemaObject SC" +
                "\nWHERE {0}", connectiveBuilder.ToSqlString(TSqlBuilder.Instance));

            DataTable table = DbHelper.RunSqlReturnDS(sql, this.GetConnectionName()).Tables[0];

            result.LoadFromDataView(table.DefaultView);

            return result;
        }
开发者ID:jerryshi2007,项目名称:AK47Source,代码行数:27,代码来源:SCSnapshotAdapter_Permission.cs


示例11: OnBuildQueryCondition

		protected override void OnBuildQueryCondition(QueryCondition qc)
		{
			qc.FromClause = TimePointContext.Current.UseCurrentTime ? "SC.SchemaUserSnapshot_Current O INNER JOIN SC.UserAndContainerSnapshot_Current R ON O.ID = R.UserID" : "SC.SchemaUserSnapshot O INNER JOIN SC.UserAndContainerSnapshot R ON O.ID = R.UserID";
			qc.SelectFields = "O.*";
			if (string.IsNullOrEmpty(this.orderBy))
				qc.OrderByClause = "R.VersionStartTime DESC";
			else
				qc.OrderByClause = orderBy;
			base.OnBuildQueryCondition(qc);

			WhereSqlClauseBuilder builder = new WhereSqlClauseBuilder();

			var timeCondition1 = VersionStrategyQuerySqlBuilder.Instance.TimePointToBuilder("R.");
			var timeCondition2 = VersionStrategyQuerySqlBuilder.Instance.TimePointToBuilder("O.");

			builder.AppendItem("R.ContainerID", this.containerId);
			InnerBuildWhere(builder);

			builder.AppendItem("O.Status", (int)SchemaObjectStatus.Normal);
			builder.AppendItem("R.Status", (int)SchemaObjectStatus.Normal);

			var allConditions = new ConnectiveSqlClauseCollection(timeCondition1, timeCondition2, builder);

			if (string.IsNullOrEmpty(qc.WhereClause))
			{
				qc.WhereClause = allConditions.ToSqlString(TSqlBuilder.Instance);
			}
			else
			{
				qc.WhereClause = allConditions.ToSqlString(TSqlBuilder.Instance) + " AND (" + qc.WhereClause + ")";
			}
		}
开发者ID:jerryshi2007,项目名称:AK47Source,代码行数:32,代码来源:ConditionalUsersDataSource.cs


示例12: CalculatePayMonthInfo

 //计算薪资
 public Int32 CalculatePayMonthInfo(String yearMonth)
 {
     int result = 0;
     WhereSqlClauseBuilder builder = new WhereSqlClauseBuilder();
     builder.AppendItem(FeeMonthInfoDBConst.YearMonth, yearMonth);
     builder.AppendItem(FeeMonthInfoDBConst.UseFlag, Status.True.ToString("D"));
     builder.AppendItem(FeeMonthInfoDBConst.FeeType, FeeType.Parameter.ToString("D"), "<>");
     builder.AppendItem(FeeMonthInfoDBConst.FeeType, FeeType.Tax.ToString("D"), "<>");
     builder.AppendItem(String.Concat("ISNULL(",FeeMonthInfoDBConst.CalculateExp,",'')<>''"));
     List<FeeInfo> feeList = FeeInfoAdapter.Instance.GetFeeInfoList(yearMonth, builder);
     foreach (FeeMonthInfo feeMonthInfo in feeList.Where(fe => !String.IsNullOrEmpty(fe.CalculateExp)))
     {
         String caculateExp = FeeInfoAdapter.Instance.ConvertExp(yearMonth, feeMonthInfo.CalculateExp);
         //if (feeMonthInfo.FeeType.Equals(FeeType.Tax))
         //{
         //    caculateExp = "ISNULL(DBO.CACULATETAX(''" + yearMonth + "'',''" + FeeInfoAdapter.Instance.GetTaxFeeID(yearMonth, feeMonthInfo.FeeID) + "''," + FeeInfoAdapter.Instance.ConvertExp(yearMonth, FeeInfoAdapter.Instance.GetTaxFeeCalculateExp(yearMonth, feeMonthInfo.FeeID)) + "),0)";
         //}
         //else
         //{
         //    caculateExp = FeeInfoAdapter.Instance.ConvertExp(yearMonth, feeMonthInfo.CalculateExp);
         //}
         String sql = String.Format(@"DECLARE @SQL VARCHAR(8000)
                                     SELECT @SQL=ISNULL(@SQL + '],[','') + Convert(nvarchar(32),FEE_ID) FROM FEE_MONTH F WHERE (F.FEE_TYPE={5} OR F.FEE_TYPE={6}) AND ISNULL(CALCULATE_EXP,'')='' AND YEAR_MONTH={0}
                                     EXEC ('INSERT INTO PAY_MONTH(YEAR_MONTH,PERSON_ID,PERSON_NAME,FEE_ID,FEE_NAME,FEE_VALUE,PAY_MONEY,FORMULA)
                                     SELECT ''{0}'' AS ''YEAR_MONTH'', PERSON_ID, PERSON_NAME, ''{1}'' AS ''FEE_ID'', ''{2}'' AS ''FEE_NAME'', {3} AS ''FEE_VALUE'', {3} AS ''PAY_MONEY'',''{4}'' AS ''FORMULA''
                                     FROM (SELECT PERSON_ID, PERSON_NAME, FEE_ID,PAY_MONEY FROM PAY_MONTH WHERE YEAR_MONTH=''{0}'')P PIVOT(MAX(PAY_MONEY) FOR FEE_ID IN ([' + @SQL + ']))B') "
             , yearMonth, feeMonthInfo.FeeID, feeMonthInfo.FeeName, caculateExp, caculateExp.Replace("'", ""), FeeType.Common.ToString("D"), FeeType.Parameter.ToString("D"));
         result += _DataHelper.ExecuteSql(sql);
     }
     return result;
 }
开发者ID:notinmood,项目名称:HilandCompany,代码行数:32,代码来源:PayMonthInfoAdapter.cs


示例13: dataSourceMain_Selecting

		protected void dataSourceMain_Selecting(object sender, ObjectDataSourceSelectingEventArgs e)
		{
			WhereSqlClauseBuilder where = new WhereSqlClauseBuilder();
			where.AppendItem("TASK_GUID", Request.QueryString["id"]);

			dataSourceMain.Condition = where;
		}
开发者ID:jerryshi2007,项目名称:AK47Source,代码行数:7,代码来源:TaskPendingDetail.aspx.cs


示例14: GetReferenceHistoryEntries

		public IEnumerable<ReferenceHistoryEntry> GetReferenceHistoryEntries(string objId)
		{
			ReferenceHistoryEntryCollection list = new ReferenceHistoryEntryCollection();

			WhereSqlClauseBuilder where1 = new WhereSqlClauseBuilder();
			where1.AppendItem("R.ObjectID", objId);

			WhereSqlClauseBuilder where2 = new WhereSqlClauseBuilder();
			where2.AppendItem("R.ParentID", objId);

			var sql = string.Format(@"SELECT R.[ParentID], R.[ObjectID], R.[VersionStartTime], R.[VersionEndTime], R.[Status], R.[IsDefault], R.[InnerSort], R.[CreatorID], R.[CreatorName],O.Name, O.DisplayName
FROM [SC].[SchemaRelationObjectsSnapshot] R LEFT JOIN SC.SchemaObjectSnapshot_Current O ON R.ParentID = O.ID
WHERE O.VersionStartTime <=R.VersionStartTime AND (O.VersionEndTime IS NULL OR O.VersionEndTime>=R.VersionEndTime) AND {0}
UNION
SELECT R.[ParentID], R.[ObjectID], R.[VersionStartTime], R.[VersionEndTime], R.[Status], R.[IsDefault], R.[InnerSort], R.[CreatorID], R.[CreatorName],O.Name, O.DisplayName
FROM [SC].[SchemaRelationObjectsSnapshot] R LEFT JOIN SC.SchemaObjectSnapshot_Current O ON R.ObjectID = O.ID
WHERE O.VersionStartTime <=R.VersionStartTime AND (O.VersionEndTime IS NULL OR O.VersionEndTime>=R.VersionEndTime) AND {1} ORDER BY VersionStartTime ASC
", where1.ToSqlString(TSqlBuilder.Instance), where2.ToSqlString(TSqlBuilder.Instance));

			using (var context = DbHelper.GetDBContext(this.GetConnectionName()))
			{
				Database db = DatabaseFactory.Create(context);

				var cmd = db.GetSqlStringCommand(sql);
				using (var dr = db.ExecuteReader(cmd))
				{
					ORMapping.DataReaderToCollection(list, dr);
				}
			}

			return list;
		}
开发者ID:jerryshi2007,项目名称:AK47Source,代码行数:32,代码来源:HistoryAdapter.cs


示例15: OnBuildQueryCondition

		protected override void OnBuildQueryCondition(QueryCondition qc)
		{
			qc.FromClause = TimePointContext.Current.UseCurrentTime ? @"SC.UserAndContainerSnapshot_Current C 
INNER JOIN SC.SchemaUserSnapshot_Current U ON U.ID =C.UserID
INNER JOIN SC.SchemaRoleSnapshot_Current R ON R.ID = C.ContainerID 
INNER JOIN SC.SchemaMembersSnapshot_Current S ON S.MemberID = R.ID
INNER JOIN  SC.SchemaApplicationSnapshot_Current A ON A.ID = S.ContainerID" : @"SC.UserAndContainerSnapshot C 
INNER JOIN SC.SchemaUserSnapshot U ON U.ID =C.UserID
INNER JOIN SC.SchemaRoleSnapshot R ON R.ID = C.ContainerID 
INNER JOIN SC.SchemaMembersSnapshot S ON S.MemberID = R.ID
INNER JOIN  SC.SchemaApplicationSnapshot A ON A.ID = S.ContainerID";
			qc.SelectFields = "R.*, A.ID AS  AppID,A.DisplayName AS AppName,A.Name As AppName2,A.CodeName as AppCodeName";
			base.OnBuildQueryCondition(qc);
			WhereSqlClauseBuilder wb = new WhereSqlClauseBuilder();
			wb.AppendItem("C.UserID", this.userId);
			if (string.IsNullOrWhiteSpace(orderBy))
			{
				qc.OrderByClause = "A.DisplayName";
			}
			else
			{
				qc.OrderByClause = orderBy;
			}
			if (string.IsNullOrWhiteSpace(qc.WhereClause))
			{
				qc.WhereClause = wb.ToSqlString(TSqlBuilder.Instance);
			}
			else
			{
				qc.WhereClause = wb.ToSqlString(TSqlBuilder.Instance) + " AND (" + qc.WhereClause + ")";
			}
		}
开发者ID:jerryshi2007,项目名称:AK47Source,代码行数:32,代码来源:SchemaUserRoleDataSource.cs


示例16: Load

        /// <summary>
        /// 
        /// </summary>
        /// <param name="fillAssignees"></param>
        /// <param name="action"></param>
        /// <returns></returns>
        public WfProcessCurrentInfoCollection Load(bool fillAssignees, Action<WhereSqlClauseBuilder> action)
        {
            action.NullCheck("action");

            WfProcessCurrentInfoCollection result = new WfProcessCurrentInfoCollection();

            WhereSqlClauseBuilder whereBuilder = new WhereSqlClauseBuilder();

            action(whereBuilder);

            string fieldNames = ORMapping.GetSelectFieldsNameSql<WfProcessInstanceData>("Data");

            string sql = string.Format("SELECT {0} FROM WF.PROCESS_INSTANCES WHERE {1}",
                    fieldNames,
                    whereBuilder.ToSqlString(TSqlBuilder.Instance));

            DataTable table = DbHelper.RunSqlReturnDS(sql, GetConnectionName()).Tables[0];

            result.LoadFromDataView(table.DefaultView);

            if (fillAssignees)
                FillAssignees(result);

            return result;
        }
开发者ID:jerryshi2007,项目名称:AK47Source,代码行数:31,代码来源:WfProcessCurrentInfoAdapter.cs


示例17: DeleteDepartmentInfo

 public Int32 DeleteDepartmentInfo(String deptID)
 {
     WhereSqlClauseBuilder builder = new WhereSqlClauseBuilder();
     builder.AppendItem(DepartmentInfoDBConst.DepartmentID, deptID);
     String sql = String.Format("DELETE FROM {0} WHERE {1} ", DepartmentInfoDBConst.TableName, builder.ToSqlString());
     int result = _DataHelper.ExecuteSql(sql);
     return result;
 }
开发者ID:notinmood,项目名称:HilandCompany,代码行数:8,代码来源:DepartmentInfoAdapter.cs


示例18: DeleteUserInfo

 public Int32 DeleteUserInfo(String userId)
 {
     WhereSqlClauseBuilder builder = new WhereSqlClauseBuilder();
     builder.AppendItem(UserInfoDBConst.UserId, userId);
     String sql = String.Format("DELETE FROM {0} WHERE {1} ", UserInfoDBConst.TableName, builder.ToSqlString());
     int result = _DataHelper.ExecuteSql(sql);
     return result;
 }
开发者ID:notinmood,项目名称:HilandCompany,代码行数:8,代码来源:UserInfoAdapter.cs


示例19: ChangeDimission

 public Int32 ChangeDimission(String personID, bool dimission)
 {
     WhereSqlClauseBuilder builder = new WhereSqlClauseBuilder();
     builder.AppendItem(PersonInfoDBConst.PersonID, personID);
     String sql = String.Format("UPDATE {0} SET DIMISSION={1} WHERE {2} ", PersonInfoDBConst.TableName, dimission ? 1 : 0, builder.ToSqlString());
     int result = _DataHelper.ExecuteSql(sql);
     return result;
 }
开发者ID:notinmood,项目名称:HilandCompany,代码行数:8,代码来源:PersonInfoAdapter.cs


示例20: ChangeStatus

 public Int32 ChangeStatus(String userId, Int32 status)
 {
     WhereSqlClauseBuilder builder = new WhereSqlClauseBuilder();
     builder.AppendItem(UserInfoDBConst.UserId, userId);
     String sql = String.Format("UPDATE {0} SET LOGOUT={1} WHERE {2} ", UserInfoDBConst.TableName, status, builder.ToSqlString());
     int result = _DataHelper.ExecuteSql(sql);
     return result;
 }
开发者ID:notinmood,项目名称:HilandCompany,代码行数:8,代码来源:UserInfoAdapter.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# WhileStatement类代码示例发布时间:2022-05-24
下一篇:
C# WhereCondition类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap