This repository was archived by the owner on Mar 24, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +6
-15
lines changed
Expand file tree Collapse file tree 1 file changed +6
-15
lines changed Original file line number Diff line number Diff line change @@ -113,13 +113,10 @@ AND DateTime between @startDate and @endDate
113113 SqlDataAdapter da = new SqlDataAdapter ( sqlCmd ) ;
114114 da . Fill ( dataTable ) ;
115115
116- string jsonString = string . Empty ;
117- jsonString = JsonConvert . SerializeObject ( dataTable , Formatting . Indented ) ;
118-
119- // Close connections and reurn data
116+ // Close connections and reurn dataTable
120117 da . Dispose ( ) ;
121118 DWConnection . Close ( ) ;
122- return Ok ( jsonString ) ;
119+ return Ok ( dataTable ) ;
123120 }
124121
125122 catch ( Exception Ex )
@@ -212,13 +209,10 @@ AND DateTime between @startDate and @endDate
212209 SqlDataAdapter da = new SqlDataAdapter ( sqlCmd ) ;
213210 da . Fill ( dataTable ) ;
214211
215- string jsonString = string . Empty ;
216- jsonString = JsonConvert . SerializeObject ( dataTable , Formatting . Indented ) ;
217-
218- // Close connections and reurn data
212+ // Close connections and reurn dataTable
219213 da . Dispose ( ) ;
220214 DWConnection . Close ( ) ;
221- return Ok ( jsonString ) ;
215+ return Ok ( dataTable ) ;
222216 }
223217
224218 catch ( Exception Ex )
@@ -315,13 +309,10 @@ AND DateTime between @startDate and @endDate
315309 SqlDataAdapter da = new SqlDataAdapter ( sqlCmd ) ;
316310 da . Fill ( dataTable ) ;
317311
318- string jsonString = string . Empty ;
319- jsonString = JsonConvert . SerializeObject ( dataTable , Formatting . Indented ) ;
320-
321- // Close connections and reurn data
312+ // Close connections and reurn dataTable
322313 da . Dispose ( ) ;
323314 DWConnection . Close ( ) ;
324- return Ok ( jsonString ) ;
315+ return Ok ( dataTable ) ;
325316 }
326317
327318 catch ( Exception Ex )
You can’t perform that action at this time.
0 commit comments