예제 #1
0
 public ActionResult NewPerson(int familyid, SearchAddModel m)
 {
     if (familyid == 0 && string.Compare(m.AddContext, "family", StringComparison.OrdinalIgnoreCase) == 0)
     {
         familyid = (from pp in DbUtil.Db.People
                     where pp.PeopleId == m.PrimaryKeyForContextType.ToInt()
                     select pp.FamilyId).Single();
     }
     m.NewPerson(familyid);
     ModelState.Clear();
     return(View(m));
 }