| | |
| | | DateTime st = DateTime.Now.AddDays(1 - DateTime.Now.Day).Date; |
| | | DateTime et = DateTime.Now.AddDays(1 - DateTime.Now.Day).Date.AddMonths(1).AddSeconds(-1); |
| | | int month = 0; |
| | | if (!string.IsNullOrEmpty(searchEntity.searchDate)) |
| | | if (!string.IsNullOrEmpty(searchEntity.searchDatestart)) |
| | | { |
| | | var times = searchEntity.searchDate.Split('|'); |
| | | if (times.Length == 2) |
| | | { |
| | | st = DateTime.Parse(times[0]); |
| | | et= DateTime.Parse(times[1]); |
| | | } |
| | | st = DateTime.Parse(searchEntity.searchDatestart + "-01"); |
| | | |
| | | } |
| | | if (!string.IsNullOrEmpty(searchEntity.searchDateend)) |
| | | { |
| | | et = DateTime.Parse(searchEntity.searchDateend + "-01"); |
| | | |
| | | } |
| | | var query = (from a in _context.HrSalaries where a.Year >= st.Year && a.Month >= st.Month && a.Year <= et.Year && a.Month <= et.Month select a); |
| | | |