Программирование в IIS




Пример 3.5


private void InitializeComponent()

{

System.Configuration.AppSettingsReader

configurationAppSettings = new

System.Configuration.AppSettingsReader();

this.ServicesDBConn = new System.Data.SqlClient.SqlConnection();

this.EventsAdaptor = new System.Data.SqlClient.SqlDataAdapter();

this.SelectEvent = new System.Data.SqlClient.SqlCommand();

this.InsertEvent = new System.Data.SqlClient.SqlCommand();

this.UpdateEvent = new System.Data.SqlClient.SqlCommand();

this.DeleteEvent = new System.Data.SqlClient.SqlCommand();

//

// ServicesDBConn

//

this.ServicesDBConn.ConnectionString =

((string)(configurationAppSettings.GetValue

("ServicesDBConn.ConnectionString", typeof(string))));

//

// EventsAdaptor

//

this.EventsAdaptor.DeleteCommand = this.DeleteEvent;

this.EventsAdaptor.InsertCommand = this.InsertEvent;

this.EventsAdaptor.SelectCommand = this.SelectEvent;




Содержание  Назад  Вперед