提交记录修改Core/Servicers/Instances/Data.cs+4 −2看文件
| @@ -581,11 +581,13 @@ namespace Core.Servicers.Instances | ||
| 581 | 581 | |
| 582 | 582 | public void ClearRange(DateTime start, DateTime end) |
| 583 | 583 | { |
| 584 | 新增: end = new DateTime(end.Year, end.Month, DateTime.DaysInMonth(end.Year, end.Month)); | |
| 585 | 新增: | |
| 584 | 586 | using (var db = new TaiDbContext()) |
| 585 | 587 | { |
| 586 | 删除: db.Database.ExecuteSqlCommand("delete from DailyLogModels where Date>='" + start.Date.ToString("yyyy-MM-dd 00:00:00") + "' and Date<= '" + end.Date.ToString("yyyy-MM-dd 23:59:59") + "'"); | |
| 588 | 新增: db.Database.ExecuteSqlCommand("delete from DailyLogModels where Date>='" + start.Date.ToString("yyyy-MM-01 00:00:00") + "' and Date<= '" + end.Date.ToString("yyyy-MM-dd 23:59:59") + "'"); | |
| 587 | 589 | |
| 588 | 删除: db.Database.ExecuteSqlCommand("delete from HoursLogModels where DataTime>='" + start.Date.ToString("yyyy-MM-dd 00:00:00") + "' and DataTime<= '" + end.Date.ToString("yyyy-MM-dd 23:59:59") + "'"); | |
| 590 | 新增: db.Database.ExecuteSqlCommand("delete from HoursLogModels where DataTime>='" + start.Date.ToString("yyyy-MM-01 00:00:00") + "' and DataTime<= '" + end.Date.ToString("yyyy-MM-dd 23:59:59") + "'"); | |
| 589 | 591 | } |
| 590 | 592 | } |
| 591 | 593 | } |

