public void VerificarEstatusParaCorreo(CuentaXpagar cxp, GuardarCxP GuardarCxP)
 {
     if (!cxp.lActivo)
     {
         var            correo         = new EnviarCorreo(GuardarCxP);
         RepositorioCxP RepositorioCxP = new RepositorioCxP(correo);
         RepositorioCxP.GuardarCxP(cxp);
     }
 }
 public void VerificarNaturalezaParaHistorial(CuentaXpagar cxp, GuardarCxP GuardarCxP)
 {
     if (!cxp.lNaturaleza)
     {
         var            historial      = new GuardarHistorial(GuardarCxP);
         RepositorioCxP RepositorioCxP = new RepositorioCxP(historial);
         RepositorioCxP.GuardarCxP(cxp);
     }
 }
        public void Main()
        {
            CuentaXpagar cxp = new CuentaXpagar
            {
                cIdUnidadAdministrativa = ObtenerUnidadAdministrativa(),
                dImporte        = _validador.ValidadorDouble("Agregar importe"),
                iIdCuentaXPagar = _validador.ValidadorInt("Agregar identificador"),
                lActivo         = _validador.ValidadorBool("Agregar Estatus"),
                lNaturaleza     = ObtenerNaturaleza()
            };

            GuardarCxP GuardarCxP = new GuardarCxP();

            var RepositorioCxP = new RepositorioCxP(GuardarCxP);

            RepositorioCxP.GuardarCxP(cxp);


            VerificarEstatusParaCorreo(cxp, GuardarCxP);
            VerificarNaturalezaParaHistorial(cxp, GuardarCxP);
        }