示例#1
0
        public JsonResult Update(PosTerminalDetailView vm)
        {
            GetPosTerminalRequest request = new GetPosTerminalRequest();

            request.TerminalId = vm.TerminalId;

            ModifyPosTerminalRequest updateRequest = _posTerminalService.GetPosTerminal(request).PosTerminal.ConvertToModifyPosTerminalRequest();

            updateRequest.TerminalId             = vm.TerminalId;
            updateRequest.TerminalIdByHeadQuater = vm.TerminalIdByHeadQuater;
            updateRequest.InitializeCode         = vm.InitializeCode;
            GetPosDeviceRequest posDeviceRequest = new GetPosDeviceRequest();

            posDeviceRequest.DeviceId = vm.PosDeviceDeviceId;
            updateRequest.PosDevice   = _posDeviceService.GetPosDevice(posDeviceRequest).PosDevice;
            GetPosStatusTerminalRequest posStatusTerminalRequest = new GetPosStatusTerminalRequest();

            posStatusTerminalRequest.TerminalStatusId = vm.PosStatusTerminalTerminalStatusId;
            updateRequest.PosStatusTerminal           = _posStatusTerminalService.GetPosStatusTerminal(posStatusTerminalRequest).PosStatusTerminal;
            GetPosSimRequest posSimRequest = new GetPosSimRequest();

            posSimRequest.SimId       = vm.PosSimSimId;
            updateRequest.PosSim      = _posSimService.GetPosSim(posSimRequest).PosSim;
            updateRequest.ConnectType = vm.ConnectType;

            ModifyPosTerminalResponse response = _posTerminalService.ModifyPosTerminal(updateRequest);

            return(Json(response));
        }
示例#2
0
        public JsonResult GetPosDevice(System.Int32 id)
        {
            DataTableViewModel data1;

            GetPosDeviceRequest request = new GetPosDeviceRequest();

            request.DeviceId = id;
            DetailPosDevice_PosDeviceDetailView data = _posDeviceService.GetPosDevice(request).PosDevice.ConvertToDetailPosDevice_PosDeviceDetailView();

            return(Json(data, JsonRequestBehavior.AllowGet));
        }
示例#3
0
        public JsonResult GetDetail(System.Int32 id)
        {
            PosDeviceDetailView vm      = new PosDeviceDetailView();
            GetPosDeviceRequest request = new GetPosDeviceRequest();

            request.DeviceId = id;
            GetPosDeviceResponse response = _posDeviceService.GetPosDevice(request);

            if (response.PosDeviceFound)
            {
                vm = response.PosDevice.ConvertToPosDeviceDetailView();
            }

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