public async Task <IActionResult> Index()
        {
            var user    = (TokenUser)HttpContext.Items["User"];
            var tickets = await _ticketProxy.Get(user.Token, new TicketSearchParameters { ClientId = user.Id });

            var products = await _productProxy.Get(user.Token);

            return(View(new TicketCreateViewParameters
            {
                Tickets = tickets,
                ProductViewResult = products,
            }));
        }
        public async Task <IActionResult> Index()
        {
            var products = await _productProxy.Get();

            return(View(new ProductCreateViewParameters {
                Products = products,
            }));
        }
        public async Task <IActionResult> List()
        {
            var user = (TokenUser)HttpContext.Items["User"];

            var tickets = await _ticketProxy.Get();

            var staff = await _staffProxy.Get(user.Token);

            var products = await _productProxy.Get();

            return(View(new ListOfTicketsParameters
            {
                Tickets = tickets,
                Staff = staff,
                Products = products,
            }));
        }
Esempio n. 4
0
        public async Task <IActionResult> Detail(int id)
        {
            var result = await _productProxy.Get(id);

            return(View(result));
        }