private void CarregaAliquotas(int count) { aliquotas = new Aliquota[count]; for (int i = 0; i < count; i++) { var record = new ACBrECFInterop.AliquotaRec(); int ret = ACBrECFInterop.ECF_GetAliquota(this.Handle, ref record, i); CheckResult(ret); Aliquota aliquota = new Aliquota(); aliquota.Indice = FromUTF8(record.Indice); aliquota.ValorAliquota = Convert.ToDecimal(record.Aliquota); aliquota.Sequencia = record.Sequencia; aliquota.Tipo = record.Tipo.ToString(); aliquota.Total = Convert.ToDecimal(record.Total); aliquotas[i] = aliquota; } }
private void CarregaISSQN() { int count = ACBrECFInterop.ECF_DadosReducaoZClass_GetISSQNCount(this.Handle); CheckResult(count); issqn = new Aliquota[count]; for (int i = 0; i < count; i++) { var record = new ACBrECFInterop.AliquotaRec(); int ret = ACBrECFInterop.ECF_DadosReducaoZClass_GetISSQN(this.Handle, ref record, i); CheckResult(ret); Aliquota aliquota = new Aliquota(); aliquota.Indice = FromUTF8(record.Indice); aliquota.ValorAliquota = Convert.ToDecimal(record.Aliquota); aliquota.Sequencia = record.Sequencia; aliquota.Tipo = record.Tipo.ToString(); aliquota.Total = Convert.ToDecimal(record.Total); issqn[i] = aliquota; } }