Example #1
0
 void initLazyLoaders()
 {
     _memberLoader = new EnumerableLazyLoader <MemberManage>(() =>
     {
         return(OnLineCustomerService.QueryMembers(this.Id));
     });
 }
Example #2
0
        private void BindDividGroup(OnLineCustomer dividGroup)
        {
            var dividGroupHTML = new StringBuilder();

            if (dividGroup.DivideGroupManage != null)
            {
                foreach (var item in dividGroup.DivideGroupManage)
                {
                    dividGroupHTML.Append("<div class='clearfix' style='background-image: url(../Images/sanjiao.png); background-repeat: no-repeat; padding: 20px 0px 0px 20px;'>");
                    dividGroupHTML.AppendFormat("<h2>{0}</h2>", item.Name + "(" + item.Description + ")");
                    var members = OnLineCustomerService.QueryMembers(item.Id);
                    if (members != null)
                    {
                        dividGroupHTML.Append("<ul class='box'>");
                        foreach (var member in members)
                        {
                            dividGroupHTML.AppendFormat("<li>{0}</li>", member.Remark);
                            dividGroupHTML.Append("<li>");
                            if (member.QQ.Any())
                            {
                                foreach (var qq in member.QQ)
                                {
                                    dividGroupHTML.AppendFormat("<a href='http://wpa.qq.com/msgrd?V=1&uin={0}&Site=&Menu=yes' target='_blank'><img src='http://wpa.qq.com/pa?p=2:{0}:41' alt='点击这里给我发消息' /></a>", qq);
                                }
                            }
                            dividGroupHTML.Append("</li>");
                        }
                        dividGroupHTML.Append("</ul>");
                    }
                    dividGroupHTML.Append("</div>");
                }
            }
            this.divDivideGroup.InnerHtml = dividGroupHTML.ToString();
        }
Example #3
0
        private void Bind()
        {
            string devidGroupId = Request.QueryString["devideGroupId"];

            if (!string.IsNullOrWhiteSpace(devidGroupId))
            {
                var list = from item in OnLineCustomerService.QueryMembers(Guid.Parse(devidGroupId))
                           select new
                {
                    Id     = item.Id,
                    Remark = item.Remark,
                    QQ     = item.QQ.Join(",")
                };
                this.dataSource.DataSource = list;
                this.dataSource.DataBind();
                if (list.Any())
                {
                    dataSource.HeaderRow.TableSection = TableRowSection.TableHeader;
                }
            }
        }