Ejemplo n.º 1
0
        public DataTable ExecProcTable <T>(T entity, string procName, string appendSql)
        {
            Type type = entity.GetType();

            appendSql += DatabaseCommon.GetQueryWhereString <T>(entity, "T", type, null, true).ToString();
            return(db.ExecProcTable(procName, appendSql));
        }
Ejemplo n.º 2
0
        public DataTable FindView <T>(T entity, string querySql, string tablename, string orderField, bool isAsc, int pageSize, int pageIndex, out int total)
        {
            StringBuilder sb = new StringBuilder(querySql);

            sb.Append(" WHERE 1=1 ");
            return(FindTable(DatabaseCommon.GetQueryWhereString(entity, tablename, entity.GetType(), sb).ToString(), orderField, isAsc, pageSize, pageIndex, out total));
        }
Ejemplo n.º 3
0
        public DataTable FindView <T>(T entity, string querySql, string tablename)
        {
            StringBuilder sb = new StringBuilder(querySql);

            sb.Append(" WHERE 1=1 ");
            return(FindTable(DatabaseCommon.GetQueryWhereString(entity, tablename, entity.GetType(), sb).ToString()));
        }
Ejemplo n.º 4
0
        public DataTable FindFormatView <T>(T entity, string queryFormatSql, string tablename)
        {
            StringBuilder sb = new StringBuilder();

            sb.AppendFormat(DatabaseCommon.GetQueryWhereString(entity, tablename, entity.GetType(), sb).ToString());
            return(FindTable(string.Format(queryFormatSql, sb.ToString())));
        }
Ejemplo n.º 5
0
        public DataTable ExecProcTable <T>(T entity, string procName, Pagination pagination, string appendSql)
        {
            int  total = pagination.records;
            Type type  = entity.GetType();

            appendSql += DatabaseCommon.GetQueryWhereString <T>(entity, "T", type, null, true).ToString();
            var data = db.ExecProcTable(procName, pagination.sidx, pagination.sord.ToLower() == "asc" ? true : false, pagination.rows, pagination.page, out total, appendSql);

            pagination.records = total;
            return(data);
        }