fix_BatchHistory_report #14
@ -452,13 +452,9 @@ namespace SafeMobileLib
|
||||
|
||||
BatchHistoryData batchHistObj = null;
|
||||
|
||||
|
||||
|
||||
try
|
||||
{
|
||||
|
||||
|
||||
|
||||
lat = Convert.ToDouble(dr["lat"]);
|
||||
lng = Convert.ToDouble(dr["lng"]);
|
||||
timegmt = Convert.ToInt32(dr["timegmt"]);
|
||||
@ -468,16 +464,22 @@ namespace SafeMobileLib
|
||||
|
||||
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();
|
||||
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user