/*统计NOshow*/ void NOshow() { BLL.book_room bllbr = new BLL.book_room(); Model.SysParamter modelsys = bllsys.GetModel(1); DateTime dtnow = DateTime.Now; DateTime dtstart = Convert.ToDateTime(dtnow.ToString("yyyy-MM-dd")).AddHours(modelsys.YsTime.Hours).AddMinutes(modelsys.YsTime.Minutes).AddSeconds(modelsys.YsTime.Seconds); List <Model.book_room> listbr = bllbr.GetModelList("Accounts!='' and state_id=1"); if (listbr.Count > 0) { foreach (Model.book_room item in listbr) { TimeSpan tso = Convert.ToDateTime(item.time_to) - Convert.ToDateTime(dtstart); if (tso.TotalSeconds < 0) { Model.customer modelcus = bllcuns.GetAccounts(item.Accounts); if (modelcus != null) { modelcus.NoShow += 1; bllcuns.Update(modelcus); } } item.state_id = 4; bllbr.Update(item); } } }