网站导航免费论文 原创论文 论文搜索 原创论文 网学软件 学术大家 资料中心 会员中心 问题解答 原创论文 大学论文导航 设计下载 最新论文 下载排行 原创论文 论文源代码
返回网学首页
网学联系
最新论文 推荐专题 热门论文 素材专题
当前位置: 网学 > 编程文档 > ASP.net > 正文

ASP.net自定义成员资格用户MembershipUser类

来源:http://myeducs.cn 联系QQ:点击这里给我发消息 作者: 用户投稿 来源: 网络 发布时间: 12/10/13
;   updateCmd.ExecuteNonQuery()
            End If
        End If
    Catch e As OdbcException
        If WriteExceptionsToEventLog Then
            WriteToEventLog(e, "GetUser(Object, Boolean)")

            Throw New ProviderException(exceptionMessage)
        Else
            Throw e
        End If
    Finally
        If Not reader Is Nothing Then reader.Close()

        conn.Close()
    End Try

    Return u
End Function


''
'' GetUserFromReader
''    A helper function that takes the current row from the OdbcDataReader
'' and hydrates a MembershiUser from the values. Called by the
'' MembershipUser.GetUser implementation.
''

Private Function GetUserFromReader(ByVal reader As OdbcDataReader) As OdbcMembershipUser
    Dim providerUserKey As Object = reader.GetValue(0)
    Dim username As String = reader.GetString(1)
    Dim email As String = reader.GetString(2)

    Dim passwordQuestion As String = ""
    If Not reader.GetValue(3) Is DBNull.Value Then _
      passwordQuestion = reader.GetString(3)

    Dim comment As String = ""
    If Not reader.GetValue(4) Is DBNull.Value Then _
      comment = reader.GetString(4)

    Dim isApproved As Boolean = reader.GetBoolean(5)
    Dim isLockedOut As Boolean = reader.GetBoolean(6)
    Dim creationDate As DateTime = reader.GetDateTime(7)

    Dim lastLoginDate As DateTime = New DateTime()
    If Not reader.GetValue(8) Is DBNull.Value Then _
      lastLoginDate = reader.GetDateTime(8)

    Dim lastActivityDate As DateTime = reader.GetDateTime(9)
    Dim lastPasswordChangedDate As DateTime = reader.GetDateTime(10)

    Dim lastLockedOutDate As DateTime = New DateTime()
    If Not reader.GetValue(11) Is DBNull.Value Then _
      lastLockedOutDate = reader.GetDateTime(11)

    Dim isSubscriber As Boolean = False
    If reader.GetValue(12) IsNot DBNull.Value Then _
      isSubscriber = reader.GetBoolean(12)

    Dim customerID As String = String.Empty
    If reader.GetValue(13) IsNot DBNull.Value Then _
      customerID = reader.GetString(13)

    Dim u As OdbcMembershipUser = New OdbcMembershipUser(Me.Name,

  • 下一篇资讯: Datagrid控件的事件声明
  • 网学推荐

    免费论文

    原创论文

    设为首页 | 加入收藏 | 论文首页 | 论文专题 | 设计下载 | 网学软件 | 论文模板 | 论文资源 | 程序设计 | 关于网学 | 站内搜索 | 网学留言 | 友情链接 | 资料中心
    版权所有 QQ:3710167 邮箱:3710167@qq.com 网学网 [Myeducs.cn] 您电脑的分辨率是 像素
    Copyright 2008-2015 myeducs.Cn www.myeducs.Cn All Rights Reserved 湘ICP备09003080号