How to create a global "C#" class for data base connection such that
1. all classes and controls can handle.
2. remian all session untill the main from of an application closed.
3. disconnect from the server when closing windows Form application
I'd recommend against that, actually. It makes managing the connection harder. Also, many database servers will support connection pooling to eliminate the performance cost of creating, opening, and closing a connection for each transaction.