public ActionResult Edit([Bind(Include = "ID,Name,Album_ID,Singer_ID,Musician_ID,ImagePath,SourcePath,Year,Format,BitRate,Tag,Size,Length,Rating,CustomString1,CustomString2,CustomString3,CustomString4,CustomString5,CustomInt1,CustomInt2,CustomInt3,CustomInt4,CustomInt5,CustomBool1,CustomBool2,CustomBool3,CustomBool4,CustomBool5")] Song song)
 {
     if (ModelState.IsValid)
     {
         db.Entry(song).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.Album_ID    = new SelectList(db.Albums, "ID", "Name", song.Album_ID);
     ViewBag.Musician_ID = new SelectList(db.Musicians, "ID", "Name", song.Musician_ID);
     ViewBag.Singer_ID   = new SelectList(db.Singers, "ID", "Name", song.Singer_ID);
     return(View(song));
 }
 public ActionResult Edit([Bind(Include = "ArtistID,ArtistName,ArtistPhoto")] Artist artist)
 {
     if (ModelState.IsValid)
     {
         db.Entry(artist).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(artist));
 }
 public ActionResult Edit([Bind(Include = "ID,Name,Birthday,Nationality,Detail,ImagePath,CustomString1,CustomString2,CustomString3,CustomString4,CustomString5,CustomInt1,CustomInt2,CustomInt3,CustomInt4,CustomInt5,CustomBool1,CustomBool2,CustomBool3,CustomBool4,CustomBool5")] Musician musician)
 {
     if (ModelState.IsValid)
     {
         db.Entry(musician).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(musician));
 }
Esempio n. 4
0
 public ActionResult Edit([Bind(Include = "ID,Username,Password,Fullname,Email,Active,CustomString1,CustomString2,CustomString3,CustomString4,CustomString5,CustomInt1,CustomInt2,CustomInt3,CustomInt4,CustomInt5,CustomBool1,CustomBool2,CustomBool3,CustomBool4,CustomBool5")] User user)
 {
     if (ModelState.IsValid)
     {
         db.Entry(user).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(user));
 }
 public ActionResult Edit([Bind(Include = "ID,Name,DateIssue,Detail,ImagePath,CustomString1,CustomString2,CustomString3,CustomString4,CustomString5,CustomInt1,CustomInt2,CustomInt3,CustomInt4,CustomInt5,CustomBool1,CustomBool2,CustomBool3,CustomBool4,CustomBool5")] Album album)
 {
     if (ModelState.IsValid)
     {
         db.Entry(album).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(album));
 }
Esempio n. 6
0
 public ActionResult Edit([Bind(Include = "AlbumID,AlbumTitle,ReleaseDate,Genre,ArtWork,ArtistID")] Record record)
 {
     if (ModelState.IsValid)
     {
         db.Entry(record).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.ArtistID = new SelectList(db.Artists, "ArtistID", "ArtistName", record.ArtistID);
     return(View(record));
 }
 public ActionResult Edit([Bind(Include = "Song_ID,Category_ID,Detail")] Song_Category song_Category)
 {
     if (ModelState.IsValid)
     {
         db.Entry(song_Category).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.Category_ID = new SelectList(db.Categories, "ID", "Name", song_Category.Category_ID);
     ViewBag.Song_ID     = new SelectList(db.Songs, "ID", "Name", song_Category.Song_ID);
     return(View(song_Category));
 }
Esempio n. 8
0
 public void Edit(User user)
 {
     context.Entry <User>(user).State = System.Data.Entity.EntityState.Modified;
 }