Using system.data; using system.data.sqlclient;
Namespace CNKK.DATA {///
Protected Database (String Connectionstring) {this.connectionstring = connection;
Protected Database (SqlConnection Connection) {this.Connection = Connection;
Protected Override Void DisposeManaged () {base.disposemanaged ();
this.Connection.dispose ();
Private SqlConnection getConnection () {if (KeepConnection) {Return this.Connection;} else {returnnection;}}
Protected SqlConnection Connection {Get {Return this.Connection;}}
Private int commandtimeout = 30;
///
///
Private bool KeepConnection = false;
///
Set {if (KeepConnection! = Value) {KeepConnection = Value;
IF (KeepConnection == True) {if (connection.state == connectionState.closed) Connection.Open ();} else {connection.close ();}}}}}}}}}}}}}}}}}}}}}}