コード例 #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);
        }
コード例 #2
0
        List <ClienteBE> CarregaNotaCliente(List <ClienteBE> obj)
        {
            NotasBLL _notas = new NotasBLL();

            foreach (var item in obj)
            {
                item.Nota = _notas.SelectId(new NotasBE {
                    cli_id = item.cli_id, conf_id = item.conf_id
                });
            }
            return(obj);
        }
コード例 #3
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);
        }
コード例 #4
0
        public RetornoBancoBoletoBE BaixaManual(int id, string comentario, string formapagamento, string jurosparamento, int userId, int conf_id)
        {
            if (formapagamento == "Deposito")
            {
                formapagamento = "DEP";
            }
            if (formapagamento == "Transferencia")
            {
                formapagamento = "TFB";
            }

            var nota = new NotasBLL().SelectId(new NotasBE {
                not_numero = id, conf_id = conf_id
            });
            var cliente = new ClienteBLL().SelectId(nota.cli_id);
            var total   = Convert.ToDecimal(jurosparamento) + nota.not_totalliquido;
            var obj     = new RetornoBancoBoletoBE(id, "", nota.not_dtVencimento, DateTime.Now, nota.not_totalliquido, total, Convert.ToDecimal(jurosparamento), cliente.cli_razaoSocial, "--", formapagamento, userId);

            obj.retBol_comentarios = comentario;
            //) { retBol_comentarios = comentario, retBol_seuBanco = id, retBol_nossoNumero = "", retBol_formapagamento = formapagamento, retBol_ociliacao = jurosparamento }
            obj.retBol_id = new RetornoBancoBoletoDao().Insert(obj);
            return(obj);
        }
コード例 #5
0
        public void ImportarNotas()
        {
            ImportarDadosDao _i = new ImportarDadosDao();
            NotasBLL         _n = new NotasBLL();
            ClienteBLL       _c = new ClienteBLL();

            foreach (var item in _i.ImportarNotas())
            {
                var nota = item.a.Split('.');
                //===========================================
                //-----ADICIONAR O NOME DA EMPRESA--
                //===========================================
                var cliente = _c.SelectBuscaNomeFantasia(item.b, 1);


                NotasBE n = new NotasBE();
                n.not_numero       = Convert.ToInt32(nota[0]);
                n.cli_id           = cliente.cli_id;
                n.not_tipoReceita  = item.c;
                n.not_codReceita   = item.d;
                n.not_dtEmissao    = Convert.ToDateTime(item.e);
                n.not_dtVencimento = Convert.ToDateTime(item.f);
                n.not_pis          = Convert.ToDecimal(item.g);
                n.not_confins      = Convert.ToDecimal(item.h);
                n.not_cssl         = Convert.ToDecimal(item.i);
                n.not_irrf         = Convert.ToDecimal(item.j);
                n.not_totalbruto   = Convert.ToDecimal(item.k);
                n.not_totalliquido = Convert.ToDecimal(item.l);
                n.not_preenchida   = item.m == "1" ? 1 : 0;
                n.not_emitida      = item.n == "1" ? true : false;
                n.not_situacao     = item.o;


                _n.Insert(n);
            }
        }