Beispiel #1
0
 /// <summary>
 /// Add parameters to data model
 /// </summary>
 /// <param name="dataModel"></param>
 /// <param name="columnName"></param>
 /// <param name="columnType"></param>
 /// <param name="columnValue"></param>
 /// <returns></returns>
 public void AddParameter(string columnName, Enums.ParameterType columnType, string columnValue)
 {
     if (DataModel.Parameters == null)
     {
         DataModel.Parameters = new List <Parameter>();
     }
     DataModel.Parameters.Add(new Parameter()
     {
         ColumnName  = columnName,
         ColumnType  = columnType.ToString().Remove(0, 1),
         ColumnValue = columnValue
     });
 }
Beispiel #2
0
 /// <summary>
 /// Add filter to data model
 /// </summary>
 /// <param name="dataModel"></param>
 /// <param name="columnName"></param>
 /// <param name="columnType"></param>
 /// <param name="columnValue"></param>
 /// <param name="_operator"></param>
 /// <param name="logicalOperator"></param>
 /// <returns></returns>
 public void AddFilter(string columnName, Enums.ParameterType columnType, string columnValue, Enums.CompareOperator _operator, Enums.LogicalOperator logicalOperator = Enums.LogicalOperator.none)
 {
     if (DataModel.Filters == null)
     {
         DataModel.Filters = new List <Filter>();
     }
     DataModel.Filters.Add(new Filter()
     {
         Column          = columnName,
         ValueType       = columnType.ToString().Remove(0, 1),
         Value           = columnValue,
         Operator        = _operator.ToString(),
         LogicalOperator = logicalOperator.ToString()
     });
 }