Exemplo n.º 1
0
		private void buttonGetData_Click(object sender, EventArgs e)
		{
			Database db = new Database();
			db.ConnectionString = this.textBoxConnectionString.Text;

			viewCompanies = new ObjectListView(db.GetCustomers());
			viewOrders = new ObjectListView(db.GetOrders());

			this.comboBoxCustomers.DataSource = viewCompanies;
			this.comboBoxCustomers.DisplayMember = "Company";
			this.comboBoxCustomers.ValueMember = "Id";

			this.dataGridView.AutoGenerateColumns = false;
			this.dataGridView.DataSource = viewOrders;

			this.textBoxFilter.Text = "";
			this.textBoxFilter.Enabled = true;
		}
Exemplo n.º 2
0
        private void buttonGetData_Click(object sender, EventArgs e)
        {
            Database db = new Database();

            db.ConnectionString = this.textBoxConnectionString.Text;

            viewCompanies = new ObjectListView(db.GetCustomers());
            viewOrders    = new ObjectListView(db.GetOrders());

            this.comboBoxCustomers.DataSource    = viewCompanies;
            this.comboBoxCustomers.DisplayMember = "Company";
            this.comboBoxCustomers.ValueMember   = "Id";

            this.dataGridView.AutoGenerateColumns = false;
            this.dataGridView.DataSource          = viewOrders;

            this.textBoxFilter.Text    = "";
            this.textBoxFilter.Enabled = true;
        }