Example #1
0
 public virtual ActionResult Read(DataSourceRequest request)
 {
     return(BuildReturn(CrudService.GetAll(), request, JsonRequestBehavior.AllowGet));
 }
Example #2
0
 // GET: BusinessTrips
 public IActionResult Index()
 {
     PrepareItemImages();
     return(ResolveIndexView(_service.GetAll()));
 }
Example #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));
 }
Example #5
0
 public async Task <ActionResult <IEnumerable <Event> > > GetEvents()
 {
     return(await _eventsService.GetAll().ToListAsync());
 }
Example #6
0
 public Task <Book[]> GetAll()
 {
     return(_crudService.GetAll());
 }
 public Task <RentOrder[]> GetAll()
 {
     return(_crudService.GetAll());
 }
Example #8
0
 public IActionResult GetConcerts() => Ok(service.GetAll().OrderBy(c => c.DateTime).ToList());
Example #9
0
 public async Task OnGetAsync()
 {
     Enrollments = await EnrollmentSevice.GetAll();
 }
Example #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()));
 }
Example #13
0
        public IActionResult GetAll()
        {
            var result = _empleadoServices.GetAll();

            return(Ok(result));
        }
Example #14
0
 public IEnumerable <T2> GetAll() => _service.GetAll();
Example #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)));
 public Task <Customer[]> GetAll()
 {
     return(_crudService.GetAll());
 }
Example #19
0
 public IActionResult GetAteliers() => Ok(service.GetAll().OrderBy(a => a.Date).ToList());
Example #20
0
        public IActionResult GetAll()
        {
            var result = CitaServices.GetAll();

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

            return(Ok(result));
        }
Example #24
0
 public List <DAL.Hotel> GetAllHotels()
 {
     return(_service.GetAll().ToList <DAL.Hotel>());
 }
 public async Task OnGetAsync()
 {
     Features = await _featureService.GetAll();
 }
Example #26
0
 public async Task <ActionResult <IEnumerable <Admin> > > GetAdmins()
 {
     return(await _adminsService.GetAll().ToListAsync());
 }
Example #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());
        }
 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));
Example #29
0
        public IActionResult GetAll()
        {
            var result = FacturaService.GetAll();

            return(Ok(result));
        }