当前位置: 首页>>代码示例>>C#>>正文


C# Member.PopulateMemberFromReader方法代码示例

本文整理汇总了C#中umbraco.cms.businesslogic.member.Member.PopulateMemberFromReader方法的典型用法代码示例。如果您正苦于以下问题:C# Member.PopulateMemberFromReader方法的具体用法?C# Member.PopulateMemberFromReader怎么用?C# Member.PopulateMemberFromReader使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在umbraco.cms.businesslogic.member.Member的用法示例。


在下文中一共展示了Member.PopulateMemberFromReader方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: GetMemberByName

        public static Member[] GetMemberByName(string usernameToMatch, bool matchByNameInsteadOfLogin)
        {
            string field = matchByNameInsteadOfLogin ? "umbracoNode.text" : "cmsMember.loginName";

            var tmp = new List<Member>();
            using (IRecordsReader dr = SqlHelper.ExecuteReader(
                                        string.Format(m_SQLOptimizedMany.Trim(),
                                        string.Format("{0} like @letter", field),
                                        "umbracoNode.text"),
                                            SqlHelper.CreateParameter("@nodeObjectType", Member._objectType),
                                            SqlHelper.CreateParameter("@letter", usernameToMatch + "%")))
            {
                while (dr.Read())
                {
                    Member m = new Member(dr.GetInt("id"), true);
                    m.PopulateMemberFromReader(dr);
                    tmp.Add(m);
                }
            }

            return tmp.ToArray();

        }
开发者ID:phaniarveti,项目名称:Experiments,代码行数:23,代码来源:Member.cs

示例2: GetAllAsList

        public static IEnumerable<Member> GetAllAsList()
        {
            var tmp = new List<Member>();
            using (IRecordsReader dr = SqlHelper.ExecuteReader(
                                        string.Format(m_SQLOptimizedMany.Trim(), "1=1", "umbracoNode.text"),
                                            SqlHelper.CreateParameter("@nodeObjectType", Member._objectType)))
            {
                while (dr.Read())
                {
                    Member m = new Member(dr.GetInt("id"), true);
                    m.PopulateMemberFromReader(dr);
                    tmp.Add(m);
                }
            }

            return tmp.ToArray();
        }
开发者ID:phaniarveti,项目名称:Experiments,代码行数:17,代码来源:Member.cs

示例3: getAllOtherMembers

        /// <summary>
        /// Retrieves a list of members thats not start with a-z
        /// </summary>
        /// <returns>array of members</returns>
        public static Member[] getAllOtherMembers()
        {

            var tmp = new List<Member>();
            using (IRecordsReader dr = SqlHelper.ExecuteReader(
                                        string.Format(m_SQLOptimizedMany.Trim(), "LOWER(SUBSTRING(text, 1, 1)) NOT IN ('a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z')", "umbracoNode.text"),
                                            SqlHelper.CreateParameter("@nodeObjectType", Member._objectType)))
            {
                while (dr.Read())
                {
                    Member m = new Member(dr.GetInt("id"), true);
                    m.PopulateMemberFromReader(dr);
                    tmp.Add(m);
                }
            }

            return tmp.ToArray();
        }
开发者ID:phaniarveti,项目名称:Experiments,代码行数:22,代码来源:Member.cs

示例4: GetMembersFromEmail

        /// <summary>
        /// Retrieve Members given an email
        /// 
        /// Used when authentifying a Member
        /// </summary>
        /// <param name="email">The email of the member(s)</param>
        /// <returns>The members with the specified email</returns>
        public static Member[] GetMembersFromEmail(string email)
        {
            if (string.IsNullOrEmpty(email))
                return null;

            var tmp = new List<Member>();
            using (var dr = SqlHelper.ExecuteReader(string.Format(_sQLOptimizedMany.Trim(),
                                        "Email = @email",
                                        "umbracoNode.text"),
                                            SqlHelper.CreateParameter("@nodeObjectType", Member._objectType),
                                            SqlHelper.CreateParameter("@email", email.ToLower())))
            {
                while (dr.Read())
                {
                    var m = new Member(dr.GetInt("id"), true);
                    m.PopulateMemberFromReader(dr);
                    tmp.Add(m);
                }
            }
            return tmp.ToArray();
        }
开发者ID:phaniarveti,项目名称:Experiments,代码行数:28,代码来源:Member.cs


注:本文中的umbraco.cms.businesslogic.member.Member.PopulateMemberFromReader方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。