/// <summary> /// 添加SQL语句条件字段 Like 条件 /// </summary> /// <param name="FieldName">字段名称</param> /// <param name="FieldValue">字段类型</param> public void AddLikeCondition(string FieldName, string FieldValue) { if (string.IsNullOrEmpty(FieldName)) { return; } if (string.IsNullOrEmpty(FieldValue)) { return; } sCondition newCondition = new sCondition(FieldName, FieldValue, " like ", FieldType.STR, JoinSign.AND); _SqlCondition.Add(newCondition); }
/// <summary> /// 添加SQL语句条件字段 /// </summary> /// <param name="FieldName">字段名称</param> /// <param name="FieldValue">条件值</param> /// <param name="Sign">文本格式条件,如“>,=,<”</param> /// <param name="FieldType">字段类型</param> /// <param name="JoinSign">条件</param> public void AddCondition(string FieldName, string FieldValue, string Sign, FieldType FieldType, JoinSign JoinSign) { if (string.IsNullOrEmpty(FieldName)) { return; } if (string.IsNullOrEmpty(FieldValue)) { return; } if (string.IsNullOrEmpty(Sign)) { Sign = " = "; } sCondition newCondition = new sCondition(FieldName, FieldValue, Sign, FieldType, JoinSign); _SqlCondition.Add(newCondition); }