Example #1
0
        public void UpdateGrid()
        {
            var db = IOController.GetContext();

            switch (UIVars.TableName)
            {
            case "Customers":
                db.Customers.Load();
                dataGridView.DataSource = db.Customers.Local.ToBindingList();
                break;

            case "Sources":
                db.Sources.Load();
                dataGridView.DataSource = db.Sources.Local.ToBindingList();
                break;

            default:
                break;
            }
        }