コード例 #1
0
 public ActionResult Edit(int id)
 {
     IGigDAC dac = new GigDAC();
     var gig = dac.Get(id);
     var model = new GigEdit { Date = gig.StartDateTime, Description = gig.Description, GigID = gig.GigID, Venue = gig.Venue };
     return View(model);
 }
コード例 #2
0
 public ActionResult Edit(GigEdit gig)
 {
     if (!ModelState.IsValid)
         return View(gig);
     IGigDAC dac = new GigDAC();
     dac.Update(gig.GigID, gig.Description, gig.Venue, gig.Date);
     return RedirectToAction("Index");
 }