コード例 #1
0
        }       //RETORNA UM PRODUTO COM SEU ESTOQUE ATUAL

        public Queue <ModelCalculaLotes> CalculaLotes(int cod_produto)
        {
            DAOLotes    lote     = new DAOLotes(cx);
            DAORegistro registro = new DAORegistro(cx);

            Queue <ModelCalculaLotes> filaAux = new Queue <ModelCalculaLotes>();

            filaLotes     = lote.LocalizarLotes(cod_produto);           //SAIDAS DOS PRODUTOS
            filaRegistros = registro.LocalizarRegistro(cod_produto);    //ENTRADAS DOS PRODUTOS


            foreach (var item in filaRegistros)
            {
                foreach (var item2 in filaLotes)
                {
                    item.Id_lote = item2.Id_lote;
                    if (item2.lote.Equals(item.lote))
                    {
                        item.total += item2.quantidade;
                    }
                }

                if (item.total < item.quantidade)
                {
                    item.restante = item.quantidade - item.total;
                    filaAux.Enqueue(item);
                }
            }

            return(filaAux);
        }
コード例 #2
0
        public DataTable RastreioLotes(string valor, string nome_produto, string data, string numero_carga)
        {
            DAOLotes dao = new DAOLotes(cx);

            return(dao.RastreioLotes(valor, nome_produto, data, numero_carga));
        }