示例#1
0
        public ActionResult ViewComputer(long id)
        {
            var computerService = new ComputerService(AuthenticatedUser.SessionToken);
            var model           = computerService.GetComputer(id);

            return(View(model));
        }
        public async Task <ActionResult <Computer> > GetComputer(Guid id)
        {
            var result = await computerService.GetComputer(id);

            if (result == null)
            {
                return(NotFound());
            }

            return(result);
        }
示例#3
0
        public ActionResult EditComputer(long id)
        {
            var configurationService = new ConfigurationService(AuthenticatedUser.SessionToken);
            var filters = new List <FilterModel>();

            ViewBag.Districts = configurationService.GetDistrictPaginatedList(filters, FilterJoin.And, true, "BranchName", 1, 1000000).Models;

            var computerService = new ComputerService(AuthenticatedUser.SessionToken);
            var model           = computerService.GetComputer(id);

            return(View(model));
        }