diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjReport/DayWhiteEmbryo/DayWhiteEmbryoInitDb.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjReport/DayWhiteEmbryo/DayWhiteEmbryoInitDb.cs index 712613a..caa15f1 100644 --- a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjReport/DayWhiteEmbryo/DayWhiteEmbryoInitDb.cs +++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjReport/DayWhiteEmbryo/DayWhiteEmbryoInitDb.cs @@ -93,12 +93,9 @@ namespace Mesnac.Action.ChemicalWeighing.LjReport.DayWhiteEmbryo private void SelectButton_Click(object sender, EventArgs e) { dt.Rows.Clear(); - DateTime starttime = startDate.Value.Date.AddHours(startTime.Value.Hour); - starttime.AddMinutes(startTime.Value.Minute); - starttime.AddSeconds(startTime.Value.Second); - DateTime endtime = endDate.Value.Date.AddHours(endTime.Value.Hour); - endtime.AddMinutes(endTime.Value.Minute); - endtime.AddSeconds(endTime.Value.Second); + DateTime starttime = startDate.Value.Date.AddHours(startTime.Value.Hour).AddMinutes(startTime.Value.Minute).AddSeconds(startTime.Value.Second); + DateTime endtime = endDate.Value.Date.AddHours(endTime.Value.Hour).AddMinutes(endTime.Value.Minute).AddSeconds(endTime.Value.Second); + list = FreeSqlUnit.Instance.Select().Where(x => (x.CreateTime >= starttime && x.CreateTime <= endtime)).ToList();