string currenciesQuery = "SELECT * FROM Currencies"; currencyDataSet1 = new DataSets.CurrencyDataSet(); DataTable dataTable = currencyDataSet1.Tables.Add("Currencies"); string connectionString = System.Configuration.ConfigurationSettings.AppSettings["SQLConnectionString"].ToString(); using (SqlConnection connection = new SqlConnection(connectionString)) { SqlDataAdapter dataAdapter = new SqlDataAdapter(currenciesQuery, connection); dataAdapter.Fill(currencyDataSet1, "Currencies"); } txtId.DataBindings.Add("Int", dataTable, "CurrencyId"); txtCode.DataBindings.Add("Text", dataTable, "CurrencyCode"); txtName.DataBindings.Add("Text", dataTable, "CurrencyName"); txtRate.DataBindings.Add("Decimal", dataTable, "CurrencyRate");
//txtId.DataBindings.Add("Int", dataTable, "CurrencyId"); txtId.DataBindings.Add("Text", dataTable, "CurrencyId"); //txtRate.DataBindings.Add("Decimal", dataTable, "CurrencyRate"); txtRate.DataBindings.Add("Text", dataTable, "CurrencyRate");
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)