예제 #1
0
        // GET: Admin/Blogpost/Create
        public ActionResult Create()
        {
            var viewModel = new BlogpostViewModel
            {
                ServicesSelectList = Mapper.Map <List <Service>, List <SelectListItem> >(_serviceService.GetAll()),
                PublishedDate      = DateTime.Now
            };

            AddLocales(viewModel.Locales, (locale, languageId) => { });

            return(View(viewModel));
        }
예제 #2
0
        public IActionResult GetAll(int page = 1)
        {
            var serviceShortViewModel = _mapper.Map <IEnumerable <Service>, IEnumerable <ServiceShortViewModel> >(_serviceService.GetAll());
            var model = PagingList.Create(serviceShortViewModel, 5, page);

            return(View(model));
        }
예제 #3
0
        // GET: Admin/Project/Create
        public ActionResult Create()
        {
            var viewModel = new ProjectViewModel
            {
                ClientsSelectList = Mapper.Map <List <Client>, List <SelectListItem> >(_clientService.GetAll()),
                StartDate         = DateTime.Now,
                EndDate           = DateTime.Now
            };

            viewModel.TechnologiesSelectList = Mapper.Map <List <Technology>, List <SelectListItem> >(_technologyService.GetAll());
            viewModel.ContributorsSelectList = Mapper.Map <List <User>, List <SelectListItem> >(_userService.GetAll());
            viewModel.ServicesSelectList     = Mapper.Map <List <Service>, List <SelectListItem> >(_serviceService.GetAll());

            AddLocales(viewModel.Locales, (locale, languageId) => { });

            return(View(viewModel));
        }
        public IActionResult GetAll(int pageNum)
        {
            var result = _ServiceService.GetAll(pageNum);

            return(Ok(GetResponse("Done", result)));
        }
예제 #5
0
 public IList <Model.Service> GetAll()
 {
     return(_service.GetAll());
 }
예제 #6
0
 public async Task <List <ServiceResponse> > GetAll(
     string name = null, [FromQuery(Name = "last_ts")] DateTime?lastTimestamp = null
     )
 {
     return(await _serviceService.GetAll(name, lastTimestamp));
 }
예제 #7
0
 public Task <IEnumerable <ServiceDTO> > GetAll()
 {
     return(_serviceService.GetAll());
 }
예제 #8
0
        public IActionResult GetAll()
        {
            var users = _ServiceService.GetAll();

            return(Ok(users));
        }