コード例 #1
0
        public string GetSituacaoDescription()
        {
            // Get the Description attribute value for the enum value
            FieldInfo fi = Situacao.GetType().GetField(Situacao.ToString());
            DescriptionAttribute[] attributes =
                (DescriptionAttribute[])fi.GetCustomAttributes(
                    typeof(DescriptionAttribute), false);

            if (attributes.Length > 0)
            {
                return attributes[0].Description;
            }
            else
            {
                return Situacao.ToString();
            }
        }
コード例 #2
0
ファイル: Reg53.cs プロジェクト: cfpperche/T2TiERP-1-CSharp
        public string gerarLinhaTexto()
        {
            string retorno = "";

            retorno += Funcoes.Formatar(tipo.ToString(), 2, true, '0');
            retorno += Funcoes.Formatar(cnpj, 14, false, '0');
            retorno += Funcoes.Formatar(inscricaoestadual, 14, true, ' ');
            retorno += Funcoes.Formatar(dataEmissaoRecebimento.ToString("yyyyMMdd"), 8, true, ' ');
            retorno += Funcoes.Formatar(uf, 2, true, ' ');
            retorno += Funcoes.Formatar(modelo, 2, true, ' ');
            retorno += Funcoes.Formatar(serie, 3, true, ' ');
            retorno += Funcoes.Formatar(numero.ToString(), 6, false, '0');
            retorno += Funcoes.Formatar(cfop, 4, true, ' ');
            retorno += Funcoes.Formatar(emitente, 1, true, ' ');
            retorno += Funcoes.Formatar(baseCalculoICMS.ToString("N2"), 13, false, '0');
            retorno += Funcoes.Formatar(icmsRetido.ToString("N2"), 13, false, '0');
            retorno += Funcoes.Formatar(DespesasAcessorias.ToString("N2"), 13, false, '0');
            retorno += Funcoes.Formatar(Situacao.ToString("N2"), 1, true, ' ');
            retorno += Funcoes.Formatar(codigoAntecipacao.ToString(), 1, true, ' ');
            retorno += Funcoes.Formatar(" ", 29, true, ' ');

            return(retorno);
        }