日期:2014-05-20 浏览次数:20691 次
private void LoadRealTimeData() { var query = from r in this.dmdc.GetRealTimeQuery() where r.VarID == 30 select r; this.RealTimeEntities = this.dmdc.Load<RealTime>(query); this.RealTimeEntities.Completed += new EventHandler(RealTimeEntities_Completed); } void RealTimeEntities_Completed(object sender, EventArgs e) { List<RealTime> tempList = this.RealTimeEntities.Entities.ToList(); if (tempList == null || tempList.Count < 1) return; RealTime rt = tempList[0]; ///...其它代码 }