Example #1
0
        public List <NotasBE> CarregaNotaClientein(string notas)
        {
            var _notas      = new NotasBLL().SelectIN(notas);
            var _notasItens = new NotasItensBLL().SelectIn(notas);

            foreach (var item in _notas)
            {
                item.ItensNota = (from x in _notasItens where x.not_id.Equals(item.not_id) select x).ToList();
            }

            return(_notas);
        }
Example #2
0
        /// <summary>
        /// Carrega a lista de notas utilizando IN
        /// </summary>
        /// <param name="obj"></param>
        /// <returns></returns>
        List <ClienteBE> CarregaNotaClientein(List <ClienteBE> obj, string notas)
        {
            var _notas      = new NotasBLL().SelectIN(notas);
            var _notasItens = new NotasItensBLL().SelectIn(notas);


            List <ClienteBE> retorno = new List <ClienteBE>();

            foreach (var item in _notas)
            {
                item.ItensNota = (from x in _notasItens where x.not_id.Equals(item.not_id) select x).ToList();
                var cliente = (from x in obj where x.cli_id.Equals(item.cli_id) select x).FirstOrDefault <ClienteBE>();
                cliente.Nota.ItensNota = (from x in _notasItens where x.not_id.Equals(item.not_id) select x).ToList();
                retorno.Add(cliente);
            }

            return(obj);
        }