Esempio n. 1
0
        public async Task <DataPaging <List <RevokeDebtSearch> > > SearchAsync(
            DateTime?fromDate = null,
            DateTime?toDate   = null,
            int dateType      = 1,
            int groupId       = 0,
            int assigneeId    = 0,
            string status     = null,
            int processStatus = -1,
            string freeText   = null,
            int page          = 1,
            int limit         = 10
            )
        {
            fromDate = fromDate.HasValue ? fromDate.ToStartDateTime() : DateTime.Now.ToStartDateTime();
            toDate   = toDate.HasValue ? toDate.ToEndDateTime() : DateTime.Now.ToEndDateTime();
            var data = await _rpRevoke.SearchAsync(_process.User.Id, fromDate, toDate, dateType, groupId, assigneeId, status, processStatus, freeText, page, limit);

            if (data == null || !data.Any())
            {
                return(DataPaging.Create(null as List <RevokeDebtSearch>, 0));
            }
            var result = DataPaging.Create(data, data[0].TotalRecord);

            return(result);
        }
        public async Task <DataPaging <List <RevokeDebtSearch> > > SearchAsync(int userId, string freeText, string status, int page, int limit, int groupId = 0, int assigneeId = 0, DateTime?fromDate = null, DateTime?toDate = null, int loaiNgay = 1)
        {
            var data = await _rpRevokeDebt.SearchAsync(userId, freeText, status, page, limit, groupId, assigneeId, fromDate, toDate, loaiNgay);

            if (data == null || !data.Any())
            {
                return(DataPaging.Create(null as List <RevokeDebtSearch>, 0));
            }
            var result = DataPaging.Create(data, data[0].TotalRecord);

            return(result);
        }