Commit d1f3545a authored by 潘栩锋's avatar 潘栩锋 🚴

1.修复 当数据很少,直方图无法生产时,出bug

2.修复 时间为DateTime.MinValue时,无法  -1,出错
parent 6cacadce
...@@ -288,8 +288,12 @@ namespace FLY.Thick.FilmCasting.UI.DbViewer.Db ...@@ -288,8 +288,12 @@ namespace FLY.Thick.FilmCasting.UI.DbViewer.Db
} }
} }
if (all_datas.Count() == 0) if (all_datas.Count() == 0)
return null; {
Histogram_TotalCount = 0;
Histogram_Sigma = double.NaN;
Histogram_Average = double.NaN;
return list;
}
foreach (var thk in all_datas) foreach (var thk in all_datas)
......
...@@ -130,7 +130,13 @@ namespace FLY.Thick.FilmCasting.UI.DbViewer ...@@ -130,7 +130,13 @@ namespace FLY.Thick.FilmCasting.UI.DbViewer
DbEndTime = dbHelper.DbEndTime; DbEndTime = dbHelper.DbEndTime;
DbBeginTime = dbHelper.DbBeginTime; DbBeginTime = dbHelper.DbBeginTime;
EndDate = DbEndTime; EndDate = DbEndTime;
BeginDate = EndDate.AddDays(-1); try
{
BeginDate = EndDate.AddDays(-1);
}
catch (Exception e) {
BeginDate = EndDate;
}
} }
private async void SelectMonthPath() private async void SelectMonthPath()
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment