public PesquisaMercadoriaResultado(Entidades.Mercadoria.Mercadoria[] mercadorias, Tabela tabela, Entidades.Financeiro.Cotação cotação)
        {
            InitializeComponent();

            listaFotos.Ordenar = false;

            using (Formulários.Aguarde dlg = new Formulários.Aguarde("Carregando fotos...", mercadorias.Length))
            {
                dlg.Abrir();

                foreach (Entidades.Mercadoria.Mercadoria m in mercadorias)
                {
                    Foto foto = CacheMiniaturas.Instância.ObterFoto(m);

                    if (foto != null)
                        listaFotos.Adicionar(foto);

                    dlg.Passo();
                }
            }

            cmbTabela.Seleção = tabela;
            txtCotação.Carregar();
            txtCotação.Cotação = cotação;
        }
        public ControlePesquisaMercadoria(Tabela tabela)
        {
            this.tabela = tabela;
            conexão = Conexão;

            CriarTabela();
        }
		public ColetorMercadoria(ListViewMercadoria lst, Tabela tabela)
		{
            controladorLimite = new ControladorLimiteColetor(padrãoLimiteMínimo, padrãoLimiteMáximo, padrãoDemoraMáximaMs);

#if DEBUG
			if (lst == null)
				throw new ArgumentNullException("Coletor construído com lista nula!");
#endif

			this.lst = lst;

            this.tabela = tabela;
		}
Esempio n. 4
0
        /// <summary>
        /// Adiciona tabela na lista.
        /// </summary>
        private void AdicionarTabela(Tabela tabela, bool ressaltarSetor)
        {
            ListViewItem item = new ListViewItem();

            lista.Add(tabela);

            item.Text = tabela.Nome;
            item.SubItems.Add(tabela.Setor.Nome);
            item.Tag = tabela;

            if (ressaltarSetor && tabela.Setor.Código == Funcionário.FuncionárioAtual.Setor.Código)
                item.Font = new Font(item.Font, FontStyle.Bold);

            lst.Items.Add(item);
        }
 private void cmbTabela_AoSelecionar(ComboTabela sender, Tabela moeda)
 {
     txtCotação.SelecionarPrimeiro();
 }
        private void bandejaHistórico_TabelaAlterada(Bandeja bandeja, Tabela tabela)
        {
            try
            {
                if (entidade.TabelaPreço != tabela)
                    entidade.TabelaPreço = tabela;
            }
            catch (Exception e)
            {
                MessageBox.Show(
                    ParentForm,
                    "Não foi possível alterar a tabela.\n\n" + e.Message,
                    "Alteração de tabela",
                    MessageBoxButtons.OK, MessageBoxIcon.Error);

                bandeja.Tabela = entidade.TabelaPreço;
                return;
            }

            bandejaAgrupada.Tabela = tabela;
            quadroMercadoria.Tabela = tabela;
        
            if (AoAlterarTabela != null)
                AoAlterarTabela(this, tabela);
        }
        private void bandejaAgrupada_TabelaAlterada(Bandeja bandeja, Tabela tabela)
        {
            bandejaHistórico.Tabela = tabela;

            if (AoAlterarTabela != null)
                AoAlterarTabela(this, tabela);
        }
Esempio n. 8
0
        public Tabela[] ObterTabelas()
        {
            Tabela[] tabelas;

            Carregar();

            tabelas = new Tabela[Items.Count];
            Items.CopyTo(tabelas, 0);

            return tabelas;
        }