Exemplo n.º 1
0
        private static Festival VerwerkRij(IDataRecord rij)
        {
            Festival nieuw = new Festival();

            nieuw.StartDate =  rij["StartDate"].ToString();
            nieuw.EndDate = rij["StartDate"].ToString();

            return nieuw;
        }
Exemplo n.º 2
0
        public static Festival GetData()
        {
            Festival nieuw= new Festival();

            string sql = "SELECT * FROM Festival";

            DbDataReader reader = Database.GetData(sql);

            while (reader.Read())
            {
              nieuw =  VerwerkRij(reader);

            }
            return nieuw;
        }
Exemplo n.º 3
0
        public static void AddType(Festival festi)
        {
            try
            {
                DbParameter paramstart = Database.AddParameter("@start", festi.StartDate);
                DbParameter paramend = Database.AddParameter("@end", festi.EndDate);
               


                Database.ModifyData("INSERT INTO Festival (StartDate,EndDate) values (@start,@end)",paramstart,paramend);


            }
            catch (Exception e)
            {

                Console.WriteLine(e.Message);
            }
        }