Ejemplo n.º 1
0
 /// <summary>
 /// 构造组装对象
 /// </summary>
 /// <param name="fieldName">列名称</param>
 /// <param name="parameterName">参数名称</param>
 /// <param name="parameterValue">参数值</param>
 /// <param name="joinSign">操作符</param>
 /// <param name="operateSign">连接符</param>
 public SqlWhereCondition(string fieldName, object fieldValue, JoinSign joinSign, OperateSign operateSign)
 {
     this.fieldName   = fieldName;
     this.fieldValue  = fieldValue;
     this.operateSign = operateSign;
     this.joinSign    = joinSign;
 }
Ejemplo n.º 2
0
 /// <summary>
 /// 组装条件对象
 /// </summary>
 /// <param name="fieldName">列名称</param>
 /// <param name="fieldValue">列值</param>
 /// <param name="joinSign">操作符 如果为空 Add</param>
 /// <param name="operateSign">连接符 如果为空 Equal</param>
 public void AddSqlWhere(string fieldName, object fieldValue, OperateSign operateSign)
 {
     AddSqlWhere(fieldName, fieldValue, JoinSign.None, operateSign);
 }
Ejemplo n.º 3
0
        /// <summary>
        /// 组装条件对象
        /// </summary>
        /// <param name="fieldName">列名称</param>
        /// <param name="fieldValue">列值</param>
        /// <param name="joinSign">操作符 如果为空 Add</param>
        /// <param name="operateSign">连接符 如果为空 Equal</param>
        public void AddSqlWhere(string fieldName, object fieldValue, JoinSign joinSign, OperateSign operateSign)
        {
            if (fieldName.Trim().Length == 0)
            {
                throw new ArgumentNullException("列名称不能为空!");
            }

            wList.Add(new SqlWhereCondition(fieldName, fieldValue, joinSign, operateSign));
        }