Exemplo n.º 1
0
 public virtual ActionResult Read(DataSourceRequest request)
 {
     return(BuildReturn(CrudService.GetAll(), request, JsonRequestBehavior.AllowGet));
 }
Exemplo n.º 2
0
 // GET: BusinessTrips
 public IActionResult Index()
 {
     PrepareItemImages();
     return(ResolveIndexView(_service.GetAll()));
 }
Exemplo n.º 3
0
 public UserIndexModel(ICrudService <User> userService)
 {
     _userService = userService;
     _userService.Init(ModelTypes.User);
     Users = _userService.GetAll().Result;
 }
 public async Task <PagedDto <Dto, Model> > GetAll(int offset = 0, int pageSize = 10)
 {
     return(await _crudService.GetAll <Dto, Model>(offset, pageSize));
 }
Exemplo n.º 5
0
 public async Task <ActionResult <IEnumerable <Event> > > GetEvents()
 {
     return(await _eventsService.GetAll().ToListAsync());
 }
Exemplo n.º 6
0
 public Task <Book[]> GetAll()
 {
     return(_crudService.GetAll());
 }
Exemplo n.º 7
0
 public Task <RentOrder[]> GetAll()
 {
     return(_crudService.GetAll());
 }
Exemplo n.º 8
0
 public IActionResult GetConcerts() => Ok(service.GetAll().OrderBy(c => c.DateTime).ToList());
Exemplo n.º 9
0
 public async Task OnGetAsync()
 {
     Enrollments = await EnrollmentSevice.GetAll();
 }
Exemplo n.º 10
0
 public async Task <ActionResult <IEnumerable <User> > > GetUsers()
 {
     return(await _usersService.GetAll().ToListAsync());
 }
        public IActionResult GetAll()
        {
            var result = _Area_ReparacionServices.GetAll();

            return(Ok(result));
        }
 public ActionResult Index()
 {
     return(View(s.GetAll()));
 }
Exemplo n.º 13
0
        public IActionResult GetAll()
        {
            var result = _empleadoServices.GetAll();

            return(Ok(result));
        }
Exemplo n.º 14
0
 public IEnumerable <T2> GetAll() => _service.GetAll();
Exemplo n.º 15
0
 public async Task <ActionResult <IEnumerable <Role> > > GetRoles()
 {
     return(await _rolesService.GetAll().ToListAsync());
 }
 public async Task OnGetAsync()
 {
     Themes = await ThemeService.GetAll();
 }
 public static Task <IEnumerable <TSelect> > GetAllAsync <TEntity, TOptions, TSelect>(
     this ICrudService <TEntity, TOptions> service,
     Expression <Func <TEntity, TSelect> > select, object context = null)
     where TEntity : IEntity where TOptions : ICrudServiceOptions => Task.Run(() => service.GetAll(select,
                                                                                                   context == null
             ? DefaultCrudServiceOptions.Default <TOptions>()
                                                                                                   : DefaultCrudServiceOptions.FromContext <TOptions>(context)));
Exemplo n.º 18
0
 public Task <Customer[]> GetAll()
 {
     return(_crudService.GetAll());
 }
Exemplo n.º 19
0
 public IActionResult GetAteliers() => Ok(service.GetAll().OrderBy(a => a.Date).ToList());
Exemplo n.º 20
0
        public IActionResult GetAll()
        {
            var result = CitaServices.GetAll();

            return(Ok(result));
        }
Exemplo n.º 21
0
 public HttpResponseMessage GetItems()
 {
     return(CreateResponseBuilder().WithMethod(() => _itemService.GetAll()));
 }
Exemplo n.º 22
0
 public async Task <IActionResult> OnGetAsync()
 {
     Venues = new SelectList(await _venueService.GetAll(), nameof(Venue.VenueId), nameof(Venue.Name));
     return(Page());
 }
Exemplo n.º 23
0
        public IActionResult GetAll()
        {
            var result = MantenimientoService.GetAll();

            return(Ok(result));
        }
Exemplo n.º 24
0
 public List <DAL.Hotel> GetAllHotels()
 {
     return(_service.GetAll().ToList <DAL.Hotel>());
 }
Exemplo n.º 25
0
 public async Task OnGetAsync()
 {
     Features = await _featureService.GetAll();
 }
Exemplo n.º 26
0
 public async Task <ActionResult <IEnumerable <Admin> > > GetAdmins()
 {
     return(await _adminsService.GetAll().ToListAsync());
 }
Exemplo n.º 27
0
        public async Task <IActionResult> OnGetEditAsync(int rId)
        {
            if (_sessionService.GetUserId(HttpContext.Session) != null)
            {
                CurrentUser = await _userService.GetFromId((int)_sessionService.GetUserId(HttpContext.Session));
            }
            else
            {
                return(OnGetDeniedAsync());
            }

            if (_sessionService.GetConferenceId(HttpContext.Session) != null)
            {
                CurrentConference = await _conferenceService.GetFromId((int)_sessionService.GetConferenceId(HttpContext.Session));
            }
            else
            {
                return(RedirectToPage("/Index"));
            }

            UCBinding = _ucBindingService.GetAll().Result.FindAll(bind => bind.UserId.Equals(CurrentUser.UserId))
                        .Find(bind => bind.ConferenceId.Equals(CurrentConference.ConferenceId));

            if (UCBinding?.UserType != UserType.Admin && UCBinding?.UserType != UserType.SuperUser)
            {
                return(OnGetDeniedAsync());
            }

            RoomId = rId;
            Room   = await _roomService.GetFromId(rId);

            Events = _eventService.GetAll().Result.FindAll(e => e.RoomId.Equals(rId));
            Floors = await _floorService.GetAll();

            Features = await _featureService.GetAll();

            Rooms = await _roomService.GetAll();

            RoomFeatures = _roomFeatureService.GetAll().Result.FindAll(room => room.RoomId.Equals(Room.RoomId));

            foreach (RoomFeature rf in RoomFeatures)
            {
                Room.Features.Add(rf.FeatureId, true);
            }


            EventsInRoom = Room.RoomId != 0
                ? new List <Event>(Events.FindAll(e => e.RoomId.Equals(Room.RoomId)))
                : new List <Event>();

            SelectListFloors   = new SelectList(Floors.FindAll(f => f.VenueId.Equals(tempVenueId)), nameof(Floor.FloorId), nameof(Floor.Name));
            SelectListFeatures = new SelectList(Features, nameof(Feature.FeatureId), nameof(Feature.Name), RoomFeatures);

            foreach (var item in SelectListFeatures)
            {
                foreach (var rf in RoomFeatures)
                {
                    if (item.Value == rf.FeatureId.ToString())
                    {
                        item.Selected = true;
                        break;
                    }
                }
            }
            IsEditing = true;
            return(Page());
        }
Exemplo n.º 28
0
 public static IEnumerable <TSelect> GetAllRanged <TEntity, TOptions, TSelect>(
     this ICrudService <TEntity, TOptions> service, Expression <Func <TEntity, TSelect> > select,
     long skip, long take,
     Expression <Func <TEntity, object> > sortField = null, SortingOrder sortingOrder = SortingOrder.Ascending)
     where TEntity : IEntity where TOptions : IPagableCrudServiceOptionsAutomationSupport <TEntity> => service.GetAll(select,
                                                                                                                      DefaultCrudServiceOptions.FromPagingParameters <TEntity, TOptions>(sortField, sortingOrder, skip, take));
Exemplo n.º 29
0
        public IActionResult GetAll()
        {
            var result = FacturaService.GetAll();

            return(Ok(result));
        }