Beispiel #1
0
        public DataSet ExecuteQuerySearchSchema(string connectionString, IList <FilterCriteria> filter, DataSetSchema schema, int currentPage,
                                                int pageSize, string orderByColumn, string orderDirection)
        {
            var query = BuildSqlQuery(filter, schema, orderByColumn, orderDirection, currentPage, pageSize);

            return(SqlExtensions.ExecuteQuery(connectionString, query.Sql, query.Params));
        }
Beispiel #2
0
        public DataSet ExecuteQueryDatasetDetailId(string connectionString, DataSetSchemaDefinition dataSetSchemaDefinition, int datasetdetailId)
        {
            var sql = String.Format("SELECT {0} FROM {1} WHERE DatasetDetailId = @datasetDetailId",
                                    dataSetSchemaDefinition.ColumnSelectList,
                                    dataSetSchemaDefinition.TableName);
            var parameters = new List <SqlParameter>
            {
                new SqlParameter
                {
                    ParameterName = "@datasetDetailId",
                    SqlDbType     = SqlDbType.Int,
                    Direction     = ParameterDirection.Input,
                    Value         = datasetdetailId
                }
            };

            var data = SqlExtensions.ExecuteQuery(connectionString, sql, parameters.ToArray());

            return(data);
        }
Beispiel #3
0
        public DataSet ExecuteQueryVisualiseSchema(VisualSchemaCriteria criteria)
        {
            var queryExecute = BuildVisualiseSqlQuery(criteria.Filters, criteria.Schema, criteria.ChartType, criteria.XAxisColumn, criteria.XAxisType, criteria.XAxisDateFormat, criteria.YAxisColumn, criteria.YAxisAggregate, criteria.PageNum, criteria.PageSize);

            return(SqlExtensions.ExecuteQuery(criteria.DbConnectionString, queryExecute.Sql, queryExecute.Params));
        }
Beispiel #4
0
        public DataSet ExecuteQueryVisualiseSchemaMap(string connectionString, IEnumerable <FilterCriteria> filters, DataSetSchema schema)
        {
            var queryExecute = BuildVisualiseMapSqlQuery(filters, schema);

            return(SqlExtensions.ExecuteQuery(connectionString, queryExecute.Sql, queryExecute.Params));
        }
Beispiel #5
0
 public DataSet ExecuteQuery(string connectionString, string sql, Array parameters)
 {
     return(SqlExtensions.ExecuteQuery(connectionString, sql, parameters));
 }