private void ParseUj() { Auto tmpCar; WorkData tmpData; List <WorkData> tmpFordulo = new List <WorkData>(); string tmpRsz; int tmpTav; try { foreach (XmlNode carNode in tempDoc.DocumentElement.FirstChild.ChildNodes) { tmpRsz = carNode.Attributes[0].Value; tmpCar = new Auto(tmpRsz); autok.Add(tmpCar); foreach (XmlNode fordNode in carNode.ChildNodes) { tmpTav = int.Parse(fordNode.Attributes[0].Value); tmpFordulo.Clear(); foreach (XmlNode cimNode in fordNode.ChildNodes) { tmpData = new WorkData(); //tmpData.ParseKoord(cimNode); tmpData.Rendszam = tmpRsz; tmpData.Datum = date; tmpData.WorkCapacity = int.Parse(cimNode.Attributes[2].Value); tmpData.TenylegesKobmeter = int.Parse(cimNode.Attributes[3].Value); tmpData.Napszak = int.Parse(cimNode.Attributes[4].Value); tmpData.Utca = cimNode.Attributes[6].Value; tmpData.HazSzam = cimNode.Attributes[7].Value; tmpData.IranyitoSzam = int.Parse(cimNode.Attributes[8].Value); tmpData.CsoHossz = int.Parse(cimNode.Attributes[9].Value); tmpData.WorksheetNumber = long.Parse(cimNode.Attributes[10].Value); osszesito.UpdateWith(tmpData); tmpFordulo.Add(tmpData); workList.Add(tmpData); } tmpCar.AddFuvar(tmpFordulo, tmpTav); } } } catch (Exception e) { } }
private void ParseMarcius() { Auto tmpCar; WorkData tmpData; string tmpRsz = null; try { foreach (XmlNode carNode in tempDoc.GetElementsByTagName("auto")) { tmpRsz = carNode.Attributes[0].Value; tmpCar = new Auto(tmpRsz); autok.Add(tmpCar); foreach (XmlNode cimNode in carNode.ChildNodes) { tmpData = new WorkData(); tmpData.Datum = date; tmpData.Rendszam = tmpRsz; //tmpData.ParseKoord(cimNode); tmpData.WorkCapacity = int.Parse(cimNode.Attributes[2].Value); tmpData.TenylegesKobmeter = int.Parse(cimNode.Attributes[3].Value); tmpData.Napszak = int.Parse(cimNode.Attributes[4].Value); tmpData.Utca = cimNode.Attributes[6].Value; tmpData.HazSzam = cimNode.Attributes[7].Value; tmpData.IranyitoSzam = int.Parse(cimNode.Attributes[8].Value); tmpData.CsoHossz = int.Parse(cimNode.Attributes[9].Value); tmpData.WorksheetNumber = long.Parse(cimNode.Attributes[10].Value); osszesito.UpdateWith(tmpData); tmpCar.AddFuvar(tmpData, int.Parse(cimNode.Attributes[13].Value)); workList.Add(tmpData); } } } catch (Exception e) { } }