public JsonResult GetDetail(System.Int32 id)
        {
            PosReceiptOfTestingDetailView vm      = new PosReceiptOfTestingDetailView();
            GetPosReceiptOfTestingRequest request = new GetPosReceiptOfTestingRequest();

            request.ReceiptOfTestingId = id;
            GetPosReceiptOfTestingResponse response = _posReceiptOfTestingService.GetPosReceiptOfTesting(request);

            if (response.PosReceiptOfTestingFound)
            {
                vm = response.PosReceiptOfTesting.ConvertToPosReceiptOfTestingDetailView();
            }

            return(Json(vm, JsonRequestBehavior.AllowGet));
        }
        public GetPosReceiptOfTestingResponse GetPosReceiptOfTesting(GetPosReceiptOfTestingRequest request)
        {
            GetPosReceiptOfTestingResponse response = new GetPosReceiptOfTestingResponse();

            PosReceiptOfTesting posReceiptOfTesting = _posReceiptOfTestingRepository
                                                      .FindBy(request.ReceiptOfTestingId);

            if (posReceiptOfTesting != null)
            {
                response.PosReceiptOfTestingFound = true;
                response.PosReceiptOfTesting      = posReceiptOfTesting.ConvertToPosReceiptOfTestingView();
            }
            else
            {
                response.PosReceiptOfTestingFound = false;
            }


            return(response);
        }