Ejemplo n.º 1
0
        public JsonResult GetDetail(System.Int32 id)
        {
            PosReceiptOfDeliveryDetailView vm      = new PosReceiptOfDeliveryDetailView();
            GetPosReceiptOfDeliveryRequest request = new GetPosReceiptOfDeliveryRequest();

            request.PosReceiptOfDeliveryId = id;
            GetPosReceiptOfDeliveryResponse response = _posReceiptOfDeliveryService.GetPosReceiptOfDelivery(request);

            if (response.PosReceiptOfDeliveryFound)
            {
                vm = response.PosReceiptOfDelivery.ConvertToPosReceiptOfDeliveryDetailView();
            }

            return(Json(vm, JsonRequestBehavior.AllowGet));
        }
Ejemplo n.º 2
0
        public GetPosReceiptOfDeliveryResponse GetPosReceiptOfDelivery(GetPosReceiptOfDeliveryRequest request)
        {
            GetPosReceiptOfDeliveryResponse response = new GetPosReceiptOfDeliveryResponse();

            PosReceiptOfDelivery posReceiptOfDelivery = _posReceiptOfDeliveryRepository
                                                        .FindBy(request.PosReceiptOfDeliveryId);

            if (posReceiptOfDelivery != null)
            {
                response.PosReceiptOfDeliveryFound = true;
                response.PosReceiptOfDelivery      = posReceiptOfDelivery.ConvertToPosReceiptOfDeliveryView();
            }
            else
            {
                response.PosReceiptOfDeliveryFound = false;
            }


            return(response);
        }