public void fnLoadClients() { var clientList = _oBLCliente.GetAll(); flpnlClientList.Controls.Clear(); foreach (var item in clientList) { CtrlClientCard _oCtrlClient = new CtrlClientCard(item.NombreCliente, item.FechaCreacion, item.IdCliente); _oCtrlClient.Tag = item; flpnlClientList.Controls.Add(_oCtrlClient); } }
private void fnBindListSources() { //Loading project categories cboxProjectCategory.Items.Clear(); _oBLCategoriaPro = new BLCategoriaProyecto(); cboxProjectCategory.ValueMember = "IdCategoriaProyecto"; cboxProjectCategory.DisplayMember = "NombreCategoriaProyecto"; cboxProjectCategory.DataSource = _oBLCategoriaPro.GetAll(); //Loading clients cboxProjectClient.Items.Clear(); _oBLCliente = new BLCliente(); cboxProjectClient.ValueMember = "IdCliente"; cboxProjectClient.DisplayMember = "NombreCliente"; cboxProjectClient.DataSource = _oBLCliente.GetAll().OrderBy(c => c.NombreCliente).ToList(); }