コード例 #1
0
 public ActionResult Edit([Bind(Include = "RecipientId,CompanyName,Address,Account,CustomerServiceUrl,Active")] RecipientVM recipient)
 {
     if (ModelState.IsValid)
     {
         _recipientService.UpdateRecepient(
             _recipientFactory.NewRecipient(recipient.RecipientId, recipient.CompanyName, recipient.Address, recipient.Account, recipient.CustomerServiceUrl, recipient.Active)
             );
         log.Info("Edytowano odbiorcę " + recipient.CompanyName + " " + recipient.Address);
         TempData["ResultMessage"] = "Zmiany zapisane";
         return(RedirectToAction("Index"));
     }
     return(View(recipient));
 }