private void InicializaCabecalho(object sender, EventArgs e) { CbUfCarregamento.PickItem += ComboBoxUfCarregamento_OnPickItem; CbUfCarregamento.UfSelecionado = CbUfCarregamento.Default; CbUfDescarregamento.PickItem += ComboBoxUfDescarregamento_OnPickItem; CbUfDescarregamento.UfSelecionado = CbUfDescarregamento.Default; CbCidadeCarregamento.PickItemCidade += ComboBoxCidadeCarregamento_OnPickItem; CbCidadeCarregamento.PesquisaPorUf(CbUfCarregamento.Default); CbPercurso.PickItem += ComboBoxPercurso_OnPickItem; CbPercurso.UfSelecionado = CbPercurso.Default; Model.Percurso.CollectionChanged += AtualizaComboCidade; }
private void PesquisarCidadesPorUf() { var filtroList = new List <Uf>(); if (CbUfCarregamento.UfSelecionado != null) { filtroList.Add(CbUfCarregamento.UfSelecionado); } if (CbUfDescarregamento.UfSelecionado != null) { filtroList.Add(CbUfDescarregamento.UfSelecionado); } filtroList.AddRange(Model.Percurso); CbCidadeCarregamento.PesquisaPorUf(filtroList.ToArray()); }
private void Inicializa() { CbCidadeCarregamento.PickItemCidade += ComboBoxCidadeCarregamento_OnPickItem; CbCidadeCarregamento.PesquisaPorUf(_nFeModel.UfsPesquisa.ToArray()); }