Beispiel #1
0
        public async Task <DataTable> GetDataTable(string select, string query, string dataType)
        {
            DataTable dt = await csv.GetCSVTable(connection, target, dataType);

            if (!string.IsNullOrEmpty(query))
            {
                string condition = query.Replace("where", "");
                condition = condition.Trim();
                if (dt.Rows.Count > 0)
                {
                    dt = dt.Select(condition).CopyToDataTable();
                }
            }

            return(dt);
        }