public ActionResult FinishRegistration(Models.ChildLocal child)
 {
     if (ModelState.ContainsKey("{ServerError}"))
     {
         ModelState.Remove("{ServerError}");
     }
     if (ModelState.IsValid)
     {
         string guardianID = child.Guardian.ToString();
         if (membership.InsertChild(child.ToServer(), guardianID) > 0)
         {
             TempData["Success"] = "Child registered";
             TempData["member"]  = null;
             return(RedirectToAction("Index", "Home"));
         }
         else
         {
             TempData["Failure"] = "Failed to register";
         }
     }
     return(View(new ChildLocal()));
 }
 public ActionResult RegisterChild(Models.ChildLocal child)
 {
     if (ModelState.ContainsKey("{ServerError}"))
     {
         ModelState.Remove("{ServerError}");
     }
     if (ModelState.IsValid)
     {
         string guardianID = child.Guardian.ToString();
         if (membership.InsertChild(child.ToServer(), guardianID) > 0)
         {
             TempData["member"]  = guardianID;
             TempData["Success"] = "Child registered";
             ModelState.Clear();
             return(View());
         }
         else
         {
             TempData["Failure"] = "Failed to register";
         }
     }
     return(View());
 }