BoletoNet.Boleto.FormataCampos C# (CSharp) Method

FormataCampos() public method

public FormataCampos ( ) : void
return void
        public void FormataCampos();
        public int Categoria { get; set; }

Usage Example

Example #1
0
        /// <summary>
        /// Validações particulares do banco Banestes
        /// </summary>
        public override void ValidaBoleto(Boleto boleto)
        {
            try
            {
                //Carteiras válidas
                // 00 - Sem registro;

                //Atribui o nome do banco ao local de pagamento
                boleto.LocalPagamento += Nome + ". Após o vencimento, somente no BANESTES";

                //Verifica se o nosso número é válido
                if (Utils.ToInt64(boleto.NossoNumero) == 0)
                    throw new NotImplementedException("Nosso número inválido");

                //Verifica se data do processamento é valida

                if (boleto.DataProcessamento == DateTime.MinValue)
                    boleto.DataProcessamento = DateTime.Now;

                //Verifica se data do documento é valida
                if (boleto.DataDocumento == DateTime.MinValue)
                    boleto.DataDocumento = DateTime.Now;

                boleto.FormataCampos();
            }
            catch (Exception e)
            {
                throw new Exception("Erro ao validar boletos.", e);
            }
        }
All Usage Examples Of BoletoNet.Boleto::FormataCampos