Пример #1
0
        public TableJoin(JoinTypes type, DataField joinField, DataField tableField)
        {
            conditions = new QueryCondition();

            Type = type;
            JoinTable = joinField.Table;
            JoinField = joinField.Name;
            Table = tableField.Table;
            TableField = tableField.Name;

            AddCondition(joinField.ToString(), tableField);
        }
Пример #2
0
        public QueryCondition AddCondition(ConditionRelations relation, DataField field, ConditionEquality equality, object value)
        {
            QueryCondition condition = new QueryCondition(field.ToString(), equality, value);

            conditions.Add(new KeyValuePair<QueryCondition, ConditionRelations>(condition, relation));

            return condition;
        }
Пример #3
0
 public QueryCondition AddCondition(DataField field, object value)
 {
     if (conditions.Count == 0)
     {
         return conditions.AddCondition(ConditionRelations.First, field.ToString(), ConditionEquality.Equal, value);
     }
     else
     {
         return conditions.AddCondition(ConditionRelations.And, field.ToString(), ConditionEquality.Equal, value);
     }
 }
Пример #4
0
 public TableSort(SortOrder order, DataField field, QueryCondition sortLast)
 {
     Order = order;
     Field = field.ToString();
     SortLast = sortLast;
 }
Пример #5
0
 public void AddField(DataField field)
 {
     this.fields.Add(field.ToString());
 }
Пример #6
0
 public QueryCondition AddCondition(ConditionRelations relation, DataField field, ConditionEquality equality, object value)
 {
     if (conditions.Count == 0)
     {
         return conditions.AddCondition(ConditionRelations.First, field.ToString(), equality, value);
     }
     else
     {
         return conditions.AddCondition(relation, field.ToString(), equality, value);
     }
 }