Create a C# class library application named TslCasPmsInterface and save in the checked out folder.
Add a public void method named InitPmsInterface in TslCasPmsInterface class.
The method should check the General table for column PmsCommunicationMode [0=RS232,1=TCP/IP,2=File Share] [Add this column in the General table]
If the communication mode is 0, initialise serial port [RS232] communication settings.
Add a new form named SerialComm in the project. Add a NetCom ocx control on this form.
Add a public static method called Initialise in the form class. The class should read the PmsSerialPortSettings field value from the general table and open the serial port
Add a public method named
SendDataToPms with string parameter strDataToBeSent in PmsSerialPortSettings. The method should send the data over the serial port.
Create a Thread inside TslCasPmsInterface class named SendCDRtoPMS
If the thread is started, in a while loop it should check the table named CallBilling for records having column value SentToPMS is 0 [Add this column in CallBilling table]
Then, the thread should send each record to the PMS through the selected interface. Once a record is sent successfully, set the SentToPMS flag to 1 in CallBilling table.
View Complete Post