public JsonResult Create(PosAddressDetailView vm) { CreatePosAddressRequest request = new CreatePosAddressRequest(); request.Address = vm.Address; CreatePosAddressResponse response = _posAddressService.CreatePosAddress(request); return(Json(response)); }
public JsonResult Update(PosAddressDetailView vm) { GetPosAddressRequest request = new GetPosAddressRequest(); request.AddressId = vm.AddressId; ModifyPosAddressRequest updateRequest = _posAddressService.GetPosAddress(request).PosAddress.ConvertToModifyPosAddressRequest(); updateRequest.AddressId = vm.AddressId; updateRequest.Address = vm.Address; ModifyPosAddressResponse response = _posAddressService.ModifyPosAddress(updateRequest); return(Json(response)); }
public JsonResult GetDetail(System.Int32 id) { PosAddressDetailView vm = new PosAddressDetailView(); GetPosAddressRequest request = new GetPosAddressRequest(); request.AddressId = id; GetPosAddressResponse response = _posAddressService.GetPosAddress(request); if (response.PosAddressFound) { vm = response.PosAddress.ConvertToPosAddressDetailView(); } return(Json(vm, JsonRequestBehavior.AllowGet)); }