aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormarcinzelent <zelent.marcin@gmail.com>2017-11-27 13:47:12 +0100
committermarcinzelent <zelent.marcin@gmail.com>2017-11-27 13:47:12 +0100
commitd93cd5af6b53c1d66f0633506bad5d7e83d64710 (patch)
tree02197b39c682d3854862c2ae5a4262dd5cfb739f
parent3c203d43f67212570318a4fea4bc68fac13c581f (diff)
Changed reading types to decimal.
-rw-r--r--AirPollutionWebApi.userprefs5
-rw-r--r--AirPollutionWebApi/Models/Reading.cs6
-rw-r--r--AirPollutionWebApi/SqlOperator.cs6
3 files changed, 9 insertions, 8 deletions
diff --git a/AirPollutionWebApi.userprefs b/AirPollutionWebApi.userprefs
index 9167a78..3ac0c78 100644
--- a/AirPollutionWebApi.userprefs
+++ b/AirPollutionWebApi.userprefs
@@ -1,10 +1,11 @@
<Properties StartupConfiguration="{22C32F4C-0DEB-40EA-9D56-48942CBB2A07}|">
<MonoDevelop.Ide.ItemProperties.AirPollutionWebApi PreferredExecutionTarget="MonoDevelop.Default" />
- <MonoDevelop.Ide.Workbench ActiveDocument="AirPollutionWebApi/Controllers/ReadingsController.cs">
+ <MonoDevelop.Ide.Workbench ActiveDocument="AirPollutionWebApi/Models/Reading.cs">
<Files>
- <File FileName="AirPollutionWebApi/Controllers/ReadingsController.cs" Line="43" Column="66" />
+ <File FileName="AirPollutionWebApi/Controllers/ReadingsController.cs" Line="41" Column="41" />
<File FileName="AirPollutionWebApi/SqlOperator.cs" Line="21" Column="64" />
<File FileName="AirPollutionWebApi/Controllers/HomeController.cs" Line="1" Column="1" />
+ <File FileName="AirPollutionWebApi/Models/Reading.cs" Line="7" Column="16" />
</Files>
</MonoDevelop.Ide.Workbench>
<MonoDevelop.Ide.Workspace ActiveConfiguration="Debug" />
diff --git a/AirPollutionWebApi/Models/Reading.cs b/AirPollutionWebApi/Models/Reading.cs
index 07f4599..f211407 100644
--- a/AirPollutionWebApi/Models/Reading.cs
+++ b/AirPollutionWebApi/Models/Reading.cs
@@ -4,8 +4,8 @@
{
public int Id { get; set; }
public int TimeStamp { get; set; }
- public int Co { get; set; }
- public int No { get; set; }
- public int So { get; set; }
+ public decimal Co { get; set; }
+ public decimal No { get; set; }
+ public decimal So { get; set; }
}
}
diff --git a/AirPollutionWebApi/SqlOperator.cs b/AirPollutionWebApi/SqlOperator.cs
index bde60f8..40e7d6f 100644
--- a/AirPollutionWebApi/SqlOperator.cs
+++ b/AirPollutionWebApi/SqlOperator.cs
@@ -33,9 +33,9 @@ namespace AirPollutionWebApi.Singletons
{
Id = reader.GetInt32(0),
TimeStamp = reader.GetInt32(1),
- Co = reader.GetInt32(2),
- No = reader.GetInt32(3),
- So = reader.GetInt32(4)
+ Co = reader.GetDecimal(2),
+ No = reader.GetDecimal(3),
+ So = reader.GetDecimal(4)
});
}
}