private void Edit(TeamProject_ShowMe.Show.Show show) { using (TeamProject_ShowMe.MediaCenterContext db = new TeamProject_ShowMe.MediaCenterContext()) { db.ShowRepository.UpdateShow(show); } }
private void Delete(TeamProject_ShowMe.Show.Show show) { using (TeamProject_ShowMe.MediaCenterContext db = new TeamProject_ShowMe.MediaCenterContext()) { db.ShowRepository.RemoveShow(show); adminShowList.ItemsSource = db.ShowRepository.Shows; db.ShowRepository.Load(); } }
public AddNewShowWindow(TeamProject_ShowMe.Show.Show show, ShowAction okAction) { InitializeComponent(); _oldName = show.Name; _oldRating = show.Rating; _oldYear = show.Year; _oldDescription = show.Description; ShowC = show; OkAction = okAction; DataContext = show; }