public VehicleDetails() { Bitacora = new Bitacora(); VSData = new VehicleSensorsData(); }
/// <summary> /// /// </summary> /// <returns></returns> public VehicleSensorsData GetVehicleSensorsData(string VehicleId) { try { // Look for the vehicle data in the log record. XmlNodeList nodes = GetTableData("Logs"); if (nodes != null) { foreach (XmlNode xn in nodes.Item(0).ChildNodes) { if (xn.HasChildNodes) { if (xn.ChildNodes[1].InnerText.Equals(VehicleId)) { VehicleSensorsData VSData = new VehicleSensorsData(); VSData.SensorType = GetSensorType(xn.ChildNodes[2].InnerText); VSData.StatusType = GetStatusType(xn.ChildNodes[3].InnerText); VSData.LogFile = xn.ChildNodes[4].InnerText; return VSData; } } } } return null; } catch (Exception) { return null; throw; } }