コード例 #1
0
        public ActionResult Create([Bind(Include = "Id,Name,Address,ContactNo,IsDeleted")] Party party)
        {
            if (ModelState.IsValid)
            {
                _partyManager.Add(party);
                return(RedirectToAction("Index"));
            }

            return(View(party));
        }
コード例 #2
0
 public ActionResult Create([Bind(Include = "Id,Name,ContactNo,Address,IsDeleted")] Party party)
 {
     if (ModelState.IsValid)
     {
         _partyManager.Add(party);
         TempData["msg"] = "Party information has been successfully saved";
         return(RedirectToAction("Index"));
     }
     TempData["msg"] = "Party information has been failed to save";
     return(View(party));
 }