Exemple #1
0
        async void vulSpeciefiekerOpNaam(string Vnaam, string Anaam)
        {
            if (string.IsNullOrWhiteSpace(txtVNaam.Text))
            {
                MessageBox.Show("Geef een geldige voornaam in.");
            }
            else if (string.IsNullOrWhiteSpace(txtANaam.Text))
            {
                MessageBox.Show("Geef een geldige achternaam in.");
            }
            else
            {
                LoadingCircle lo = new LoadingCircle();
                lo.Show();
                lo.BringToFront();
                lo.TopMost = true;
                Panel pnl = new Panel();
                this.Controls.Add(pnl);
                pnl.BackColor = this.BackColor;
                pnl.Size      = this.Size;
                pnl.Location  = new Point(0, 0);
                pnl.BringToFront();
                string text = this.Text;
                this.Text    = "";
                this.Visible = false;

                await Task.Run(() => _vulSpeciefiekerOpNaam(Vnaam, Anaam));

                this.Visible = true;
                this.Text    = text;
                Controls.Remove(pnl);
                lo.Close();
            }
        }
Exemple #2
0
        async void runExport(string l, string n)
        {
            LoadingCircle lo = new LoadingCircle();

            lo.Show();
            lo.BringToFront();
            lo.TopMost = true;
            Panel pnl = new Panel();

            this.Controls.Add(pnl);
            pnl.BackColor = this.BackColor;
            pnl.Size      = this.Size;
            pnl.Location  = new Point(0, 0);
            pnl.BringToFront();
            string text = this.Text;

            this.Text    = "";
            this.Visible = false;

            await Task.Run(() => export(l, n));

            try {
                this.Visible = true;
                this.Text    = text;
                Controls.Remove(pnl);
                lo.Close();
            } catch (Exception) { try { lo.Close(); } catch (Exception) { } }
        }
Exemple #3
0
        public async void refreshLLN()
        {
            lo = new LoadingCircle();
            lo.Show();
            lo.BringToFront();
            Panel pnl = new Panel();

            this.Controls.Add(pnl);
            pnl.BackColor = this.BackColor;
            pnl.Size      = this.Size;
            pnl.Location  = new Point(0, 0);
            pnl.BringToFront();
            string text = this.Text;

            this.Text    = "";
            this.Visible = false;
            lo.Focus();

            await Task.Run(() => getAlleLLN());

            this.Focus();
            this.Visible = true;
            this.Text    = text;
            Controls.Remove(pnl);
            lo.Close();
            lo.Dispose();
        }
Exemple #4
0
        async void updateLLN(Leerling l, int id)
        {
            LoadingCircle lo = new LoadingCircle();

            lo.Show();
            lo.Focus();

            await Task.Run(() => updaten(l, id));

            lo.Close();
        }
Exemple #5
0
        async void voegToe(Leerling l)
        {
            LoadingCircle lo = new LoadingCircle();

            lo.Show();
            lo.Focus();

            await Task.Run(() => toevoegen(l));

            lo.Close();
        }
Exemple #6
0
        async void wisAlles()
        {
            LoadingCircle lo = new LoadingCircle();

            lo.Show();
            lo.Focus();

            await Task.Run(() => alleswissen());

            lo.Close();
            this.TopMost = true;
        }
Exemple #7
0
        async void wisLLN(string voornaam, string achternaam, string postcode)
        {
            LoadingCircle lo = new LoadingCircle();

            lo.Show();
            lo.Focus();

            await Task.Run(() => wissen(voornaam, achternaam, postcode));

            lo.Close();
            this.TopMost = true;
        }
Exemple #8
0
        public async void start()
        {
            lo = new LoadingCircle();
            lo.Show();
            lo.Focus();
            lo.TopMost = true;
            lo.BringToFront();

            await Task.Run(() => _start());

            lo.Close();
        }
Exemple #9
0
        async void refreshSpecifieker()
        {
            if (!busy)
            {
                if (Convert.ToDateTime(DateTime.ParseExact(dtpVan.Value.ToString("dd/MM/yyyy"), "dd/MM/yyyy", null)) > Convert.ToDateTime(DateTime.ParseExact(dtpTot.Value.ToString("dd/MM/yyyy"), "dd/MM/yyyy", null)))
                {
                    busy = true; MessageBox.Show("De einddatum kan niet lager zijn dan de begindatum."); dtpVan.Value = DateTime.Now; busy = false; refreshSpecifieker();
                }
                else if (Convert.ToDateTime(DateTime.ParseExact(dtpVan.Value.ToString("dd/MM/yyyy"), "dd/MM/yyyy", null)) > DateTime.Now)
                {
                    busy = true; MessageBox.Show("Je kan niet in de toekomst beignnen zoeken."); dtpVan.Value = DateTime.Now; busy = false; refreshSpecifieker();
                }
                else if (Convert.ToDateTime(DateTime.ParseExact(dtpTot.Value.ToString("dd/MM/yyyy"), "dd/MM/yyyy", null)) > DateTime.Now)
                {
                    busy = true; MessageBox.Show("Je kan niet tot in de toekomst zoeken."); dtpTot.Value = DateTime.Now; busy = false; refreshSpecifieker();
                }
                else
                {
                    LoadingCircle lo = new LoadingCircle();
                    lo.Show();
                    lo.BringToFront();
                    lo.TopMost = true;
                    Panel pnl = new Panel();
                    this.Controls.Add(pnl);
                    pnl.BackColor = this.BackColor;
                    pnl.Size      = this.Size;
                    pnl.Location  = new Point(0, 0);
                    pnl.BringToFront();
                    string text = this.Text;
                    this.Text    = "";
                    this.Visible = false;

                    await Task.Run(() => refrSpecifieker());

                    this.Visible = true;
                    this.Text    = text;
                    Controls.Remove(pnl);
                    lo.Close();
                }
            }
        }