示例#1
0
        public async Task OnGetAsync(long id)
        {
            Dto = await _service.GetByIdAsync(id);

            if (Dto == null)
            {
                throw new VinoDataNotFoundException();
            }
        }
示例#2
0
        public async Task OnGetAsync(long?id, long?pid)
        {
            if (id.HasValue)
            {
                Dto = await _service.GetByIdAsync(id.Value);

                if (Dto == null)
                {
                    throw new VinoDataNotFoundException();
                }
                ViewData["Mode"] = "Edit";
            }
            else
            {
                Dto = new MemberAddressDto();
                ViewData["Mode"] = "Add";
            }
        }
示例#3
0
        public ActionResult Update(MemberAddressDto dto)
        {
            var result = _memberaddressContract.Update(dto);

            return(Json(result, JsonRequestBehavior.AllowGet));
        }