private void LoadMapData(DateTime date, bool carz) { List <MunkaAdat> tmp; statlabel.Text = "Az adatok betöltése folyamatban..."; try { Reset(); if (carz) { tmp = DataUtil.GetWorkData(date, out autok, out osszesito); using (ZeroCso zcs = new ZeroCso(tmp)) { zcs.ShowDialog(); } if (autok.Count > 0) { autok.Sort(); using (CarDataGridPane cu = new CarDataGridPane(autok, osszesito, true)) { if (cu.ShowDialog() == DialogResult.Cancel) { statlabel.Text = "Kész"; return; } } } else { MessageBox.Show("Nincs megjelenítendő adat.", "Nincs adat", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); } } else { tmp = DataUtil.GetWorkData(date, out osszesito); } unbig[0] = osszesito.ElsoTizes; unbig[1] = osszesito.DeTizes; unbig[2] = osszesito.DuTizes; unfive[0] = osszesito.ElsoLE5; unfive[1] = osszesito.DeLE5; unfive[2] = osszesito.DuLE5; kisM3 = osszesito.Kism3; nagyM3 = osszesito.Nagym3; LoadMarkersFromData(tmp, carz); AppLogger.WriteEvent(string.Format("Kiosztás: {0}", dateTimePicker1.Value.ToShortDateString())); } catch (Exception ex) { AppLogger.WriteException(ex); AppLogger.WriteEvent("A kivétel elkapva."); } }
private void LoadMapData(object sender, FormClosingEventArgs e) { DataUpdater updater = sender as DataUpdater; try { Reset(); List <WorkData> tmp = updater.WorkData; //Mégse gomb meg lett nyomva if (tmp == null) { return; } dao.GetFoldLatLng(tmp); vehicles = updater.Autok; summary = updater.Cimosszesito; if (vehicles.Count == 0) { MessageBox.Show("Nincs megjelenítendő adat.", "Nincs adat", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); ResetLabels(); UpdateBottomPanel(); return; } else { using (ZeroCso zcs = new ZeroCso(tmp, dao)) { zcs.ShowDialog(); } vehicles.Sort(); using (CarDataGridPane cu = new CarDataGridPane(vehicles, summary, true, dao)) { if (cu.ShowDialog() == DialogResult.Cancel) { return; } } } unbig[0] = summary.ElsofuvarNagyDeb; unbig[1] = summary.DelelottNagyDeb; unbig[2] = summary.DelutanNagyDeb; unbig[3] = summary.ElsoTizesJozsa; unbig[4] = summary.DeTizesJozsa; unbig[5] = summary.DuTizesJozsa; unfive[0] = summary.ElsofuvarKisDeb; unfive[1] = summary.DelelottKisDeb; unfive[2] = summary.DelutanKisDeb; unfive[3] = summary.ElsoLE5Jo; unfive[4] = summary.DeLE5Jo; unfive[5] = summary.DuLE5Jo; m3small[0] = summary.Kism3Deb; m3small[1] = summary.Kism3Jozsa; m3big[0] = summary.Nagym3Deb; m3big[1] = summary.Nagym3Jozsa; LoadMarkersFromData(tmp); AppLogger.WriteEvent(string.Format("Kiosztás: {0}", dateChooser.Value.ToShortDateString())); } catch (Exception ex) { AppLogger.WriteException(ex); AppLogger.WriteEvent("A kivétel elkapva."); } }