Пример #1
0
 public LineUpVM()
 {
     _lineUpList       = LineUp.GetLineUp();
     _festivaldateList = Festival.GetDatums();
     _genreList        = Genre.GetGenres();
     _stageList        = Stage.GetStages();
     _bandList         = Band.GetBands();
     NewStage          = new Stage();
     NewDate           = new Festival();
     NewBand           = new Band();
     SelectedLineUp    = new LineUp();
 }
Пример #2
0
 public void SaveDate()
 {
     try
     {
         string      sql = "INSERT INTO Festivaldagen(Date) VALUES (@Datum);";
         DbParameter par = Database.AddParameter("@Datum", NewDate.Date);
         Database.ModifyData(sql, par);
         FestivaldateList.Add(NewDate);
         FestivaldateList = Festival.GetDatums();
         MessageBox.Show("Datum werd succesvol toegevoegd");
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }