public JsonResult GetPosMerchant(System.Int32 id)
        {
            DataTableViewModel data1;

            GetPosMerchantRequest request = new GetPosMerchantRequest();

            request.MerchantId = id;
            DetailPosMerchant_PosMerchantDetailView data = _posMerchantService.GetPosMerchant(request).PosMerchant.ConvertToDetailPosMerchant_PosMerchantDetailView();

            return(Json(data, JsonRequestBehavior.AllowGet));
        }
        public JsonResult GetDetail(System.Int32 id)
        {
            PosMerchantDetailView vm      = new PosMerchantDetailView();
            GetPosMerchantRequest request = new GetPosMerchantRequest();

            request.MerchantId = id;
            GetPosMerchantResponse response = _posMerchantService.GetPosMerchant(request);

            if (response.PosMerchantFound)
            {
                vm = response.PosMerchant.ConvertToPosMerchantDetailView();
            }

            return(Json(vm, JsonRequestBehavior.AllowGet));
        }
        public JsonResult Update(PosReceiptOfTestingDetailView vm)
        {
            GetPosReceiptOfTestingRequest request = new GetPosReceiptOfTestingRequest();

            request.ReceiptOfTestingId = vm.ReceiptOfTestingId;

            ModifyPosReceiptOfTestingRequest updateRequest = _posReceiptOfTestingService.GetPosReceiptOfTesting(request).PosReceiptOfTesting.ConvertToModifyPosReceiptOfTestingRequest();

            updateRequest.ReceiptOfTestingId = vm.ReceiptOfTestingId;
            updateRequest.TestDate           = vm.TestDate;
            GetPosMerchantRequest posMerchantRequest = new GetPosMerchantRequest();

            posMerchantRequest.MerchantId = vm.PosMerchantMerchantId;
            updateRequest.PosMerchant     = _posMerchantService.GetPosMerchant(posMerchantRequest).PosMerchant;
            updateRequest.AgentAName      = vm.AgentAName;
            updateRequest.AgentBName      = vm.AgentBName;
            updateRequest.PosId           = vm.PosId;

            ModifyPosReceiptOfTestingResponse response = _posReceiptOfTestingService.ModifyPosReceiptOfTesting(updateRequest);

            return(Json(response));
        }