Example #1
0
        public static string GetLoginErrorMessage(long code)
        {
            switch (code)
            {
            case 1:
                return(BvMessages.Get("ErrEmptyUserLogin", "User login can\'t be empty"));

            case 2:
                return(BvMessages.Get("ErrUserNotFound", "User with such login/password is not found."));

            case 3:
                return(BvMessages.Get("ErrLowClientVersion", "The application version doesn\'t correspond to database version. Please install the latest application version."));

            case 4:
                return(BvMessages.Get("ErrLowDatabaseVersion", "The application requires the newest database version. Please upgrade your database to latest database version."));

            case 5:
                return(BvMessages.Get("ErrIncorrectDatabaseVersion", "The database version is absent or in incorrect format. Please upgrade your database to latest database version."));

            case 6:
                var sm = new Security.EidssSecurityManager();
                return(string.Format(BvMessages.Get("ErrLoginIsLocked", "You have exceeded the number of incorrect login attempts. Please try again in {0} minutes."), sm.GetAccountLockTimeout()));

            case 7:
                return(BvMessages.Get("ErrInvalidParameter", "Invalid parameter specified."));

            case 8:
                return(BvMessages.Get("ErrPasswordPolicy", "Unable to update the password. The value provided for the new password does not meet the length, complexity, or history requirement."));

            case 9:
                return(BvMessages.Get("ErrPasswordExpired", "Your password is expired. Please change your password."));

            default:
                return(BvMessages.Get("ErrUnprocessedError"));
            }
        }
Example #2
0
        public static string GetLoginErrorMessage(long code, string organization, string userName)
        {
            switch (code)
            {
            case 6:
                var sm = new Security.EidssSecurityManager();
                return(string.Format(BvMessages.Get("ErrLoginIsLocked", "You have exceeded the number of incorrect login attempts. Please try again in {0} minutes."), sm.GetAccountLockTimeout(organization, userName)));

            default:
                return(BvMessages.Get("ErrUnprocessedError"));
            }
        }