public ActionResult DeleteConfirmed(int id) { TrackSet trackset = db.TrackSet.Find(id); db.TrackSet.Remove(trackset); db.SaveChanges(); return(RedirectToAction("Index")); }
public RibbonApp() { // Creation logic ShapesModel = new TrackSet(); TouchSurface = new Surface(this); // Wire up UIs SetupOtherUI(); }
public ActionResult Edit([Bind(Include = "Id,album,title,track,artist,genre,filename,runningtime,date,weight")] TrackSet trackset) { if (ModelState.IsValid) { db.Entry(trackset).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(trackset)); }
public ActionResult Create([Bind(Include = "Id,album,title,track,artist,genre,filename,runningtime,date,weight")] TrackSet trackset) { if (ModelState.IsValid) { db.TrackSet.Add(trackset); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(trackset)); }
// GET: /Browser/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } TrackSet trackset = db.TrackSet.Find(id); if (trackset == null) { return(HttpNotFound()); } return(View(trackset)); }
// after refreshRibbons private void truncateTheTracks() { var now = DateTime.Now; var tobeRemoved = new List <Track>(); TrackSet tracks = (TrackSet)_ribbonSet.tracks; foreach (Track t in tracks) { cleanup(t, now); if (t.isClosed() && t.Count == 0) { tobeRemoved.Add(t); } } tobeRemoved.ForEach(t => ((TrackSet)_ribbonSet.tracks).remove(t)); }
public RibbonSet(TrackSet ts) { Tracks = ts; }
public RibbonSet(TrackSet ts) { tracks = ts; setup(); // todo AOP Tricks }