コード例 #1
0
 public ActionResult Edit(Feature feature)
 {
     if (ModelState.IsValid)
     {
         db.Entry(feature).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(feature));
 }
コード例 #2
0
ファイル: EventsController.cs プロジェクト: jayrobot/bearcamp
 public ActionResult Edit(Events events)
 {
     if (ModelState.IsValid)
     {
         db.Entry(events).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(events));
 }
コード例 #3
0
 public ActionResult Edit(DonationTypeID donationtypeid)
 {
     if (ModelState.IsValid)
     {
         db.Entry(donationtypeid).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(donationtypeid));
 }
コード例 #4
0
 public ActionResult Edit(Campaign campaign)
 {
     if (ModelState.IsValid)
     {
         db.Entry(campaign).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(campaign));
 }
コード例 #5
0
 public ActionResult Edit(FundraisingTask fundraisingtask)
 {
     if (ModelState.IsValid)
     {
         db.Entry(fundraisingtask).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.Campaign = new SelectList(db.Campaigns, "ID", "Name", fundraisingtask.Campaign);
     return(View(fundraisingtask));
 }
コード例 #6
0
 public ActionResult Edit(Permission permission)
 {
     if (ModelState.IsValid)
     {
         db.Entry(permission).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.FeatureID = new SelectList(db.Features, "FeatureID", "FeatureName", permission.FeatureID);
     ViewBag.UserLogin = new SelectList(db.Users, "UserLogin", "Pswd", permission.UserLogin);
     return(View(permission));
 }
コード例 #7
0
 public ActionResult Edit(Donation donation)
 {
     if (ModelState.IsValid)
     {
         db.Entry(donation).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.DonationType = new SelectList(db.DonationTypeIDs, "DonationTypeID1", "DonationDesc", donation.DonationType);
     ViewBag.DonorID      = new SelectList(db.Donors, "DonorID", "FastName", donation.DonorID);
     return(View(donation));
 }