public Condominio_Lista() { InitializeComponent(); tBar.Renderer = new MySR(); Imovel_bll empresa_Class = new Imovel_bll(_connection); MainList.DataSource = empresa_Class.Lista_Condominio(); MainList.DisplayMember = "cd_nomecond"; MainList.ValueMember = "cd_codigo"; }
public Imovel_Novo() { m_aeroEnabled = false; this.Refresh(); InitializeComponent(); tBar.Renderer = new MySR(); Imovel_bll imovel_Class = new Imovel_bll(_connection); lista_condominios = imovel_Class.Lista_Condominio(); TipoList.Items.Add(new CustomListBoxItem("(Imóvel normal)", 0)); List <CustomListBoxItem> myItems = new List <CustomListBoxItem>(); foreach (GTI_Models.Models.Condominio item in lista_condominios) { TipoList.Items.Add(new CustomListBoxItem(item.Cd_nomecond, item.Cd_codigo)); } TipoList.SelectedIndex = 0; }