public VehicleDetails() { Bitacora = new Bitacora(); VSData = new VehicleSensorsData(); }
/// <summary> /// /// </summary> /// <returns></returns> public Bitacora GetVehicleBitacora(string VehicleId) { try { // Look for the vehicle model the corresponds to the vehicle model id XmlNodeList nodes = GetTableData("Bitacora"); if (nodes != null) { foreach (XmlNode xn in nodes.Item(0).ChildNodes) { if (xn.HasChildNodes) { if (xn.ChildNodes[0].InnerText.Equals(VehicleId)) // User is existed online { Bitacora bitacora = new Bitacora(); bitacora.StartTime = xn.ChildNodes[2].InnerText; bitacora.Start_microseconds = xn.ChildNodes[3].InnerText; bitacora.EndTime = xn.ChildNodes[4].InnerText; bitacora.End_microseconds = xn.ChildNodes[5].InnerText; bitacora.Driver = GetUsernameById(xn.ChildNodes[6].InnerText); return bitacora; } } } } return null; } catch (Exception) { return null; throw; } }