Beispiel #1
0
 public ActionResult Edit([Bind(Include = "GrantTypeKey,GrantTypeName,GrantTypeMaximum,GrantTypeLifetimeMaximum,GrantTypeDescription")] GrantType grantType)
 {
     if (ModelState.IsValid)
     {
         db.Entry(grantType).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(grantType));
 }
 public ActionResult Edit([Bind(Include = "BusinessRuleKey,BusinessRuleText")] BusinessRule businessRule)
 {
     if (ModelState.IsValid)
     {
         db.Entry(businessRule).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(businessRule));
 }
Beispiel #3
0
 public ActionResult Edit([Bind(Include = "PersonKey,PersonLastName,PersonFirstName,PersonEmail,PersonPassWord,PersonEntryDate,PersonPassWordSeed")] Person person)
 {
     if (ModelState.IsValid)
     {
         db.Entry(person).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(person));
 }
Beispiel #4
0
 public ActionResult Edit([Bind(Include = "DonationKey,PersonKey,DonationDate,DonationAmount,DonationConfirmation")] Donation donation)
 {
     if (ModelState.IsValid)
     {
         db.Entry(donation).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.PersonKey = new SelectList(db.People, "PersonKey", "PersonLastName", donation.PersonKey);
     return(View(donation));
 }
 public ActionResult Edit([Bind(Include = "GrantRequestKey,GrantRequestDate,PersonKey,GrantTypeKey,GrantRequestExplanation,GrantRequestAmount")] GrantRequest grantRequest)
 {
     if (ModelState.IsValid)
     {
         db.Entry(grantRequest).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.PersonKey = new SelectList(db.People, "PersonKey", "PersonLastName", grantRequest.PersonKey);
     return(View(grantRequest));
 }
Beispiel #6
0
 public ActionResult Edit([Bind(Include = "EmployeeKey,PersonKey,EmployeeHireDate,EmployeeAnnualSalary")] Employee employee)
 {
     if (ModelState.IsValid)
     {
         db.Entry(employee).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.PersonKey = new SelectList(db.People, "PersonKey", "PersonLastName", employee.PersonKey);
     return(View(employee));
 }
Beispiel #7
0
 public ActionResult Edit([Bind(Include = "GrantReviewKey,GrantReviewDate,GrantRequestKey,GrantRequestStatus,GrantAllocationAmount,EmployeeKey")] GrantReview grantReview)
 {
     if (ModelState.IsValid)
     {
         db.Entry(grantReview).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.EmployeeKey     = new SelectList(db.Employees, "EmployeeKey", "EmployeeKey", grantReview.EmployeeKey);
     ViewBag.GrantRequestKey = new SelectList(db.GrantRequests, "GrantRequestKey", "GrantRequestExplanation", grantReview.GrantRequestKey);
     return(View(grantReview));
 }