public ActionResult Edit([Bind(Include = "Language_id,Language_type")] Language language)
 {
     if (ModelState.IsValid)
     {
         db.Entry(language).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(language));
 }
 public ActionResult Edit([Bind(Include = "Album_id,Singer_id,Datetime,Album_Name,Pic,About,Company,Price,Hits,WeekHits,MonthHits")] Album albums)
 {
     if (ModelState.IsValid)
     {
         db.Entry(albums).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Albums"));
     }
     return(View(albums));
 }
 public ActionResult Edit([Bind(Include = "Id,Name,Email,Subject,Message,Status")] GiveBacks giveBacks)
 {
     if (ModelState.IsValid)
     {
         db.Entry(giveBacks).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(giveBacks));
 }
Esempio n. 4
0
 public ActionResult Edit([Bind(Include = "Style_id,Style_type,Album_id")] Style style)
 {
     if (ModelState.IsValid)
     {
         db.Entry(style).State = EntityState.Modified;
         db.SaveChanges();
         return RedirectToAction("Index");
     }
     ViewBag.Album_id = new SelectList(db.Album, "Album_id", "Album_Name", style.Album_id);
     return View(style);
 }
Esempio n. 5
0
 public ActionResult Edit([Bind(Include = "Song_id,Album_id,Song_name")] Song song)
 {
     if (ModelState.IsValid)
     {
         db.Entry(song).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.Album_id = new SelectList(db.Album, "Album_id", "Album_Name", song.Album_id);
     return(View(song));
 }
 public ActionResult Edit([Bind(Include = "Event_id,Name,Singer_id,Datetime,Pic,Adress,About")] EventView eventView)
 {
     if (ModelState.IsValid)
     {
         db.Entry(eventView).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.Singer_id = new SelectList(db.Singer, "Singer_id", "Name", eventView.Singer_id);
     return(View(eventView));
 }
 public ActionResult Edit([Bind(Include = "Order_id,Datetime,AspNetUsers_Id,RecieverName,RecieverPhone,RecieverAdress")] Order order)
 {
     if (ModelState.IsValid)
     {
         db.Entry(order).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.AspNetUsers_Id = new SelectList(db.AspNetUsers, "Id", "Email", order.AspNetUsers_Id);
     return(View(order));
 }
Esempio n. 8
0
 public ActionResult Edit([Bind(Include = "Singer_id,Name,Gender,Country,Language_id")] Singer singer)
 {
     if (ModelState.IsValid)
     {
         db.Entry(singer).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.Language_id = new SelectList(db.Language, "Language_id", "Language_type", singer.Language_id);
     return(View(singer));
 }
Esempio n. 9
0
 public ActionResult Edit([Bind(Include = "Album_id,Singer_id,Datetime,Album_Name,Pic,About,Company,Price,Hits,WeekHits,MonthHits")] Album album)
 {
     if (ModelState.IsValid)
     {
         db.Entry(album).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.Singer_id = new SelectList(db.Singer, "Singer_id", "Name", album.Singer_id);
     return(View(album));
 }
Esempio n. 10
0
 public ActionResult Edit([Bind(Include = "OrderDetail_id,Order_id,Album_id,Count,Price")] OrderDetail orderDetail)
 {
     if (ModelState.IsValid)
     {
         db.Entry(orderDetail).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.Album_id = new SelectList(db.Album, "Album_id", "Album_Name", orderDetail.Album_id);
     ViewBag.Order_id = new SelectList(db.Order, "Order_id", "AspNetUsers_Id", orderDetail.Order_id);
     return(View(orderDetail));
 }
Esempio n. 11
0
 public ActionResult Edit([Bind(Include = "Like_id,Song_id,User_id,AspNetUsers_Id")] Like like)
 {
     if (ModelState.IsValid)
     {
         db.Entry(like).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.AspNetUsers_Id = new SelectList(db.AspNetUsers, "Id", "Email", like.AspNetUsers_Id);
     ViewBag.Song_id        = new SelectList(db.Song, "Song_id", "Song_name", like.Song_id);
     return(View(like));
 }
Esempio n. 12
0
 public void Create(T value)
 {
     _context.Entry(value).State = EntityState.Added;
 }