|
|
@ -100,11 +100,14 @@ namespace Mesnac.Action.ChemicalWeighing.LjReport.DayWhiteEmbryo
|
|
|
|
|
|
|
|
|
|
|
|
private void WhiteWork_Click(object sender, EventArgs e)
|
|
|
|
private void WhiteWork_Click(object sender, EventArgs e)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
dt = GetDefault();
|
|
|
|
DateTime nowTime = DateTime.Now;
|
|
|
|
DateTime nowTime = DateTime.Now;
|
|
|
|
|
|
|
|
|
|
|
|
DateTime starttime;
|
|
|
|
DateTime starttime=DateTime.Now;
|
|
|
|
DateTime endtime;
|
|
|
|
DateTime endtime=DateTime.Now;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (((Button)sender).Text.Contains("白"))
|
|
|
|
|
|
|
|
{
|
|
|
|
//如果大于当天8点 就展示当天的白班 否则展示上一个白班
|
|
|
|
//如果大于当天8点 就展示当天的白班 否则展示上一个白班
|
|
|
|
if (nowTime >= DateTime.Now.Date.AddHours(8))
|
|
|
|
if (nowTime >= DateTime.Now.Date.AddHours(8))
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -116,9 +119,34 @@ namespace Mesnac.Action.ChemicalWeighing.LjReport.DayWhiteEmbryo
|
|
|
|
starttime = DateTime.Now.Date.AddHours(-17).AddMinutes(30);
|
|
|
|
starttime = DateTime.Now.Date.AddHours(-17).AddMinutes(30);
|
|
|
|
endtime = DateTime.Now.Date.AddHours(-5).AddMinutes(30);
|
|
|
|
endtime = DateTime.Now.Date.AddHours(-5).AddMinutes(30);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
//如果小于当天20点 就展示当天的前一个晚班
|
|
|
|
|
|
|
|
if (nowTime <= DateTime.Now.Date.AddHours(20))
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
starttime = DateTime.Now.Date.AddHours(-5).AddMinutes(30);
|
|
|
|
|
|
|
|
endtime = DateTime.Now.Date.AddHours(7).AddMinutes(30);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
starttime = DateTime.Now.Date.AddHours(19).AddMinutes(30);
|
|
|
|
|
|
|
|
endtime = DateTime.Now.Date.AddHours(31).AddMinutes(30);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
string statValue = starttime.ToString("yyyy-MM-dd HH:mm:ss");
|
|
|
|
string statValue = starttime.ToString("yyyy-MM-dd HH:mm:ss");
|
|
|
|
string endValue = endtime.ToString("yyyy-MM-dd HH:mm:ss");
|
|
|
|
string endValue = endtime.ToString("yyyy-MM-dd HH:mm:ss");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
startDate.Value = Convert.ToDateTime(starttime.ToString("yyyy-MM-dd"));
|
|
|
|
|
|
|
|
endDate.Value = Convert.ToDateTime(endtime.ToString("yyyy-MM-dd"));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
startTime.Value = Convert.ToDateTime(starttime.ToString("HH:mm:ss"));
|
|
|
|
|
|
|
|
endTime.Value = Convert.ToDateTime(endtime.ToString("HH:mm:ss"));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
FillData(statValue, endValue);
|
|
|
|
FillData(statValue, endValue);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -126,6 +154,7 @@ namespace Mesnac.Action.ChemicalWeighing.LjReport.DayWhiteEmbryo
|
|
|
|
|
|
|
|
|
|
|
|
private void FillData(string statValue, string endValue)
|
|
|
|
private void FillData(string statValue, string endValue)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
DbHelper dbHelper = Mesnac.Basic.DataSourceFactory.Instance.GetDbHelper(Mesnac.Basic.DataSourceFactory.MCDbType.Local);
|
|
|
|
DbHelper dbHelper = Mesnac.Basic.DataSourceFactory.Instance.GetDbHelper(Mesnac.Basic.DataSourceFactory.MCDbType.Local);
|
|
|
|
list = new List<GhWuLiaoIniEntity>();
|
|
|
|
list = new List<GhWuLiaoIniEntity>();
|
|
|
|
|
|
|
|
|
|
|
|