Example #1
0
        public override IEnumerable <K> List <K>(KeyDto dto, Orderby orderby = null)
        {
            if (orderby == null)
            {
                orderby = new Orderby();
            }
            var sql = @"SELECT [id],[qty],[key],[file],[create_time] FROM [doc_key] a " + orderby.GenerateOrderBy("a.");

            return(Query <K>(sql, dto));
        }
Example #2
0
        public override IEnumerable <K> List <K>(TagDto dto, Orderby orderby = null)
        {
            if (orderby == null)
            {
                orderby = new Orderby();
            }
            var sql = @"SELECT [id],[qty],[names],[update_time],[create_time] FROM[tag] a " + orderby.GenerateOrderBy("a.");

            return(Query <K>(sql, dto));
        }
Example #3
0
        public override System.Collections.Generic.IEnumerable <K> List <K>(DictDto dto, Orderby orderby = null)
        {
            if (orderby == null)
            {
                orderby = new Orderby();
            }
            var sql = $"SELECT a.[id],a.[key],a.[text],a.[tips],a.[create_time] FROM [sys_dict] a WHERE a.[cat] = '{dto.cat}'";

            return(Query <K>(sql, dto));
        }
Example #4
0
        public override IEnumerable <K> List <K>(RuleDto dto, Orderby orderby = null)
        {
            if (orderby == null)
            {
                orderby = new Orderby();
            }
            var sql = @"SELECT a.[id], a.[name], a.[method], a.[src_file], a.[src_path], a.[dst_path], a.[dst_file], a.[repeat], a.[remark], a.[update_time], a.[create_time] FROM [fms_rule] a WHERE a.[status] = 1";

            return(Query <K>(sql, dto));
        }
Example #5
0
        public override IEnumerable <K> List <K>(DocDto dto, Orderby orderby = null)
        {
            if (orderby == null)
            {
                orderby = new Orderby();
            }
            var sql = @"SELECT a.[id], a.[pid], a.[key], a.[types], a.[modes], a.[names], a.[path], a.[remark], a.[file_type], a.[file_date], a.[file_time], a.[update_time], a.[create_time] FROM[doc] a WHERE a.[pid] = @id AND a.[types] = @types";

            sql += orderby.GenerateOrderBy("a.");
            return(Query <K>(sql, dto));
        }
Example #6
0
        public override IEnumerable <K> List <K>(DocTagDto dto, Orderby orderby = null)
        {
            if (orderby == null)
            {
                orderby = new Orderby();
            }
            var sql = $"select a.[id],a.[tag_id],a.[doc_id],a.[update_time],a.[create_time] from [tag_doc] a where a.[doc_id] = {dto.id}";

            //sql += orderby.GenerateOrderBy("a.");
            return(Query <K>(sql, dto));
        }
Example #7
0
        public IEnumerable <DocImgDto> ListDir(DocDto dto, Orderby orderby = null)
        {
            if (orderby == null)
            {
                orderby = new Orderby();
            }
            var sql = @"SELECT a.[id], a.[pid], a.[key], a.[types], a.[modes], a.[names], a.[path], a.[remark], a.[update_time], a.[create_time] FROM[doc] a WHERE a.[pid] = @id AND a.[types] = @types";

            sql += " AND a.[modes] = " + DocDto.MODE_10_CODE;
            sql += orderby.GenerateOrderBy("a.");
            return(Query <DocImgDto>(sql, dto));
        }
Example #8
0
 /// <summary>
 /// 查询列表
 /// </summary>
 /// <param name="dto"></param>
 /// <param name="orderby"></param>
 /// <returns></returns>
 public abstract IEnumerable <K> List <K>(T dto, Orderby orderby = null);