| | |
| | | ResultDataEntity<SimCostView> data = new ResultDataEntity<SimCostView>(); |
| | | try |
| | | { |
| | | var codedata = (from e in _context.SysCodes |
| | | join c in _context.SysCodeDtls |
| | | on e.Id equals c.CodeId |
| | | where e.RecStatus == "A" |
| | | && c.RecStatus == "A" |
| | | && e.CodeTable == "t_sim_bind" |
| | | && e.CodeField == "cardpro" |
| | | select c).OrderBy(x => x.Sort).ToList(); |
| | | //var codedata = (from e in _context.SysCodes |
| | | // join c in _context.SysCodeDtls |
| | | // on e.Id equals c.CodeId |
| | | // where e.RecStatus == "A" |
| | | // && c.RecStatus == "A" |
| | | // && e.CodeTable == "t_sim_bind" |
| | | // && e.CodeField == "cardpro" |
| | | // select c).OrderBy(x => x.Sort).ToList(); |
| | | |
| | | var dt = _context.SimCostView.OrderByDescending(c => c.accounted_time).ToList(); |
| | | if (!string.IsNullOrEmpty(searchEntity.searchtime)) |
| | | { |
| | | //dt = dt.Where(c => c.simcard.Contains(searchEntity.simcard)).ToList(); |
| | | var times = searchEntity.searchtime.Split('|'); |
| | | if(times.Length==2) |
| | | { |
| | | DateTime d1 = DateTime.Parse(times[0]); |
| | | DateTime d2 = DateTime.Parse(times[1]); |
| | | dt = dt.Where(c => c.accounted_time > d1 && c.accounted_time < d2).ToList(); |
| | | } |
| | | } |
| | | if (!string.IsNullOrEmpty(searchEntity.searchsim)) |
| | | { |