Пример #1
0
        public Response <AccountDto> PasswordResetRequest(string username, Func <SqlDataReader, AccountDto> accountDtoMapper)
        {
            DbResponse dbResponse = CommandTypeManager.ExecuteReaderWithValidation("AccountPasswordResetRequest", new SqlQueryParameter {
                ParameterName = "UserName ", ParameterDirection = DbParameterDirection.Input, ParamentType = CodeParameterType.String, ParameterSize = 100, ParameterValue = username
            },
                                                                                   new SqlQueryParameter {
                ParameterName = "ValidationMessages", ParameterDirection = DbParameterDirection.Output, ParamentType = CodeParameterType.String, ParameterSize = 8000
            });

            return(dbResponse.ToReponse <AccountDto>(accountDtoMapper));
        }
Пример #2
0
        public Response <AccountDto> PasswordReset(ResetPasswordDto resetPasswordDto, Func <SqlDataReader, AccountDto> accountDtoMapper)
        {
            DbResponse dbResponse = CommandTypeManager.ExecuteReaderWithValidation("AccountPasswordReset", new SqlQueryParameter {
                ParameterName = "Password ", ParameterDirection = DbParameterDirection.Input, ParamentType = CodeParameterType.String, ParameterSize = 100, ParameterValue = resetPasswordDto.Password
            },
                                                                                   new SqlQueryParameter {
                ParameterName = "ForgotPasswordKey ", ParameterDirection = DbParameterDirection.Input, ParamentType = CodeParameterType.Guid, ParameterValue = resetPasswordDto.ForgotPasswordKey
            },
                                                                                   new SqlQueryParameter {
                ParameterName = "ValidationMessages", ParameterDirection = DbParameterDirection.Output, ParamentType = CodeParameterType.String, ParameterSize = 8000
            });

            return(dbResponse.ToReponse <AccountDto>(accountDtoMapper));
        }
Пример #3
0
        public Response <UserInformationDto> Login(string username, string password, Func <SqlDataReader, UserInformationDto> userInformationMapper)
        {
            DbResponse dbResponse = CommandTypeManager.ExecuteReaderWithValidation("AccountLogin", new SqlQueryParameter {
                ParameterName = "UserName ", ParameterDirection = DbParameterDirection.Input, ParamentType = CodeParameterType.String, ParameterSize = 100, ParameterValue = username
            },
                                                                                   new SqlQueryParameter {
                ParameterName = "Password", ParameterDirection = DbParameterDirection.Input, ParamentType = CodeParameterType.String, ParameterSize = 100, ParameterValue = password
            },
                                                                                   new SqlQueryParameter {
                ParameterName = "ValidationMessages", ParameterDirection = DbParameterDirection.Output, ParamentType = CodeParameterType.String, ParameterSize = 8000
            });

            return(dbResponse.ToReponse <UserInformationDto>(userInformationMapper));
        }
Пример #4
0
        public Response <UserInformationDto> ChangePassword(ChangePasswordDto changePasswordDto, Func <SqlDataReader, UserInformationDto> userInformationMapper)
        {
            DbResponse dbResponse = CommandTypeManager.ExecuteReaderWithValidation("AccountChangePassword", new SqlQueryParameter {
                ParameterName = "UserName ", ParameterDirection = DbParameterDirection.Input, ParamentType = CodeParameterType.String, ParameterSize = 100, ParameterValue = changePasswordDto.Username
            },
                                                                                   new SqlQueryParameter {
                ParameterName = "OldPassword", ParameterDirection = DbParameterDirection.Input, ParamentType = CodeParameterType.String, ParameterSize = 100, ParameterValue = changePasswordDto.OldPassword
            },
                                                                                   new SqlQueryParameter {
                ParameterName = "NewPassword", ParameterDirection = DbParameterDirection.Input, ParamentType = CodeParameterType.String, ParameterSize = 100, ParameterValue = changePasswordDto.Password
            },
                                                                                   new SqlQueryParameter {
                ParameterName = "ValidationMessages", ParameterDirection = DbParameterDirection.Output, ParamentType = CodeParameterType.String, ParameterSize = 8000
            });

            return(dbResponse.ToReponse <UserInformationDto>(userInformationMapper));
        }