Compare commits

...

5 Commits

2 changed files with 23 additions and 13 deletions

View File

@ -452,32 +452,34 @@ namespace SafeMobileLib
BatchHistoryData batchHistObj = null;
try
{
lat = Convert.ToDouble(dr["lat"]);
lng = Convert.ToDouble(dr["lng"]);
timegmt = Convert.ToInt32(dr["timegmt"]);
batchHistObj = new BatchHistoryData
{
batchHistObj = new BatchHistoryData
{
Department = dr["department"].ToString(),
Unit = dr["unit"].ToString(),
Location = ((getAddress && dr["address"] != DBNull.Value) ? dr["address"].ToString() : "LAT:" + Math.Round(lat, 5).ToString() + " , LNG:" + Math.Round(lat, 5).ToString()),
Speed = (isInMile) ? ((int)(Convert.ToInt32(dr["speed"]) * 0.621371192)).ToString() : Convert.ToInt32(dr["speed"]).ToString(),
Lat = lat,
Lng = lng,
Address = dr["address"].ToString(),
Address = string.Empty,
Time = timegmt.TimeOfDayHHMMSSLocal(!is24hours),
Date = timegmt.GetDTLocalFromSeconds().Date.ToShortDateString()
};
if (getAddress)
{
batchHistObj.Location = dr["address"].ToString();
batchHistObj.Address = dr["address"].ToString();
}
else
batchHistObj.Location = "LAT:" + Math.Round(lat, 5).ToString() + " , LNG:" + Math.Round(lat, 5).ToString();
}

View File

@ -112,7 +112,9 @@
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="prebuild.sh" />
<None Include="RunMessagesPartitioning.bat" />
<None Include="RunMessagesPartitioning.bat">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup>
<BootstrapperPackage Include=".NETFramework,Version=v4.5">
@ -144,7 +146,9 @@
<Content Include="7toLatest7.sql">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="call_messages_partitioning.sql" />
<Content Include="call_messages_partitioning.sql">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="CreateMissingForeignKeys.sql">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
@ -154,8 +158,12 @@
<Content Include="CreateMissingPrimaryKeys.sql">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="generate_partitioning_of_an_existing_table_by_date_unix_time.sql" />
<Content Include="get_query_partitioning_of_an_existing_table_by_date_unix_time.sql" />
<Content Include="generate_partitioning_of_an_existing_table_by_date_unix_time.sql">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="get_query_partitioning_of_an_existing_table_by_date_unix_time.sql">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="NewFields.sql">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>