public void Delete(int idPassport) { Passport passport = getPassport(idPassport); list.Remove(passport); passport.Delete(); }
public ActionResult DeletePassport(int PersonID, int id) { PersonGeneral person = mappingController.personListData.personList.Find(item => item.ID == PersonID); if ((person != null) && (person is Person)) { person.Load(); Passport passport = (person as Person).PassportList.Find((item) => { return(item.ID == id); }); if (passport != null) { passport.Delete(); } } return(Json("")); }