public IActionResult CadastrarContrato() { ViewBag.Title = "Corretores"; ViewBag.Corretores = new SelectList(_corretorDAO.Listar(), "Id", "Nome"); ViewBag.Title = "Locatario"; ViewBag.Locatario = new SelectList(_locatarioDAO.Listar(), "Id", "Nome"); ViewBag.Title = "Imoveis"; ViewBag.Imoveis = new SelectList(_imovelDAO.Listar(), "Id", "Endereco"); return(View()); }
private void Window_Loaded(object sender, RoutedEventArgs e) { //Carregar os dados de Locatario cboLocatario.ItemsSource = LocatarioDAO.Listar(); cboLocatario.DisplayMemberPath = "Nome"; cboLocatario.SelectedValuePath = "Id"; //Carregar os dados de vendedores cboCorretor.ItemsSource = CorretorDAO.Listar(); cboCorretor.DisplayMemberPath = "Nome"; cboCorretor.SelectedValuePath = "Id"; //Carregar os dados de produtos cboImovel.ItemsSource = ImovelDAO.Listar(); cboImovel.DisplayMemberPath = "Endereco"; cboImovel.SelectedValuePath = "Id"; }
private void PopularDataGridInicial() { var listaImoveis = ImovelDAO.Listar(); foreach (var imovel in listaImoveis) { itens.Add(new Imovel() { Id = imovel.Id, Area = imovel.Area, Cidade = imovel.Cidade, Endereco = imovel.Endereco, ValorAluguel = imovel.ValorAluguel, Locado = imovel.Locado, TipoImovel = imovel.TipoImovel, UF = imovel.UF }); } }
public IActionResult CardsImoveis() { List<Imovel> imoveis = _imovelDAO.Listar(); return View(imoveis); }