Esempio n. 1
0
        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));
        }
Esempio n. 2
0
        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));
        }