Пример #1
0
        public List <Bookkeeping> GetBookkeeping(int pageIndex, int pageSize, BookkeepingFilter filter)
        {
            string countSql = "SELECT count(b.Id) from t_bookkeeping b JOIN t_user u ON b.CreaterId = u.Id";

            string querySql = "SELECT b.Id, Time, dvt. VALUE AS 'VoucherType', VoucherNum, Abstract, Amount, Direction, Balance, u.UserName AS 'CreaterName', b.CreateTime, AbandonReason,b.Status FROM t_bookkeeping b JOIN t_user u ON b.CreaterId = u.Id JOIN t_dictionary dvt ON b.VoucherType = dvt.Id";

            return(GetPagedData1 <Bookkeeping, BookkeepingFilter>(pageIndex, pageSize, countSql, querySql, filter));
        }
Пример #2
0
        public int GetBookkeepingCount(BookkeepingFilter filter)
        {
            string countSql = "SELECT count(b.Id) FROM t_bookkeeping b JOIN t_user u ON b.CreaterId = u.Id JOIN t_dictionary dvt ON b.VoucherType = dvt.Id";

            return(GetDataCount <BookkeepingFilter>(countSql, filter));
        }