public ViewResult Details(int?Id) { IEnumerable <Guarantor> guarantorTest = _guarantorRepo.GetSpecifiedGuarantor(Id.Value); if (guarantorTest == null) { Response.StatusCode = 404; return(View("GuarantorNotFound", Id.Value)); } GuarantorDetailsViewModel guarantorDetailsViewModel = new GuarantorDetailsViewModel() { guarantor = guarantorTest, PageTitle = "Student Details" }; return(View(guarantorDetailsViewModel)); }
public ViewResult Details(int?Id) { Employee employeeTest = _employeeReprository.GetEmployee(Id.Value); List <Guarantor> guarantorcollect = _guarantor.GetSpecifiedGuarantor(Id.Value).ToList(); List <Payment> paymentcollect = _payment.GetSpecifiedPayment(Id.Value).ToList(); double Balancepay = BalancePayment(paymentcollect, employeeTest); if (employeeTest == null) { Response.StatusCode = 404; return(View("EmployeeNotFound", Id.Value)); } HomeDetailsViewModel homeDetailsViewModel = new HomeDetailsViewModel() { employee = employeeTest, Guarantor = guarantorcollect, Payment = paymentcollect, Balance = Balancepay, PageTitle = "Developer Details" }; return(View(homeDetailsViewModel)); }