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)); }
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)); }