示例#1
0
        public void NovoBloco(Imovel imovel)
        {
            ImovelBox ib = new ImovelBox(imovel);

            ib.MouseClick += Bloco_Click;
            flowLayoutPanel_ListaCasas.Controls.Add(new ImovelBox(imovel));
        }
示例#2
0
 public void RemoverBloco(ImovelBox bloco, Imovel imovel)
 {
     flowLayoutPanel_ListaCasas.Controls.Remove(bloco);
     Imoveis.Remove(imovel);
     LoadImoveis(Imoveis, Pagina);
     File.ExcluirImovel(imovel);
 }
示例#3
0
        public void UpdateBloco(ImovelBox bloco, Imovel i)
        {
            bloco.Imovel = i;

            Label endereco     = bloco.endereco;
            Label bairro       = bloco.bairro;
            Label preco        = bloco.preco;
            Label terrenoValue = bloco.terreno;
            Label areaValue    = bloco.areaconstruida;
            Label estilo       = bloco.estilo;
            Label status       = bloco.status;
            Label indicacao    = bloco.indicacao;

            endereco.Text     = i.Endereco;
            bairro.Text       = "(" + i.Bairro.ToString().Replace("_", " ") + ")";
            preco.Text        = "R$" + i.Preco.ToString("N2");
            terrenoValue.Text = i.Terreno.ToString() + " m²";
            areaValue.Text    = i.AreaConstruida.ToString() + " m²";
            estilo.Text       = i.Estilo.ToString();
            status.Text       = i.Status.ToString().Replace("_", " ");
            indicacao.Text    = indicacao.Text = "Indicação: " + i.Indicacao.ToString().Replace("_", " ");
        }