private void BindEditForm(object[] data) { customerBAL = new BAL.CustomerBAL(); DataTable table = new DataTable(); table = customerBAL.getCustomers(data); BindFields(table); }
private void BindCustomerGrid(object[] data) { customerBAL = new BAL.CustomerBAL(); DataTable table = new DataTable(); table = customerBAL.getCustomers(data); this.dataGridCustomer.RowPostPaint += new System.Windows.Forms.DataGridViewRowPostPaintEventHandler(this.dataGridSupplier_RowPostPaint); dataGridCustomer.DataSource = table; this.dataGridCustomer.Columns["CustomerId"].Visible = false; // Auto Resize dataGridCustomer.AutoResizeColumns(); dataGridCustomer.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.AllCells; BindAutoCompleteToCustomer(table); }