public JsonResult Update(PosSimDetailView vm)
        {
            GetPosSimRequest request = new GetPosSimRequest();

            request.SimId = vm.SimId;

            ModifyPosSimRequest updateRequest = _posSimService.GetPosSim(request).PosSim.ConvertToModifyPosSimRequest();

            updateRequest.SimId          = vm.SimId;
            updateRequest.SimCode        = vm.SimCode;
            updateRequest.SimPhoneNumber = vm.SimPhoneNumber;
            GetPosStatusSimRequest posStatusSimRequest = new GetPosStatusSimRequest();

            posStatusSimRequest.StatusId = vm.PosStatusSimStatusId;
            updateRequest.PosStatusSim   = _posStatusSimService.GetPosStatusSim(posStatusSimRequest).PosStatusSim;
            updateRequest.AddedDate      = vm.AddedDate;
            GetPosSimProviderRequest posSimProviderRequest = new GetPosSimProviderRequest();

            posSimProviderRequest.SimProviderId = vm.PosSimProviderSimProviderId;
            updateRequest.PosSimProvider        = _posSimProviderService.GetPosSimProvider(posSimProviderRequest).PosSimProvider;

            ModifyPosSimResponse response = _posSimService.ModifyPosSim(updateRequest);

            return(Json(response));
        }
        public JsonResult GetPosStatusSim(System.Int32 id)
        {
            DataTableViewModel data1;

            GetPosStatusSimRequest request = new GetPosStatusSimRequest();

            request.StatusId = id;
            DetailPosStatusSim_PosStatusSimDetailView data = _posStatusSimService.GetPosStatusSim(request).PosStatusSim.ConvertToDetailPosStatusSim_PosStatusSimDetailView();

            return(Json(data, JsonRequestBehavior.AllowGet));
        }
Example #3
0
        public JsonResult GetDetail(System.Int32 id)
        {
            PosStatusSimDetailView vm      = new PosStatusSimDetailView();
            GetPosStatusSimRequest request = new GetPosStatusSimRequest();

            request.StatusId = id;
            GetPosStatusSimResponse response = _posStatusSimService.GetPosStatusSim(request);

            if (response.PosStatusSimFound)
            {
                vm = response.PosStatusSim.ConvertToPosStatusSimDetailView();
            }

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