Exemplo n.º 1
0
        public async Task <DataTableOutDto> Select(DataTableInputDto dataTableInputDto, List <Filter> filters)
        {
            var result = (
                from teacher in _context.TeacherContext
                where teacher.use_yn == 1
                orderby teacher.name
                select new TeacherModel
            {
                teacher_seq = teacher.teacher_seq,
                name = teacher.name,
                email = teacher.email,
                phone = teacher.phone,
                address = teacher.address
            });

            foreach (var filter in filters)
            {
                if (filter.k == "name")
                {
                    result = result.Where(w => w.name.Contains(filter.v.Replace(" ", "")));
                }
            }

            var paging = await result.Skip((dataTableInputDto.pageNumber - 1) *dataTableInputDto.size).Take(dataTableInputDto.size).ToListAsync();

            DataTableOutDto dataTableOutDto = new DataTableOutDto();

            dataTableOutDto.pageNumber    = dataTableInputDto.pageNumber;
            dataTableOutDto.size          = dataTableInputDto.size;
            dataTableOutDto.data          = paging;
            dataTableOutDto.totalPages    = (result.Count() % dataTableInputDto.size) > 0 ? result.Count() / dataTableInputDto.size + 1 : result.Count() / dataTableInputDto.size;
            dataTableOutDto.totalElements = result.Count();

            return(dataTableOutDto);
        }
        public async Task <DataTableOutDto> Select(int class_seq, DataTableInputDto dataTableInputDto)
        {
            var result = (
                from cls in _context.ClassContext
                join order_item in _context.OrderItemContext on class_seq equals order_item.class_seq
                join order in _context.OrderContext on order_item.order_id equals order.order_id
                join user in _context.UserContext on order.order_user_seq equals user.user_seq
                where cls.class_seq == class_seq
                select new {
                order_id = order.order_id,
                order_user_seq = order.order_user_seq,
                name = user.name,
                order_date = order.order_date,
                order_type = order.order_type,
                order_price = order.order_price,
                address = order.address,
            });

            var paging = await result.Skip((dataTableInputDto.pageNumber - 1) *dataTableInputDto.size).Take(dataTableInputDto.size).ToListAsync();

            DataTableOutDto dataTableOutDto = new DataTableOutDto();

            dataTableOutDto.pageNumber    = dataTableInputDto.pageNumber;
            dataTableOutDto.size          = dataTableInputDto.size;
            dataTableOutDto.data          = paging;
            dataTableOutDto.totalPages    = (result.Count() % dataTableInputDto.size) > 0 ? result.Count() / dataTableInputDto.size + 1 : result.Count() / dataTableInputDto.size;
            dataTableOutDto.totalElements = result.Count();

            return(dataTableOutDto);
        }
Exemplo n.º 3
0
        public async Task <DataTableOutDto> Select(DataTableInputDto dataTableInputDto, List <Filter> filters)
        {
            var result = (
                from ord in _context.OrderContext
                select ord);

            foreach (var filter in filters)
            {
                if (filter.k == "order_type")
                {
                    result = result.Where(w => w.order_type.Contains(filter.v.Replace(" ", "")));
                }

                else if (filter.k == "address")
                {
                    result = result.Where(w => w.address.Contains(filter.v.Replace(" ", "")));
                }
            }

            result = result.OrderByDescending(o => o.order_id);

            var paging = await result.Skip((dataTableInputDto.pageNumber - 1) *dataTableInputDto.size).Take(dataTableInputDto.size).ToListAsync();

            DataTableOutDto dataTableOutDto = new DataTableOutDto();

            dataTableOutDto.pageNumber    = dataTableInputDto.pageNumber;
            dataTableOutDto.size          = dataTableInputDto.size;
            dataTableOutDto.data          = paging;
            dataTableOutDto.totalPages    = (result.Count() % dataTableInputDto.size) > 0 ? result.Count() / dataTableInputDto.size + 1 : result.Count() / dataTableInputDto.size;
            dataTableOutDto.totalElements = result.Count();

            return(dataTableOutDto);
        }
Exemplo n.º 4
0
        public async Task <DataTableOutDto> Select(DataTableInputDto dataTableInputDto, List <Filter> filters)
        {
            var result = (
                from user in _context.UserContext
                select user);

            foreach (var filter in filters)
            {
                if (filter.k == "name")
                {
                    result = result.Where(w => w.name.Contains(filter.v.Replace(" ", "")));
                }

                else if (filter.k == "email")
                {
                    result = result.Where(w => w.email.Contains(filter.v.Replace(" ", "")));
                }
            }

            var paging = await result.Skip((dataTableInputDto.pageNumber - 1) *dataTableInputDto.size).Take(dataTableInputDto.size).ToListAsync();

            DataTableOutDto dataTableOutDto = new DataTableOutDto();

            dataTableOutDto.pageNumber    = dataTableInputDto.pageNumber;
            dataTableOutDto.size          = dataTableInputDto.size;
            dataTableOutDto.data          = paging;
            dataTableOutDto.totalPages    = (result.Count() % dataTableInputDto.size) > 0 ? result.Count() / dataTableInputDto.size + 1 : result.Count() / dataTableInputDto.size;
            dataTableOutDto.totalElements = result.Count();

            return(dataTableOutDto);
        }
Exemplo n.º 5
0
        public async Task <ActionResult <DataTableOutDto> > Review(int size, int pageNumber)
        {
            DataTableInputDto dataTableInputDto = new DataTableInputDto();

            dataTableInputDto.size       = size;
            dataTableInputDto.pageNumber = pageNumber;

            return(await _wpBoard.SelectReview(dataTableInputDto));
        }
        public async Task <ActionResult <DataTableOutDto> > GetFamily(int size, int pageNumber)
        {
            DataTableInputDto dataTableInputDto = new DataTableInputDto();

            dataTableInputDto.size       = size;
            dataTableInputDto.pageNumber = pageNumber;

            return(await _incamAddfare.SelectFamily(dataTableInputDto, int.Parse(User.Identity.Name)));
        }
        public async Task <ActionResult <DataTableOutDto> > Get(int size, int pageNumber)
        {
            DataTableInputDto dataTableInputDto = new DataTableInputDto();

            dataTableInputDto.size       = size;
            dataTableInputDto.pageNumber = pageNumber;

            return(await _finWork.Select(dataTableInputDto));
        }
Exemplo n.º 8
0
        public async Task <ActionResult <DataTableOutDto> > Get(int size, int pageNumber, String search)
        {
            DataTableInputDto dataTableInputDto = new DataTableInputDto();

            dataTableInputDto.size       = size;
            dataTableInputDto.pageNumber = pageNumber;

            return(await _codegroup.Select(dataTableInputDto));
        }
Exemplo n.º 9
0
        public async Task <ActionResult <DataTableOutDto> > Get(int class_seq, int size, int pageNumber)
        {
            DataTableInputDto dataTableInputDto = new DataTableInputDto();

            dataTableInputDto.size       = size;
            dataTableInputDto.pageNumber = pageNumber;

            return(await _class_notice.Select(class_seq, dataTableInputDto));
        }
        public async Task <ActionResult <DataTableOutDto> > Get([FromQuery(Name = "f")] string f, int size, int pageNumber)
        {
            var filters = JsonConvert.DeserializeObject <List <Filter> >(f);
            DataTableInputDto dataTableInputDto = new DataTableInputDto();

            dataTableInputDto.size       = size;
            dataTableInputDto.pageNumber = pageNumber;

            return(await _incamContract.Select(dataTableInputDto, filters));
        }
Exemplo n.º 11
0
        public async Task <ActionResult <DataTableOutDto> > Get(String codegroup_id, int size, int pageNumber)
        {
            DataTableInputDto dataTableInputDto = new DataTableInputDto();

            dataTableInputDto.size         = size;
            dataTableInputDto.pageNumber   = pageNumber;
            dataTableInputDto.codegroup_id = codegroup_id;

            return(await _code.Select(dataTableInputDto));
        }
        public async Task <ActionResult <DataTableOutDto> > Get(int class_seq, int size, int pageNumber)
        {
            DataTableInputDto dataTableInputDto = new DataTableInputDto();

            dataTableInputDto.size       = size;
            dataTableInputDto.pageNumber = pageNumber;
            dataTableInputDto.class_seq  = class_seq;

            return(await _curriculumgroup.Select(dataTableInputDto));
        }
Exemplo n.º 13
0
        public async Task <ActionResult <DataTableOutDto> > Get(int size, int pageNumber)
        {
            List <Filter> filters = new List <Filter>();

            DataTableInputDto dataTableInputDto = new DataTableInputDto();

            dataTableInputDto.size       = size;
            dataTableInputDto.pageNumber = pageNumber;

            return(await _order.Select(dataTableInputDto, filters));
        }
        public async Task <DataTableOutDto> SelectFamily(DataTableInputDto dataTableInputDto, int teacher_seq)
        {
            var result = (
                from addfare in _context.IncamAddfareContext
                join contract in _context.IncamContractContext
                on addfare.contract_seq equals contract.contract_seq
                join teacher in _context.TeacherContext
                on contract.teacher_seq equals teacher.teacher_seq
                join company in _context.CodeContext
                on contract.original_company equals company.code_id
                join incom in _context.CodeContext
                on addfare.income_type equals incom.code_id
                where company.codegroup_id == "cooperative"
                where incom.codegroup_id == "incom"
                where addfare.use_yn == 1
                where teacher.teacher_seq == teacher_seq
                orderby addfare.addfare_seq descending
                select new IncamAddfareModel
            {
                addfare_seq = addfare.addfare_seq,
                contract_seq = addfare.contract_seq,
                hour = addfare.hour,
                addfare_date = addfare.addfare_date,
                income_type = addfare.income_type,
                income_type_nm = incom.code_nm,
                income = addfare.income,
                original_company_nm = company.code_nm,
                @class = contract.@class,
                hour_price = contract.hour_price,
                hour_incen = contract.hour_incen,
                contract_price = contract.contract_price,
                name = teacher.name,
                teacher_seq = teacher.teacher_seq,
                check_yn = addfare.check_yn
            });

            var paging = await result.Skip((dataTableInputDto.pageNumber - 1) *dataTableInputDto.size).Take(dataTableInputDto.size).ToListAsync();

            DataTableOutDto dataTableOutDto = new DataTableOutDto();

            dataTableOutDto.pageNumber    = dataTableInputDto.pageNumber;
            dataTableOutDto.size          = dataTableInputDto.size;
            dataTableOutDto.data          = paging;
            dataTableOutDto.totalPages    = (result.Count() % dataTableInputDto.size) > 0 ? result.Count() / dataTableInputDto.size + 1 : result.Count() / dataTableInputDto.size;
            dataTableOutDto.totalElements = result.Count();

            return(dataTableOutDto);
        }
        public async Task <DataTableOutDto> Select(DataTableInputDto dataTableInputDto)
        {
            var result = (
                from class_notice in _context.ClassNoticeContext
                select class_notice);

            var paging = await result.Skip((dataTableInputDto.pageNumber - 1) *dataTableInputDto.size).Take(dataTableInputDto.size).ToListAsync();

            DataTableOutDto dataTableOutDto = new DataTableOutDto();

            dataTableOutDto.pageNumber    = dataTableInputDto.pageNumber;
            dataTableOutDto.size          = dataTableInputDto.size;
            dataTableOutDto.data          = paging;
            dataTableOutDto.totalPages    = (result.Count() % dataTableInputDto.size) > 0 ? result.Count() / dataTableInputDto.size + 1 : result.Count() / dataTableInputDto.size;
            dataTableOutDto.totalElements = result.Count();

            return(dataTableOutDto);
        }
        public async Task <DataTableOutDto> Select(DataTableInputDto dataTableInputDto)
        {
            var result = (
                from board in _context.CommunityContext
                orderby board.board_seq descending
                select board);

            var paging = await result.Skip((dataTableInputDto.pageNumber - 1) *dataTableInputDto.size).Take(dataTableInputDto.size).ToListAsync();

            DataTableOutDto dataTableOutDto = new DataTableOutDto();

            dataTableOutDto.pageNumber    = dataTableInputDto.pageNumber;
            dataTableOutDto.size          = dataTableInputDto.size;
            dataTableOutDto.data          = paging;
            dataTableOutDto.totalPages    = (result.Count() % dataTableInputDto.size) > 0 ? result.Count() / dataTableInputDto.size + 1 : result.Count() / dataTableInputDto.size;
            dataTableOutDto.totalElements = result.Count();

            return(dataTableOutDto);
        }
        public async Task <DataTableOutDto> Select(DataTableInputDto dataTableInputDto)
        {
            var result = (
                from codegroup in _context.CodegroupContext
                select codegroup);

            result = result.OrderByDescending(o => o.reg_dt);

            var paging = await result.Skip((dataTableInputDto.pageNumber - 1) *dataTableInputDto.size).Take(dataTableInputDto.size).ToListAsync();

            DataTableOutDto dataTableOutDto = new DataTableOutDto();

            dataTableOutDto.pageNumber    = dataTableInputDto.pageNumber;
            dataTableOutDto.size          = dataTableInputDto.size;
            dataTableOutDto.data          = paging;
            dataTableOutDto.totalPages    = (result.Count() % dataTableInputDto.size) > 0 ? result.Count() / dataTableInputDto.size + 1 : result.Count() / dataTableInputDto.size;
            dataTableOutDto.totalElements = result.Count();

            return(dataTableOutDto);
        }
        public async Task <DataTableOutDto> Select(DataTableInputDto dataTableInputDto, int class_seq)
        {
            var result = (
                from class_qna in _context.ClassQnaContext
                where class_qna.class_seq == class_seq
                orderby class_qna.reg_dt descending
                select class_qna);

            var paging = await result.Skip((dataTableInputDto.pageNumber - 1) *dataTableInputDto.size).Take(dataTableInputDto.size).ToListAsync();

            DataTableOutDto dataTableOutDto = new DataTableOutDto();

            dataTableOutDto.pageNumber    = dataTableInputDto.pageNumber;
            dataTableOutDto.size          = dataTableInputDto.size;
            dataTableOutDto.data          = paging;
            dataTableOutDto.totalPages    = (result.Count() % dataTableInputDto.size) > 0 ? result.Count() / dataTableInputDto.size + 1 : result.Count() / dataTableInputDto.size;
            dataTableOutDto.totalElements = result.Count();

            return(dataTableOutDto);
        }
Exemplo n.º 19
0
        public async Task <DataTableOutDto> Select(DataTableInputDto dataTableInputDto)
        {
            var result = (
                from code in _context.CodeContext
                where code.codegroup_id == dataTableInputDto.codegroup_id
                select code);

            result = result.OrderBy(o => o.order_num);

            var paging = await result.Skip((dataTableInputDto.pageNumber - 1) *dataTableInputDto.size).Take(dataTableInputDto.size).ToListAsync();

            DataTableOutDto dataTableOutDto = new DataTableOutDto();

            dataTableOutDto.pageNumber    = dataTableInputDto.pageNumber;
            dataTableOutDto.size          = dataTableInputDto.size;
            dataTableOutDto.data          = paging;
            dataTableOutDto.totalPages    = (result.Count() % dataTableInputDto.size) > 0 ? result.Count() / dataTableInputDto.size + 1 : result.Count() / dataTableInputDto.size;
            dataTableOutDto.totalElements = result.Count();

            return(dataTableOutDto);
        }
        public async Task <DataTableOutDto> Select(DataTableInputDto dataTableInputDto)
        {
            var result = (
                from emaillog in _context.EmailLogContext
                where emaillog.use_yn == 1
                select emaillog);

            // result = result.OrderByDescending(o => o.reg_dt);

            var paging = await result.Skip((dataTableInputDto.pageNumber - 1) *dataTableInputDto.size).Take(dataTableInputDto.size).ToListAsync();

            DataTableOutDto dataTableOutDto = new DataTableOutDto();

            dataTableOutDto.pageNumber    = dataTableInputDto.pageNumber;
            dataTableOutDto.size          = dataTableInputDto.size;
            dataTableOutDto.data          = paging;
            dataTableOutDto.totalPages    = (result.Count() % dataTableInputDto.size) > 0 ? result.Count() / dataTableInputDto.size + 1 : result.Count() / dataTableInputDto.size;
            dataTableOutDto.totalElements = result.Count();

            return(dataTableOutDto);
        }
        public async Task <DataTableOutDto> Select(DataTableInputDto dataTableInputDto)
        {
            var result = (
                from class_review in _context.ClassReviewContext
                where class_review.class_seq == dataTableInputDto.class_seq
                select class_review);

            result = result.OrderByDescending(o => o.class_review_seq);

            var paging = await result.Skip((dataTableInputDto.pageNumber - 1) *dataTableInputDto.size).Take(dataTableInputDto.size).ToListAsync();

            DataTableOutDto dataTableOutDto = new DataTableOutDto();

            dataTableOutDto.pageNumber    = dataTableInputDto.pageNumber;
            dataTableOutDto.size          = dataTableInputDto.size;
            dataTableOutDto.data          = paging;
            dataTableOutDto.totalPages    = (result.Count() % dataTableInputDto.size) > 0 ? result.Count() / dataTableInputDto.size + 1 : result.Count() / dataTableInputDto.size;
            dataTableOutDto.totalElements = result.Count();

            return(dataTableOutDto);
        }
        public async Task <DataTableOutDto> SelectReview(DataTableInputDto dataTableInputDto)
        {
            string sql = @"
                SELECT uid, title, category1, category2, date
                  FROM insightcampus.wp_kboard_board_content
                 WHERE category1 = '수강생후기'
              ORDER BY uid DESC
            ";

            var result = _context.WPBoardNoticeModel.FromSql(sql);

            var paging = await result.Skip((dataTableInputDto.pageNumber - 1) *dataTableInputDto.size).Take(dataTableInputDto.size).ToListAsync();

            DataTableOutDto dataTableOutDto = new DataTableOutDto();

            dataTableOutDto.pageNumber    = dataTableInputDto.pageNumber;
            dataTableOutDto.size          = dataTableInputDto.size;
            dataTableOutDto.data          = paging;
            dataTableOutDto.totalPages    = (result.Count() % dataTableInputDto.size) > 0 ? result.Count() / dataTableInputDto.size + 1 : result.Count() / dataTableInputDto.size;
            dataTableOutDto.totalElements = result.Count();

            return(dataTableOutDto);
        }
Exemplo n.º 23
0
        public async Task <DataTableOutDto> Select(DataTableInputDto dataTableInputDto, List <Filter> filters)
        {
            var result = (
                from cls in _context.ClassContext
                join teacher in _context.TeacherContext
                on cls.teacher equals teacher.teacher_seq into _t
                from teacher in _t.DefaultIfEmpty()
                join category in _context.CategoryContext
                on cls.category equals category.category_seq into _c
                from category in _c.DefaultIfEmpty()
                orderby cls.class_seq descending
                select new ClassModel
            {
                class_seq = cls.class_seq,
                class_nm = cls.class_nm,
                teacher = cls.teacher,
                category = cls.category,
                start_date = cls.start_date,
                end_date = cls.end_date,
                duration_nm = cls.duration_nm,
                thumbnail = cls.thumbnail,
                online_yn = cls.online_yn,
                price = cls.price,
                real_price = cls.real_price,
                template = cls.template,
                zoom_link = cls.zoom_link,
                zoom_pw = cls.zoom_pw,
                view_yn = cls.view_yn,
                status = cls.status,
                teacher_name = teacher.name,
                category_name = category.category_nm,
                survey_url = cls.survey_url,
            }
                );

            // result = result.OrderByDescending(o => o.reg_dt);



            foreach (var filter in filters)
            {
                if (filter.k == "class_nm")
                {
                    result = result.Where(w => w.class_nm.Contains(filter.v.Replace(" ", "")));
                }

                else if (filter.k == "teacher")
                {
                    result = result.Where(w => w.teacher_name.Contains(filter.v.Replace(" ", "")));
                }

                else if (filter.k == "online_yn")
                {
                    result = result.Where(w => w.online_yn == Convert.ToInt16(filter.v));
                }
            }

            var paging = await result.Skip((dataTableInputDto.pageNumber - 1) *dataTableInputDto.size).Take(dataTableInputDto.size).ToListAsync();

            DataTableOutDto dataTableOutDto = new DataTableOutDto();

            dataTableOutDto.pageNumber    = dataTableInputDto.pageNumber;
            dataTableOutDto.size          = dataTableInputDto.size;
            dataTableOutDto.data          = paging;
            dataTableOutDto.totalPages    = (result.Count() % dataTableInputDto.size) > 0 ? result.Count() / dataTableInputDto.size + 1 : result.Count() / dataTableInputDto.size;
            dataTableOutDto.totalElements = result.Count();

            return(dataTableOutDto);
        }
Exemplo n.º 24
0
        public async Task <DataTableOutDto> Select(DataTableInputDto dataTableInputDto, List <Filter> filters)
        {
            var result = (
                from contract in _context.IncamContractContext
                join company in _context.CodeContext
                on contract.original_company equals company.code_id
                join teacher in _context.TeacherContext
                on contract.teacher_seq equals teacher.teacher_seq
                where company.codegroup_id == "cooperative"
                where contract.use_yn == 1
                orderby contract.contract_seq descending
                select new IncamContractModel
            {
                contract_seq = contract.contract_seq,
                teacher_seq = contract.teacher_seq,
                @class = contract.@class,
                original_company = contract.original_company,
                original_company_nm = company.code_nm,
                hour_price = contract.hour_price,
                hour_incen = contract.hour_incen,
                contract_price = contract.contract_price,
                contract_start_date = contract.contract_start_date,
                contract_end_date = contract.contract_end_date,
                name = teacher.name
            });

            foreach (var filter in filters)
            {
                if (filter.k == "name")
                {
                    result = result.Where(w => w.name.Contains(filter.v.Replace(" ", "")));
                }

                else if (filter.k == "company")
                {
                    result = result.Where(w => w.original_company_nm.Contains(filter.v.Replace(" ", "")));
                }

                else if (filter.k == "class")
                {
                    result = result.Where(w => [email protected](filter.v.Replace(" ", "")));
                }

                else if (filter.k == "start_date")
                {
                    result = result.Where(w => w.contract_start_date >= Convert.ToDateTime(filter.v));
                }

                else if (filter.k == "end_date")
                {
                    result = result.Where(w => w.contract_end_date <= Convert.ToDateTime(filter.v));
                }
            }

            var paging = await result.Skip((dataTableInputDto.pageNumber - 1) *dataTableInputDto.size).Take(dataTableInputDto.size).ToListAsync();

            DataTableOutDto dataTableOutDto = new DataTableOutDto();

            dataTableOutDto.pageNumber    = dataTableInputDto.pageNumber;
            dataTableOutDto.size          = dataTableInputDto.size;
            dataTableOutDto.data          = paging;
            dataTableOutDto.totalPages    = (result.Count() % dataTableInputDto.size) > 0 ? result.Count() / dataTableInputDto.size + 1 : result.Count() / dataTableInputDto.size;
            dataTableOutDto.totalElements = result.Count();

            return(dataTableOutDto);
        }
        public async Task <DataTableOutDto> Select(DataTableInputDto dataTableInputDto, List <Filter> filters)
        {
            var result = (
                from addfare in _context.IncamAddfareContext
                join contract in _context.IncamContractContext
                on addfare.contract_seq equals contract.contract_seq
                join teacher in _context.TeacherContext
                on contract.teacher_seq equals teacher.teacher_seq
                join company in _context.CodeContext
                on contract.original_company equals company.code_id
                join incom in _context.CodeContext
                on addfare.income_type equals incom.code_id
                join evidence in _context.CodeContext
                on new { type = addfare.evidence_type, codegroup_id = "evidence_type" } equals new { type = evidence.code_id, codegroup_id = evidence.codegroup_id } into _t
                from evidence in _t.DefaultIfEmpty()
                where company.codegroup_id == "cooperative"
                where incom.codegroup_id == "incom"
                where addfare.use_yn == 1
                orderby addfare.addfare_seq descending
                select new IncamAddfareModel
            {
                addfare_seq = addfare.addfare_seq,
                contract_seq = addfare.contract_seq,
                hour = addfare.hour,
                addfare_date = addfare.addfare_date,
                income_type = addfare.income_type,
                evidence_type = addfare.evidence_type,
                income_type_nm = incom.code_nm,
                income = addfare.income,
                original_company_nm = company.code_nm,
                @class = contract.@class,
                hour_price = contract.hour_price,
                hour_incen = contract.hour_incen,
                contract_price = contract.contract_price,
                name = teacher.name,
                teacher_seq = teacher.teacher_seq,
                check_yn = addfare.check_yn,
                evidence_type_nm = evidence.code_nm
            });



            foreach (var filter in filters)
            {
                if (filter.k == "name")
                {
                    result = result.Where(w => w.name.Contains(filter.v.Replace(" ", "")));
                }

                else if (filter.k == "company")
                {
                    result = result.Where(w => w.original_company_nm.Contains(filter.v.Replace(" ", "")));
                }

                else if (filter.k == "class")
                {
                    result = result.Where(w => [email protected](filter.v.Replace(" ", "")));
                }

                else if (filter.k == "start_date")
                {
                    result = result.Where(w => w.addfare_date >= Convert.ToDateTime(filter.v));
                }

                else if (filter.k == "end_date")
                {
                    result = result.Where(w => w.addfare_date <= Convert.ToDateTime(filter.v));
                }

                else if (filter.k == "deposit")
                {
                    result = result.Where(w => w.check_yn == Convert.ToInt16(filter.v));
                }
                else if (filter.k == "evidenceType")
                {
                    if (filter.v == "00")
                    {
                        result = result.Where(w => w.evidence_type == null);
                    }
                    else
                    {
                        result = result.Where(w => w.evidence_type == filter.v);
                    }
                }
            }

            var paging = await result.Skip((dataTableInputDto.pageNumber - 1) *dataTableInputDto.size).Take(dataTableInputDto.size).ToListAsync();

            DataTableOutDto dataTableOutDto = new DataTableOutDto();

            dataTableOutDto.pageNumber    = dataTableInputDto.pageNumber;
            dataTableOutDto.size          = dataTableInputDto.size;
            dataTableOutDto.data          = paging;
            dataTableOutDto.totalPages    = (result.Count() % dataTableInputDto.size) > 0 ? result.Count() / dataTableInputDto.size + 1 : result.Count() / dataTableInputDto.size;
            dataTableOutDto.totalElements = result.Count();

            return(dataTableOutDto);
        }