示例#1
0
        /// <summary>
        /// 大于等于条件解析
        /// </summary>
        /// <param name="condition">需要解析的条件对象</param>
        /// <returns>返回解析后的条件字符串</returns>
        protected override string LargeEqualParse(LargeEqualCondition condition)
        {
            StringBuilder conditionStr = new StringBuilder(" ");
            string        queryColName = condition.SearchColumn.CurrentSearcher.TableName + "." + condition.SearchColumn.ColumnName;

            if (string.IsNullOrEmpty(condition.SearchColumn.ConditionString))
            {
                conditionStr.Append(queryColName);
            }
            else
            {
                conditionStr.Append(condition.SearchColumn.ConditionString.Replace(SQLPlaceholder.ColName, queryColName));
            }

            conditionStr.Append(" >= ");

            if (condition.ParamValue is SearchColumn)
            {
                SearchColumn tmpColumn    = (SearchColumn)condition.ParamValue;
                string       valueColName = tmpColumn.CurrentSearcher.TableName + "." + tmpColumn.ColumnName;
                conditionStr.Append(valueColName);
            }
            else
            {
                string paramName = "P" + Guid.NewGuid().ToString().ToLower().Replace("-", "");
                conditionStr.Append("@" + paramName);
                ParamCollection.Add(new MySqlParameter(paramName, condition.ParamValue));
            }

            conditionStr.Append(" ");

            return(conditionStr.ToString());
        }
示例#2
0
        /// <summary>
        /// 大于等于条件解析
        /// </summary>
        /// <param name="condition">需要解析的条件对象</param>
        /// <returns>返回解析后的条件字符串</returns>
        protected override string LargeEqualParse(LargeEqualCondition condition)
        {
            StringBuilder conditionStr = new StringBuilder(" ");
            string queryColName = condition.SearchColumn.CurrentSearcher.TableName + "." + condition.SearchColumn.ColumnName;

            if (string.IsNullOrEmpty(condition.SearchColumn.ConditionString))
            {
                conditionStr.Append(queryColName);
            }
            else
            {
                conditionStr.Append(condition.SearchColumn.ConditionString.Replace(SQLPlaceholder.ColName, queryColName));
            }

            conditionStr.Append(" >= ");

            if (condition.ParamValue is SearchColumn)
            {
                SearchColumn tmpColumn = (SearchColumn)condition.ParamValue;
                string valueColName = tmpColumn.CurrentSearcher.TableName + "." + tmpColumn.ColumnName;
                conditionStr.Append(valueColName);
            }
            else
            {
                string paramName = "P" + Guid.NewGuid().ToString().ToLower().Replace("-", "");
                conditionStr.Append(":" + paramName);
                ParamCollection.Add(new DBParam(paramName, condition.ParamValue));
            }

            conditionStr.Append(" ");

            return conditionStr.ToString();
        }
示例#3
0
 /// <summary>
 /// 大于等于条件
 /// </summary>
 /// <param name="relation">条件关系</param>
 /// <param name="column">查询字段对象</param>
 /// <param name="paramVal">比较的值</param>
 /// <returns>返回大于等于条件对象</returns>
 public static LargeEqualCondition LargeEqual(ConditionRelation relation, SearchColumn column, object paramVal)
 {
     LargeEqualCondition cond = new LargeEqualCondition(relation, column, paramVal);
     return cond;
 }
示例#4
0
 /// <summary>
 /// 大于等于条件
 /// </summary>
 /// <param name="paramVal">比较的值</param>
 /// <returns>返回大于等于条件对象</returns>
 public static LargeEqualCondition LargeEqual(object paramVal)
 {
     LargeEqualCondition cond = new LargeEqualCondition(paramVal);
     return cond;
 }
示例#5
0
        /// <summary>
        /// 大于等于条件
        /// </summary>
        /// <param name="relation">条件关系</param>
        /// <param name="column">查询字段对象</param>
        /// <param name="paramVal">比较的值</param>
        /// <returns>返回大于等于条件对象</returns>
        public static LargeEqualCondition LargeEqual(ConditionRelation relation, SearchColumn column, object paramVal)
        {
            LargeEqualCondition cond = new LargeEqualCondition(relation, column, paramVal);

            return(cond);
        }
示例#6
0
        /// <summary>
        /// 大于等于条件
        /// </summary>
        /// <param name="paramVal">比较的值</param>
        /// <returns>返回大于等于条件对象</returns>
        public static LargeEqualCondition LargeEqual(object paramVal)
        {
            LargeEqualCondition cond = new LargeEqualCondition(paramVal);

            return(cond);
        }