using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; using System.Data.SqlClient; namespace CIMBCashFlowApp { public partial class MainMenu : Form { public MainMenu(string loginType) { InitializeComponent(); FillData(); } private void FillData() { using (SqlConnection con = new SqlConnection (Properties.Settings.Default.CIMBFlexiLoanDatabaseConnectionString)) { con.Open(); using (SqlDataAdapter data = new SqlDataAdapter("SELECT * FROM CIMBFlexiLoanTBL", con)) { DataTable tbl = new DataTable(); data.Fill(tbl); dataGridView1.DataSource = tbl; } } } } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)