예제 #1
0
        /// <summary>
        /// Create a new instance of Usuario viewmodel
        /// </summary>
        /// <param name="service">Service dependency</param>
        /// <param name="serviceLoginAttempts">Service dependency</param>
        /// <param name="servicePermisosUsuario">Service dependency</param>
        /// <param name="serviceUserPasswords">Service dependency</param>
        /// <param name="serviceUserPhotos">Service dependency</param>
        public UsuarioFindViewModel(IUsuarioAppService service, ILoginAttemptsAppService serviceLoginAttempts, IPermisosUsuarioAppService servicePermisosUsuario, IUserPasswordsAppService serviceUserPasswords, IUserPhotosAppService serviceUserPhotos) : this()
        {
            if (service == null)
            {
                throw new ArgumentNullException("service", PresentationResources.exception_WithoutService);
            }
            if (serviceLoginAttempts == null)
            {
                throw new ArgumentNullException("serviceLoginAttempts", PresentationResources.exception_WithoutService);
            }
            if (servicePermisosUsuario == null)
            {
                throw new ArgumentNullException("servicePermisosUsuario", PresentationResources.exception_WithoutService);
            }
            if (serviceUserPasswords == null)
            {
                throw new ArgumentNullException("serviceUserPasswords", PresentationResources.exception_WithoutService);
            }
            if (serviceUserPhotos == null)
            {
                throw new ArgumentNullException("serviceUserPhotos", PresentationResources.exception_WithoutService);
            }

            _serviceUsuario         = service;
            _serviceLoginAttempts   = serviceLoginAttempts;
            _servicePermisosUsuario = servicePermisosUsuario;
            _serviceUserPasswords   = serviceUserPasswords;
            _serviceUserPhotos      = serviceUserPhotos;

            BuildVm();
        }
예제 #2
0
        /// <summary>
        /// Create a new instance of Usuario controller
        /// </summary>
        /// <param name="service">Service dependency</param>
        /// <param name="serviceLoginAttempts">Service dependency</param>
        /// <param name="servicePermisosUsuario">Service dependency</param>
        /// <param name="serviceUserPasswords">Service dependency</param>
        /// <param name="serviceUserPhotos">Service dependency</param>
        public UsuarioController(IUsuarioAppService service, ILoginAttemptsAppService serviceLoginAttempts, IPermisosUsuarioAppService servicePermisosUsuario, IUserPasswordsAppService serviceUserPasswords, IUserPhotosAppService serviceUserPhotos)
        {
            if (service == null)
            {
                throw new ArgumentNullException("service", PresentationResources.exception_WithoutService);
            }
            if (serviceLoginAttempts == null)
            {
                throw new ArgumentNullException("serviceLoginAttempts", PresentationResources.exception_WithoutService);
            }
            if (servicePermisosUsuario == null)
            {
                throw new ArgumentNullException("servicePermisosUsuario", PresentationResources.exception_WithoutService);
            }
            if (serviceUserPasswords == null)
            {
                throw new ArgumentNullException("serviceUserPasswords", PresentationResources.exception_WithoutService);
            }
            if (serviceUserPhotos == null)
            {
                throw new ArgumentNullException("serviceUserPhotos", PresentationResources.exception_WithoutService);
            }

            //_unitOfWork = unitOfWork;
            _serviceUsuario         = service;
            _serviceLoginAttempts   = serviceLoginAttempts;
            _servicePermisosUsuario = servicePermisosUsuario;
            _serviceUserPasswords   = serviceUserPasswords;
            _serviceUserPhotos      = serviceUserPhotos;
        }
예제 #3
0
        /// <summary>
        /// Create a new instance of RolUsuario controller
        /// </summary>
        /// <param name="service">Service dependency</param>
        /// <param name="servicePermisosUsuario">Service dependency</param>
        public RolUsuarioController(IRolUsuarioAppService service, IPermisosUsuarioAppService servicePermisosUsuario)
        {
            if (service == null)
            {
                throw new ArgumentNullException("service", PresentationResources.exception_WithoutService);
            }
            if (servicePermisosUsuario == null)
            {
                throw new ArgumentNullException("servicePermisosUsuario", PresentationResources.exception_WithoutService);
            }

            //_unitOfWork = unitOfWork;
            _serviceRolUsuario      = service;
            _servicePermisosUsuario = servicePermisosUsuario;
        }
예제 #4
0
        /// <summary>
        /// Create a new instance of RolUsuario viewmodel
        /// </summary>
        /// <param name="service">Service dependency</param>
        /// <param name="servicePermisosUsuario">Service dependency</param>
        public RolUsuarioCrudViewModel(IRolUsuarioAppService service, IPermisosUsuarioAppService servicePermisosUsuario) : this()
        {
            if (service == null)
            {
                throw new ArgumentNullException("service", PresentationResources.exception_WithoutService);
            }
            if (servicePermisosUsuario == null)
            {
                throw new ArgumentNullException("servicePermisosUsuario", PresentationResources.exception_WithoutService);
            }

            _serviceRolUsuario      = service;
            _servicePermisosUsuario = servicePermisosUsuario;

            BuildVm();
        }
예제 #5
0
        /// <summary>
        /// Create a new instance of Usuario controller
        /// </summary>
        /// <param name="service">Service dependency</param>
        /// <param name="serviceLoginAttempts">Service dependency</param>
        /// <param name="servicePermisosUsuario">Service dependency</param>
        /// <param name="serviceUserPasswords">Service dependency</param>
        /// <param name="serviceUserPhotos">Service dependency</param>
        public AccountController(IUsuarioAppService service, ILoginAttemptsAppService serviceLoginAttempts, IPermisosUsuarioAppService servicePermisosUsuario, IUserPasswordsAppService serviceUserPasswords, IUserPhotosAppService serviceUserPhotos, IPasswordAppService servicePassword, IUnitOfWorkAsync unitOfWork)
        {
            if (service == null)
            {
                throw new ArgumentNullException("service", PresentationResources.exception_WithoutService);
            }
            if (serviceLoginAttempts == null)
            {
                throw new ArgumentNullException("serviceLoginAttempts", PresentationResources.exception_WithoutService);
            }
            if (servicePermisosUsuario == null)
            {
                throw new ArgumentNullException("servicePermisosUsuario", PresentationResources.exception_WithoutService);
            }
            if (serviceUserPasswords == null)
            {
                throw new ArgumentNullException("serviceUserPasswords", PresentationResources.exception_WithoutService);
            }
            if (serviceUserPhotos == null)
            {
                throw new ArgumentNullException("serviceUserPhotos", PresentationResources.exception_WithoutService);
            }

            _serviceUsuario         = service;
            _serviceLoginAttempts   = serviceLoginAttempts;
            _servicePermisosUsuario = servicePermisosUsuario;
            _serviceUserPasswords   = serviceUserPasswords;
            _serviceUserPhotos      = serviceUserPhotos;
            _servicePassword        = servicePassword;
            _unitOfWork             = unitOfWork;
            DES _newDes = DESEncryptor.CreateDES("WebApp.AppServices");

            _newDes.IV = new byte[8] {
                0x01, 0x02, 0x03, 0x4, 0x05, 0x06, 0x07, 0x08
            };
            desHelper = new DESEncryptor(_newDes.Key, _newDes.IV);
        }