Compare commits

..

No commits in common. "master" and "refactor_code3" have entirely different histories.

2 changed files with 13 additions and 23 deletions

View File

@ -452,36 +452,34 @@ namespace SafeMobileLib
BatchHistoryData batchHistObj = null; BatchHistoryData batchHistObj = null;
try try
{ {
lat = Convert.ToDouble(dr["lat"]); lat = Convert.ToDouble(dr["lat"]);
lng = Convert.ToDouble(dr["lng"]); lng = Convert.ToDouble(dr["lng"]);
timegmt = Convert.ToInt32(dr["timegmt"]); timegmt = Convert.ToInt32(dr["timegmt"]);
batchHistObj = new BatchHistoryData batchHistObj = new BatchHistoryData
{ {
Department = dr["department"].ToString(), Department = dr["department"].ToString(),
Unit = dr["unit"].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(), Speed = (isInMile) ? ((int)(Convert.ToInt32(dr["speed"]) * 0.621371192)).ToString() : Convert.ToInt32(dr["speed"]).ToString(),
Lat = lat, Lat = lat,
Lng = lng, Lng = lng,
Address = string.Empty, Address = dr["address"].ToString(),
Time = timegmt.TimeOfDayHHMMSSLocal(!is24hours), Time = timegmt.TimeOfDayHHMMSSLocal(!is24hours),
Date = timegmt.GetDTLocalFromSeconds().Date.ToShortDateString() 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();
} }
catch (Exception ex) catch (Exception ex)
{ {

View File

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