示例#1
0
 public TicketVM()
 {
     _ticketholderList    = Ticket.GetTicketholders();
     _ticketTypeList      = TicketType.GetTicketTypes();
     SelectedTicketholder = new Ticket();
     NewTicketType        = new TicketType();
 }
示例#2
0
 //ophalen uit model
 public SettingsVM()
 {
     _types        = ContactPersonType.GetTypes();
     _changeTypes  = ContactPersonType.GetTypes();
     _festival     = Festival.GetFestival();
     _tickettypes  = TicketType.GetTicketTypes();
     _stagetypes   = Stage.GetStages();
     _Bands        = Band.GetBands();
     _genres       = Genre.GetGenres();
     _changeGenres = Genre.GetGenres();
 }
示例#3
0
        private void NewTicketType()
        {
            TicketType tt = new TicketType();

            tt.Name             = _selectedTicketType.Name;
            tt.Price            = _selectedTicketType.Price;
            tt.AvailableTickets = _selectedTicketType.AvailableTickets;

            TicketType.InsertTicketType(tt);
            MessageBox.Show("de nieuwe ticket " + _selectedTicketType.Name + " is toegevoegd");

            _tickettypes = TicketType.GetTicketTypes();
            OnPropertyChanged("TicketTypes");
        }
示例#4
0
        private void EditTicketType()
        {
            TicketType tt = new TicketType();

            tt.ID               = _selectedTicketType.ID;
            tt.Name             = _selectedTicketType.Name;
            tt.Price            = _selectedTicketType.Price;
            tt.AvailableTickets = _selectedTicketType.AvailableTickets;

            TicketType.UpdateTicketType(tt);

            MessageBox.Show("De instellingen voor " + _selectedTicketType.Name + " zijn aangepast");
            _tickettypes = TicketType.GetTicketTypes();
            OnPropertyChanged("TicketTypes");
        }
示例#5
0
        private void DeleteTicketType()
        {
            TicketType tt = new TicketType();

            tt.Name             = _selectedTicketType.Name;
            tt.Price            = _selectedTicketType.Price;
            tt.AvailableTickets = _selectedTicketType.AvailableTickets;

            TicketType.DeleteTicketType(tt);
            MessageBox.Show("De ticket " + _selectedTicketType.Name + "is verwijderd");
            MessageBox.Show("Indien er hier tickets mee gemaakt zijn, zijn deze niet meer geldig");

            _tickettypes = TicketType.GetTicketTypes();
            OnPropertyChanged("TicketTypes");
        }
示例#6
0
 public void SaveTicketType()
 {
     try
     {
         string      sql          = "INSERT INTO Tickettypes(Name,Price,Available) VALUES (@Name,@Price,@Available)";
         DbParameter parName      = Database.AddParameter("@Name", NewTicketType.Name);
         DbParameter parPrice     = Database.AddParameter("@Price", NewTicketType.Price);
         DbParameter parAvailable = Database.AddParameter("@Available", NewTicketType.AvailableTickets);
         Database.ModifyData(sql, parName, parPrice, parAvailable);
         TicketTypeList.Add(NewTicketType);
         TicketTypeList = TicketType.GetTicketTypes();
         MessageBox.Show("Tickettype werd succesvol toegevoegd");
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
示例#7
0
 //gegevens ophalen
 public TicketingVM()
 {
     _tickettypes = TicketType.GetTicketTypes();
     _tickets     = Ticket.GetTickets();
 }
示例#8
0
 //opnieuw inladen datagrid
 //dit werkt momenteel niet als een window gesloten wordt.
 public void refresh()
 {
     _tickettypes = TicketType.GetTicketTypes();
     _lineUPs     = LineUp.GetLineUp();
 }
示例#9
0
 public MainPageVM()
 {
     _tickettypes = TicketType.GetTicketTypes();
     _lineUPs     = LineUp.GetLineUp();
 }