Esempio n. 1
0
 public void AddAndCondition(DmlfConditionBase cond)
 {
     if (cond == null)
     {
         return;
     }
     if (Where == null)
     {
         Where = new DmlfWhere();
     }
     if (Where.Condition != null)
     {
         if (Where.Condition is DmlfAndCondition)
         {
             ((DmlfAndCondition)Where.Condition).Conditions.Add(cond);
         }
         else
         {
             var and = new DmlfAndCondition();
             and.Conditions.Add(Where.Condition);
             and.Conditions.Add(cond);
             Where.Condition = and;
         }
     }
     else
     {
         Where.Condition = cond;
     }
 }
Esempio n. 2
0
 public void AddAndCondition(DmlfConditionBase cond)
 {
     if (cond == null) return;
     if (Where == null) Where = new DmlfWhere();
     if (Where.Condition != null)
     {
         if (Where.Condition is DmlfAndCondition)
         {
             ((DmlfAndCondition)Where.Condition).Conditions.Add(cond);
         }
         else
         {
             var and = new DmlfAndCondition();
             and.Conditions.Add(Where.Condition);
             and.Conditions.Add(cond);
             Where.Condition = and;
         }
     }
     else
     {
         Where.Condition = cond;
     }
 }