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 GetDetail(System.Int32 id) { PosSimDetailView vm = new PosSimDetailView(); GetPosSimRequest request = new GetPosSimRequest(); request.SimId = id; GetPosSimResponse response = _posSimService.GetPosSim(request); if (response.PosSimFound) { vm = response.PosSim.ConvertToPosSimDetailView(); } return(Json(vm, JsonRequestBehavior.AllowGet)); }
public JsonResult Create(PosSimDetailView vm) { CreatePosSimRequest request = new CreatePosSimRequest(); request.SimCode = vm.SimCode; request.SimPhoneNumber = vm.SimPhoneNumber; GetPosStatusSimRequest posStatusSimRequest = new GetPosStatusSimRequest(); posStatusSimRequest.StatusId = vm.PosStatusSimStatusId; request.PosStatusSim = _posStatusSimService.GetPosStatusSim(posStatusSimRequest).PosStatusSim; request.AddedDate = vm.AddedDate; GetPosSimProviderRequest posSimProviderRequest = new GetPosSimProviderRequest(); posSimProviderRequest.SimProviderId = vm.PosSimProviderSimProviderId; request.PosSimProvider = _posSimProviderService.GetPosSimProvider(posSimProviderRequest).PosSimProvider; CreatePosSimResponse response = _posSimService.CreatePosSim(request); return(Json(response)); }