예제 #1
0
        private void InitializeData()
        {
            DateTime dt = DataUtil.LastDate();

            if (dt != DateTime.MinValue)
            {
                dateTimePicker1.Value = dt;
                if (Properties.Settings.Default.upDate)
                {
                    using (DataUpdater upd = new DataUpdater(dateTimePicker1.Value))
                    {
                        upd.ShowDialog();
                    }
                }
            }
        }
예제 #2
0
        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.");
            }
        }