Home > Net >  Winform system interactive data with a third party
Winform system interactive data with a third party

Time:11-18

I now in the development of a winform system, and then need ERP with the third party to do data interaction, the initiative to get on my side
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.net

CodePudding 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 program
It is best to erp can notify the otherwise it will cause waste of resources
  •  Tags:  
  • C#
  • Related