コード例 #1
0
        public ActionResult Edit(int id)
        {
            var model  = new CreateEditViewModel();
            var member = memberProvider.GetMember(id);

            Mapper.DynamicMap(member, model);

            if (!System.IO.File.Exists("~/Photo/" + model.Photo))
            {
                model.Photo = "anonymous.jpg";
            }

            return(View("CreateEdit", model));
        }
コード例 #2
0
        public ActionResult VisitHistory(int id)
        {
            var member = memberProvider.GetMember(id);
            var model  = new VisitHistoryViewModel();

            if (member != null)
            {
                model.MemberNo   = member.MemberNo;
                model.MemberName = member.Name;
                model.Address    = member.Address;
                model.MemberId   = member.Id;
            }
            return(View(model));
        }