Ejemplo n.º 1
0
 public Boot(int id, Location location, int maxPersoon, int macSnelheid, string naam, string type)
 {
     this.ID = id;
     this.Location = location;
     this.MaxPersoon = maxPersoon;
     this.MacSnelheid = macSnelheid;
     this.Naam = naam;
     this.Type = type;
 }
Ejemplo n.º 2
0
 public Missie(string naam, bool actief, string datumVertrek, string datumTerug, bool goedgekeurd, Location location)
 {
     Naam = naam;
     Actief = actief;
     DatumVertrek = datumVertrek;
     DatumTerug = datumTerug;
     Goedgekeurd = goedgekeurd;
     Location = location;
 }
Ejemplo n.º 3
0
        private void btn_aanmaken_Click(object sender, EventArgs e)
        {
            bool actief = false;
            bool goedgekeurd = false;
            Location location = new Location(Convert.ToInt32(nud_X.Value), Convert.ToInt32(nud_Y.Value));
            if (cb_typemissie.SelectedText == "SIN")
            {
                goedgekeurd = true;
                actief = true;
            }
            Missie newMissie = new Missie(tb_MissieNaam.Text, actief, tb_datumvertrek.Text, tb_datumvertrek.Text, goedgekeurd, location, cb_typemissie.SelectedText);

            if (administrator.AddMissie(newMissie))
            {
                MessageBox.Show("Missie aangemaakt");
            }
            else
            {
                MessageBox.Show("Er is iets Misgegaan");
            }
        }
Ejemplo n.º 4
0
        public List<Missie> SelectAllMissies()
        {
            List<Missie> MissieList = new List<Missie>();
            string sql;
            bool actief;
            bool goedgekeurd;
            string datumterug;
            string datumvertrek;
            int id;
            string naam;
            Location location = null;
            sql = "SELECT * FROM G_MISSIE";
            try
            {
                this.Connect();
                OracleCommand cmd = new OracleCommand(sql, this.Connection);
                OracleDataReader reader = cmd.ExecuteReader();

                if (reader.HasRows)
                {
                    while (reader.Read())
                    {
                        actief = false;
                        goedgekeurd = false;
                        datumterug = "";
                        if (Convert.ToInt32(reader["actief"]) == 1)
                        {
                             actief = true;
                        }
                        if (Convert.ToInt32(reader["goedgekeurd"]) == 1)
                        {
                            goedgekeurd = true;
                        }

                        if (reader["DATUMTERUG"] != null)
                        {
                            datumterug = Convert.ToString(reader["DATUMTERUG"]);
                        }

                        id = Convert.ToInt32(reader["ID"]);
                        naam = Convert.ToString(reader["NAAM"]);
                        datumvertrek = Convert.ToString(reader["DATUMVERTREK"]);
                        location = new Location(Convert.ToInt32(reader["LOCATIEX"]), Convert.ToInt32(reader["LOCATIEY"]));
                        MissieList.Add(new Missie(id, naam, actief, datumvertrek, datumterug, goedgekeurd, location));
                    }
                }
            }
            catch (OracleException e)
            {
                Console.WriteLine(e.Message);
            }
            finally
            {
                this.Connection.Close();
            }

            return MissieList;
        }
Ejemplo n.º 5
0
 public Meeting(string datum, string naam, string tekst, Location location)
     : base(datum, naam, tekst)
 {
     this.Location = location;
 }