Esempio n. 1
0
        public async Task <IReadOnlyList <Tasks> > GetAllAsync(Guid FkGroupTaskId)
        {
            var spec = new TasksSpecification();
            var data = await _repository.GetAllAsync(spec);

            return(data.Where(x => x.FkGroupTaskId == FkGroupTaskId).ToList());
        }
Esempio n. 2
0
        public async Task <DatatablesPagedResults <Tasks> > GetAsync(DataParameter param)
        {
            var spec   = new TasksSpecification();
            var source = await _repository.GetAllAsync(spec);

            return(await _repository.GetByPagingAsync(source, param.Start, param.Length));
        }
Esempio n. 3
0
        public async Task <IReadOnlyList <Select2Binding> > BindingSelect2Async()
        {
            var spec   = new TasksSpecification(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);
        }
Esempio n. 4
0
        public async Task <Select2Result> BindingSelect2Async(Guid id)
        {
            var spec = new TasksSpecification(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));
        }
Esempio n. 5
0
        public async Task <Tasks> GetAsync(Guid id)
        {
            var spec = new TasksSpecification();

            return(await _repository.GetAsync(spec, id));
        }
Esempio n. 6
0
        public async Task <IReadOnlyList <Tasks> > GetAllAsync()
        {
            var spec = new TasksSpecification();

            return(await _repository.GetAllAsync(spec));
        }
Esempio n. 7
0
        public async Task <DatatablesPagedResults <Tasks> > DatatablesAsync(DatatablesParameter param)
        {
            var spec = new TasksSpecification();

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