Example #1
0
        public List <Vak> SelectAll()
        {
            //geef vraagID mee
            List <Vak>            returnlist      = new List <Vak>();
            List <List <string> > returnstatement = new DBConnection().Send("SELECT * FROM projectcdb.vak;");

            foreach (List <string> returnstatement2 in returnstatement)
            {
                Vak v = new Vak();
                v.VakID = Convert.ToInt32(returnstatement2[0]);
                if (returnstatement2[1] != "")
                {
                    v.Docent = returnstatement2[1];
                }
                if (returnstatement2[2] != "")
                {
                    v.Locaal = returnstatement2[2];
                }
                if (returnstatement2[3] != "")
                {
                    v.Naam = returnstatement2[3];
                }
                if (returnstatement2[4] != "")
                {
                    v.Discriptie = returnstatement2[4];
                }
                if (returnstatement2[5] != "")
                {
                    if (returnstatement2[5] == "0")
                    {
                        v.Isleeg = false;
                    }
                    else
                    {
                        v.Isleeg = true;
                    }
                }
                returnlist.Add(v);
            }
            return(returnlist);
        }
Example #2
0
 public IngeschrevenVakken(Vak vakid, User user)
 {
     VakID  = vakid;
     UserID = user;
 }