Exemplo n.º 1
0
 public SqlWhere AddWhereParameter(SqlWhereAndorOptions.SqlWhereAndor andor, SqlField field, object fieldValue1, object fieldValue2, SqlWhereComparison.SqlComparer comparator)
 {
     SqlWhere newwhere = new SqlWhere(ref Tables, ref Fields);
     newwhere.Andor = SqlWhereAndorOptions.GetSqlwhereandor(andor);
     newwhere.Field = field;
     newwhere.Value1 = fieldValue1;
     newwhere.Value2 = fieldValue2;
     newwhere.Comparator = SqlWhereComparison.GetSqlComparor(comparator);
     InnerWheres.Add(newwhere);
     return newwhere;
 }
Exemplo n.º 2
0
        public SqlWhere AddWhereParameter(SqlWhereAndorOptions.SqlWhereAndor andor, string tableName, string fieldName, object fieldValue, object fieldValue2, SqlWhereComparison.SqlComparer comparator)
        {
            foreach (SqlField field in Fields)
            {
                if (field.Name == fieldName.ToUpper() && field.Table.Name == tableName.ToUpper())
                {
                    return AddWhereParameter(andor, field, fieldValue, fieldValue2, comparator);
                }
            }

            foreach (SqlTable table in Tables)
            {
                if (table.Name == tableName.ToUpper())
                {
                    SqlField newfield = new SqlField(fieldName.ToUpper(), null, null, table, false, false);
                    return AddWhereParameter(andor, newfield, fieldValue, fieldValue2, comparator);
                }
            }

            return null;
        }
Exemplo n.º 3
0
 public SqlWhere AddWhereParameter(SqlWhereAndorOptions.SqlWhereAndor andOR, SqlField field, object fieldValue, SqlWhereComparison.SqlComparer comparator)
 {
     return(AddWhereParameter(andOR, field, fieldValue, null, comparator));
 }
Exemplo n.º 4
0
 public SqlWhere AddWhereParameter(SqlWhereAndorOptions.SqlWhereAndor andor, SqlField field, object fieldValue, SqlWhereComparison.SqlComparer comparator)
 {
     return AddWhereParameter(andor, field, fieldValue, null, comparator);
 }
Exemplo n.º 5
0
 public SqlOrder(SqlField field, string direction, int index = -1)
 {
     this.Field     = field;
     this.Direction = direction;
     this.Index     = index;
 }