public void copyFromChequeEmpresarial(ChequeEmpresarial chequeEmpresarial)
        {
            this.id       = chequeEmpresarial.id;
            this.dataBase = (
                chequeEmpresarial.dataBase != null
                ?  DateTime.ParseExact(chequeEmpresarial.dataBase, "yyyy-MM-dd", System.Globalization.CultureInfo.InvariantCulture)
                : zeroDate()
                );

            this.indiceDB            = chequeEmpresarial.indiceDB != null ? chequeEmpresarial.indiceDB : "";
            this.indiceDataBase      = chequeEmpresarial.indiceDataBase;
            this.indiceBA            = chequeEmpresarial.indiceBA != null ? chequeEmpresarial.indiceBA : "";
            this.indiceDataBaseAtual = chequeEmpresarial.indiceDataBaseAtual;

            this.dataBaseAtual = (
                chequeEmpresarial.dataBaseAtual != null
                ? DateTime.ParseExact(chequeEmpresarial.dataBaseAtual, "yyyy-MM-dd", System.Globalization.CultureInfo.InvariantCulture)
                : zeroDate()
                );

            this.valorDevedor = chequeEmpresarial.valorDevedor;

            EncargosMonetarios encargosMonetarios = new EncargosMonetarios();

            if (chequeEmpresarial.encargosMonetarios != null)
            {
                encargosMonetarios = JSON.toObject <EncargosMonetarios>(chequeEmpresarial.encargosMonetarios);
            }
            this.encargosMonetarios = encargosMonetarios;

            this.lancamentos            = chequeEmpresarial.lancamentos;
            this.tipoLancamento         = chequeEmpresarial.tipoLancamento != null ? chequeEmpresarial.tipoLancamento : "";
            this.valorDevedorAtualizado = chequeEmpresarial.valorDevedorAtualizado;
            this.contractRef            = chequeEmpresarial.contractRef != null ? chequeEmpresarial.contractRef : "";
            this.ultimaAtualizacao      = chequeEmpresarial.ultimaAtualizacao != null
            ? DateTime.ParseExact(chequeEmpresarial.ultimaAtualizacao, "yyyy-MM-dd", System.Globalization.CultureInfo.InvariantCulture)
            : zeroDate();

            InfoParaCalculo infoParaCalculo = new InfoParaCalculo();

            if (chequeEmpresarial.infoParaCalculo != null)
            {
                infoParaCalculo = JSON.toObject <InfoParaCalculo>(chequeEmpresarial.infoParaCalculo);
            }
            this.infoParaCalculo = infoParaCalculo;
        }
 public ChequeEmpresarialBack(DadosLancamento dadosLancamento)
 {
     encargosMonetarios = new EncargosMonetarios();
     infoParaCalculo    = new InfoParaCalculo();
     copyFromDadosLancamento(dadosLancamento);
 }
 public ChequeEmpresarialBack()
 {
     encargosMonetarios = new EncargosMonetarios();
     infoParaCalculo    = new InfoParaCalculo();
 }