コード例 #1
0
        public JsonResult GetDetail(System.Int32 id)
        {
            PosTerminalDetailView vm      = new PosTerminalDetailView();
            GetPosTerminalRequest request = new GetPosTerminalRequest();

            request.TerminalId = id;
            GetPosTerminalResponse response = _posTerminalService.GetPosTerminal(request);

            if (response.PosTerminalFound)
            {
                vm = response.PosTerminal.ConvertToPosTerminalDetailView();
            }

            return(Json(vm, JsonRequestBehavior.AllowGet));
        }
コード例 #2
0
        public GetPosTerminalResponse GetPosTerminal(GetPosTerminalRequest request)
        {
            GetPosTerminalResponse response = new GetPosTerminalResponse();

            PosTerminal posTerminal = _posTerminalRepository
                                      .FindBy(request.TerminalId);

            if (posTerminal != null)
            {
                response.PosTerminalFound = true;
                response.PosTerminal      = posTerminal.ConvertToPosTerminalView();
            }
            else
            {
                response.PosTerminalFound = false;
            }


            return(response);
        }