public ViewResult SelectCustomers(Models.CustomerSelectionViewModel vm) { var results = _insuranceServices.GetContracts(vm.Criteria); vm.Companies = _insuranceServices.GetAllCompanies(); vm.Contracts = results; return(View(vm)); }
public ViewResult SelectCustomers() { var mock = new Models.CustomerSelectionViewModel(); mock.Companies = _insuranceServices.GetAllCompanies(); // If Contracts is null an Exception is thrown!!! mock.Contracts = new List <Insurance.Services.DTO.ContractDTO>(); return(View(mock)); }
public ActionResult AdvancedToSelectTemplate(Models.CustomerSelectionViewModel vm) { // Store Criteria into the session SessionHelper.Current.Criteria = vm.Criteria; return(RedirectToAction("SelectTemplate")); }