private string GetUserFollow() { var _html = string.Empty; if (Session["login"] != null && Session["FullName1"] != null && Session["FullName"] != null && Session["AccountID"] != null) { var _clsGetUserFollower = new BllFollower(); var _dtGetCountUserFollower = _clsGetUserFollower.GetWallFollowCount(int.Parse(Session["AccountID"].ToString())); var _dtGetUserFollower = _clsGetUserFollower.GetWallFollow(int.Parse(Session["AccountID"].ToString())); if (_dtGetUserFollower != null && _dtGetUserFollower.Rows.Count > 0) { _html += "<div class='panel panel-danger'>"; _html += "<div class='panel-heading'>"; _html += "<h3 class='panel-title'>NHỮNG NGƯỜI BẠN THEO DÕI " + "(" + _dtGetCountUserFollower.Rows[0]["Follower"] + ")" + " </h3>"; _html += "</div>"; _html += "<div class='panel-body' style='margin: 0 0 0 0;padding: 11px 0 12px 0;text-align: center'>"; for (int i = 0; i < _dtGetUserFollower.Rows.Count; i++) { _html += " <div class='col-md-4' style='width: 103px'>"; if (String.IsNullOrEmpty(_dtGetUserFollower.Rows[i]["User_Image"].ToString()) || _dtGetUserFollower.Rows[i]["User_Image"] == DBNull.Value) { _html += _html += "<a href='/profice/" + _dtGetUserFollower.Rows[i]["UserName"] + "' data-popover='true' data-html=true data-content='" + _dtGetUserFollower.Rows[i]["FullName"] + "'>"; _html += "<img src='../img/unnamed.png' style='width: 103px;height: 103px;border: 2px solid #f2dede' class='img-rounded'/>"; _html += "</a>"; } else { _html += "<a href='/profice/" + _dtGetUserFollower.Rows[i]["UserName"] + "' data-popover='true' data-html=true data-content='" + _dtGetUserFollower.Rows[i]["FullName"] + "'>"; _html += "<img src='" + _dtGetUserFollower.Rows[i]["User_Image"] + "' style='width: 103px;height: 103px;border: 2px solid #f2dede' class='img-rounded'/>"; _html += "</a>"; } _html += "</div>"; } _html += "</div>"; _html += "</div>"; } } return(_html); }
private void GetUserFollowerList() { if (Session["login"] != null && Session["FullName1"] != null && Session["FullName"] != null && Session["AccountID"] != null) { var _clsGetUserFollower = new BllFollower(); var _dtGetUserFollower = _clsGetUserFollower.GetWallFollow(int.Parse(Session["AccountID"].ToString())); if (_dtGetUserFollower != null && _dtGetUserFollower.Rows.Count > 0) { ListViewWallFollwer.DataSource = _dtGetUserFollower; ListViewWallFollwer.DataBind(); } } }