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 listaDeCorretores = CorretorDAO.Listar(); foreach (var corretor in listaDeCorretores) { itens.Add(new Corretor() { Nome = corretor.Nome, Cpf = corretor.Cpf, Cidade = corretor.Cidade, Cofeci = corretor.Cofeci, Email = corretor.Email, Telefone = corretor.Telefone, UF = corretor.UF, Id = corretor.Id }); } }
public IActionResult ListaCorretores() { List <Corretor> corretores = _corretorDAO.Listar(); return(View(corretores)); }