public void Actualizar(int alertaID, int clienteID, string fecha, string correo, bool activa)
        {
            AlertaFacturacionClienteDominio _repo = new AlertaFacturacionClienteDominio();
            DateTime?date;

            if (fecha == "null")
            {
                date = null;
            }
            else
            {
                date = (new DateTime(1970, 1, 1)).AddMilliseconds(double.Parse(fecha));
            }
            try
            {
                AlertaFacturacionCliente Alerta = new AlertaFacturacionCliente()
                {
                    AlertaFacturacionClienteID = alertaID,
                    ClienteID        = clienteID,
                    FechaEnvioCorreo = date,
                    Correo           = correo,
                    Activa           = activa
                };
                _repo.Actualizar(Alerta);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
        public bool Actualizar(AlertaFacturacionCliente alerta)
        {
            using (TransactionScope transactionScope = new TransactionScope())
            {
                try
                {
                    IAlertaFacturacionClienteRepositorio _repositorio = new AlertaFacturacionClienteRepositorio();
                    _repositorio.Update(alerta);
                    transactionScope.Complete();

                    return(true);
                }
                catch (Exception ex)
                {
                    throw ex;
                }
            }
        }
        public bool Guardar(AlertaFacturacionCliente alerta)
        {
            using (TransactionScope transactionScope = new TransactionScope())
            {
                try
                {
                    IAlertaFacturacionClienteRepositorio _repositorio = new AlertaFacturacionClienteRepositorio();
                    _repositorio.Insert(alerta);
                    transactionScope.Complete();

                    return(true);
                }
                catch (Exception ex)
                {
                    return(false);
                }
            }
        }
        public void Guardar(int clienteID, string correo, bool activa)
        {
            AlertaFacturacionClienteDominio _repo = new AlertaFacturacionClienteDominio();

            try
            {
                AlertaFacturacionCliente Alerta = new AlertaFacturacionCliente()
                {
                    ClienteID        = clienteID,
                    FechaEnvioCorreo = null,
                    Correo           = correo,
                    Activa           = activa
                };
                _repo.Guardar(Alerta);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }