If the inside of the ERP data has changed, I need to know, only to regularly take ERP data over there, do you have what good way to do this task regularly, use a thread or a timer class, and then winform start automatically after the background to handle this business, have the code examples for reference
CodePudding user response:
Don't need timer, you just need to background threads continuously polling (timer thread execution process should be considered overtime should be how to deal with the problem) :While (true)
{
//based on external marker to determine the end loop
If (... )
{
break;
}
//the data code
.
Thread.sleep (1000);//milliseconds themselves, frequency for a smaller, or larger
}
CodePudding user response:
quartz.netCodePudding user response:
Polling is not good communication solutions, it is best to have news inform me with sqlserver2008 can perform in the trigger the CLR so I used a udp packet to inform their programIt is best to erp can notify the otherwise it will cause waste of resources