private void doSearchRealTimeData(CasicSender casicSender) { Dictionary <String, String> devHubMaps = new Dictionary <String, String>(); List <Model.DevHubInfo> devHubs = new BLL.DevHub().findAllRealTimeDT(); foreach (Model.DevHubInfo devHub in devHubs) { devHubMaps.Add(devHub.DevCode, devHub.HubCode); } casicSender.SendGetRealTimeDataReq(devHubMaps); }
public virtual void Execute(IJobExecutionContext context) { JobDataMap map = context.JobDetail.JobDataMap; CasicServer server = (CasicServer)map.Get("server"); Dictionary <String, String> devHubMaps = new Dictionary <String, String>(); List <Model.DevHubInfo> devHubs = new BLL.DevHub().findAll(); foreach (Model.DevHubInfo devHub in devHubs) { if (devHub.DevCode.StartsWith("21")) { devHubMaps.Add(devHub.DevCode, devHub.HubCode); } } CasicSender casicSender = new CasicSender(server); new BLL.DevHub().setOffLine(); Model.CasicFireEvent fireEvent = new Model.CasicFireEvent(); fireEvent.Version = "20"; casicSender.SendGetDataReq(devHubMaps, fireEvent); }