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)); }
public ViewResult CreatePayment(int id) { Employee std = _student.GetEmployee(id); string firstname = std.FirstName; string lastname = std.LastName; string Fullname = firstname + " " + lastname; CreatePaymentViewModel pvm = new CreatePaymentViewModel() { EmployeeId = id, StudentName = Fullname, AmouontPaid = 0.00, PaymentDate = DateTime.Now, PaymentMethod = Selector.PayMethod.BankTransfer }; return(View(pvm)); }