private void dtp1_ValueChanged(object sender, EventArgs e)
        {
            TermekLista termek;
            VevoLista   vevo;

            termek = ABKezeloTermek.TermekRendelesFeltoltes();
            vevo   = ABKezeloAdmin.VevoFeltolt();

            foreach (var item in chart1.Series)
            {
                item.Points.Clear();
            }
            TermekStatisztika[] t = new TermekStatisztika[termek.Count];
            int n     = 0;
            int darab = 0;

            foreach (VevoRendelesFizet item in vevo)
            {
                if (item.RendelesDatum >= dtp1.Value && item.RendelesDatum.Date <= dtp2.Value)
                {
                    foreach (VevoRendelesTermek it in termek)
                    {
                        if (it.IdVevo == item.VevoID)
                        {
                            int i = 0;
                            while (i < n && t[i].nev != it.TermekNev)
                            {
                                i++;
                            }
                            if (i < n)
                            {
                                t[i].db++;
                                darab++;
                            }
                            else
                            {
                                t[n].nev = it.TermekNev;
                                t[n].db  = 1;
                                n++;
                                darab++;
                            }
                        }
                    }
                }
            }

            Random r = new Random();

            for (int i = 0; i < n; i++)
            {
                chart1.Series["db"].Points.AddXY(t[i].nev, t[i].db);
                chart1.Series["db"].Points[i].Color = Color.FromArgb(255, (byte)r.Next(255), (byte)r.Next(255));
            }
            lbTermekDarab.Text = darab.ToString() + "/db";
        }
        private void dtp4_ValueChanged(object sender, EventArgs e)
        {
            TermekLista termek;
            VevoLista   vevo;

            vevo   = ABKezeloAdmin.VevoFeltolt();
            termek = ABKezeloTermek.TermekRendelesFeltoltes();

            foreach (var item in chart3.Series)
            {
                item.Points.Clear();
            }
            TermekPenzugyiStatisztika[] t = new TermekPenzugyiStatisztika[termek.Count];
            int netto = 0;
            int n     = 0;

            foreach (VevoRendelesFizet item in vevo)
            {
                if (item.RendelesDatum >= dtp3.Value && item.RendelesDatum.Date <= dtp4.Value)
                {
                    foreach (VevoRendelesTermek it in termek)
                    {
                        if (it.IdVevo == item.VevoID)
                        {
                            int i = 0;
                            while (i < n && t[i].nev != it.TermekNev)
                            {
                                i++;
                            }
                            if (i < n)
                            {
                                t[i].bevetel += it.TermekAr * it.RendelesDb;
                                netto        += it.TermekAr * it.RendelesDb;
                            }
                            else
                            {
                                t[n].nev     = it.TermekNev;
                                t[n].bevetel = 1;
                                n++;
                                netto++;
                            }
                        }
                    }
                }
            }
            Random r = new Random();

            for (int i = 0; i < n; i++)
            {
                chart3.Series["bevetel"].Points.AddXY(t[i].nev, t[i].bevetel);
                chart3.Series["bevetel"].Points[i].Color = Color.FromArgb(255, (byte)r.Next(255), (byte)r.Next(255));
            }
            lbTermekNetto.Text = netto.ToString() + "/Ft";
        }