public ViewResult FullView(int id) { GuarantorView guarantorView = new GuarantorView() { guarantor = _guarantor.GetGuarantor(id), //pagetitle = "full view" }; return(View(guarantorView)); }
public IActionResult EditGuarantor(UpdateGuarantor updateGuarantor) { if (ModelState.IsValid) { Guarantor guarantor = _guarantorRepository.GetGuarantor(updateGuarantor.Id); guarantor.Name = updateGuarantor.Name; guarantor.Number = updateGuarantor.Number; guarantor.Gender = updateGuarantor.Gender; guarantor.Address = updateGuarantor.Address; guarantor.Relationship = updateGuarantor.Relationship; guarantor.Occupation = updateGuarantor.Occupation; guarantor.Email = updateGuarantor.Email; guarantor.Nationality = updateGuarantor.Nationality; _guarantorRepository.UpdateGuarantor(guarantor); } return(View()); }