private void Form1_Load(object sender, EventArgs e)
        {
            DataOperations DataOps = new DataOperations();

            bsCustomers.DataSource   = DataOps.GetCustomers();
            DataGridView1.DataSource = bsCustomers;
            DataGridView1.ExpandColumns();
        }
        private void Form1_Load(object sender, EventArgs e)
        {
            DataOperations DataOps = new DataOperations();

            bsCustomers.DataSource   = DataOps.GetCustomers();
            DataGridView1.DataSource = bsCustomers;
            DataGridView1.ExpandColumns();
            bsCustomers.Sort = "CompanyName";
            ActiveControl    = txtCompanyName;
        }
Example #3
0
 private void Form1_Load(object sender, EventArgs e)
 {
     if (!System.IO.File.Exists(FileOperations.DatabaseLocation(Settings.Default.ConnectionString)))
     {
         cmdAddNewRow.Enabled = false;
         MessageBox.Show("Database not located");
     }
     else
     {
         DataOperations DataOps = new DataOperations();
         bsCustomers.DataSource   = DataOps.GetCustomers();
         DataGridView1.DataSource = bsCustomers;
         DataGridView1.ExpandColumns();
         bsCustomers.Sort = "CompanyName";
         ActiveControl    = txtCompanyName;
     }
 }