public async Task <ActionResult> Summary(int id) { var caseRepo = new QueryCases(db); string userId = User.Identity.GetUserId(); Case aCase = await caseRepo.CaseByIdAsync(id, userId); return(View(aCase)); }
// GET: Children public async Task <ActionResult> Index(int id) { QueryCases caseRepo = new QueryCases(db); //PartyTypeRepository pTypeRepo = new PartyTypeRepository(db); string userId = User.Identity.GetUserId(); Case aCase = await caseRepo.CaseByIdAsync(id, userId); ChildrenViewModel VM = new ChildrenViewModel(); VM.CaseMenu = new CaseMenuViewModel(aCase, "Children"); VM.Children = aCase.Children.ToList(); return(View(VM)); }
public async Task <ActionResult> Index(int id, int partyId) { QueryCases caseRepo = new QueryCases(context); //PartyTypeRepository pTypeRepo = new PartyTypeRepository(context); QueryCityTax cityTaxRepo = new QueryCityTax(context); QueryFilingStatus filingStatusRepo = new QueryFilingStatus(context); string userId = User.Identity.GetUserId(); Case aCase = await caseRepo.CaseByIdAsync(id, userId); Party party = aCase.Parties.Where(p => p.Id == partyId).FirstOrDefault(); PartyViewModel VM = new PartyViewModel(party); VM.CaseMenu = new CaseMenuViewModel(aCase, "Party"); VM.FilingStatuses = filingStatusRepo.GetFilingStatuses(); VM.CityTaxes = cityTaxRepo.GetCityTaxTypes(); return(View(VM)); }