コード例 #1
0
 public ActionResult Edit([Bind(Include = "DonorId,FName,Init,LName,Title,Suffix,Email,Cell,Birthday,Gender,MarkerId,ContactId,CompanyName,Address,City,State,Zipcode,Phone")] DONOR donor)
 {
     if (ModelState.IsValid)
     {
         drRepo.SaveProduct(donor);
         return(RedirectToAction("Details", new { id = donor.DonorId }));
     }
     ViewBag.CONTACTID = new SelectList(ddlData.CONTACT, "CONTACTID", "TYPEOF", donor.ContactId);
     ViewBag.MARKERID  = new SelectList(ddlData.IDENTITYMARKER, "MARKERID", "MARKERTYPE", donor.MarkerId);
     ViewBag.Gender    = new SelectList(ddlData.DONOR, "Gender", "Gender");
     return(View(donor));
 }