public ActionResult Details(int id) { var userId = Guid.Parse(User.Identity.GetUserId()); var service = new CooperatorService(userId); var model = service.GetCooperatorById(id, userId); return(View(model)); }
public ActionResult Edit(int id) { var userId = Guid.Parse(User.Identity.GetUserId()); var service = new CooperatorService(userId); var detail = service.GetCooperatorById(id, userId); var model = new CooperatorEdit { CooperatorId = detail.CooperatorId, FirstName = detail.FirstName, LastName = detail.LastName, Phone = detail.Phone, Email = detail.Email, ContactType = detail.ContactType, OwnerId = detail.OwnerId }; return(View(model)); }