コード例 #1
0
        public virtual ActionResult Edit(long profileTypeId)
        {
            var profileType = profileTypeService.Find(profileTypeId);

            if (profileType == null)
            {
                throw new HttpException((int)HttpStatusCode.NotFound, HttpContext.Translate("Messages.NotFound", ResourceHelper.GetControllerScope(this)));
            }

            return(View("Edit", new ProfileTypeViewModel().MapFrom(profileType)));
        }
コード例 #2
0
        public virtual ActionResult Show(long profileTypeId)
        {
            var profileType = profileTypesService.Find(profileTypeId);

            if (profileType == null)
            {
                throw new HttpException((int)HttpStatusCode.NotFound, HttpContext.Translate("Messages.NotFound", String.Empty));
            }

            var profileMembers = ProfileHelper.BindProfileElement(profileTypeId);

            ViewData["ProfileType"] = new ProfileTypeViewModel {
                Id = profileType.Id
            };

            return(View(profileMembers));
        }