예제 #1
0
        public async Task <DatatablesPagedResults <GroupTask> > GetAsync(DataParameter param)
        {
            var spec   = new GroupTaskSpecification();
            var source = await _repository.GetAllAsync(spec);

            return(await _repository.GetByPagingAsync(source, param.Start, param.Length));
        }
예제 #2
0
        public async Task <IReadOnlyList <Select2Binding> > BindingSelect2Async()
        {
            var spec   = new GroupTaskSpecification(true);
            var source = await _repository.GetAllAsync(spec);

            var result = source.Where(x => x.IsActive == true)
                         .Select(x => new Select2Binding
            {
                Id   = x.Id,
                Text = x.Name
            }).ToList();

            return(result);
        }
예제 #3
0
        public async Task <Select2Result> BindingSelect2Async(Guid id)
        {
            var spec = new GroupTaskSpecification(true);
            var data = await _repository.GetAsync(id);

            var text = string.Empty;

            if (data != null)
            {
                text = data.Name;
            }

            var source = await _repository.GetAllAsync(spec);

            var result = source.Where(x => x.IsActive == true)
                         .Select(x => new Select2Binding
            {
                Id   = x.Id,
                Text = x.Name
            }).ToList();

            return(result.BindingSelect2Edit(id, text));
        }
예제 #4
0
        public async Task <GroupTask> GetAsync(Guid id)
        {
            var spec = new GroupTaskSpecification();

            return(await _repository.GetAsync(spec, id));
        }
예제 #5
0
        public async Task <IReadOnlyList <GroupTask> > GetAllAsync()
        {
            var spec = new GroupTaskSpecification();

            return(await _repository.GetAllAsync(spec));
        }
예제 #6
0
        public async Task <DatatablesPagedResults <GroupTask> > DatatablesAsync(DatatablesParameter param)
        {
            var spec = new GroupTaskSpecification();

            return(await _repository.DatatablesAsync(param, spec));
        }