protected void Page_PreRender(object sender, EventArgs e)
    {
        ChannelItem itm = new ChannelItem();

        itm.BoxWidth           = this.BoxWidth;
        itm.TitleLength        = this.TitleLength;
        itm.Width              = this.Width;
        itm.LeftWidth          = this.LeftWidth;
        itm.RightWidth         = this.RightWidth;
        itm.Height             = this.Height;
        itm.BoxSpace           = this.BoxSpace;
        itm.isHoverEffect      = this.isHoverEffect;
        itm.BreakLine          = this.BreakLine;
        itm.isAdmin            = this.isAdmin;
        itm.ThumbPreviewOption = this.ThumbPreviewOption;
        itm.ThumbOnly          = this.ThumbOnly;
        itm.ShowDate           = this.ShowDate;
        itm.DateFormat         = this.DateFormat;
        itm.ShowViews          = this.ShowViews;
        itm.ShowDisabled       = this.ShowDisabled;
        itm.PreviewUrl         = this.PreviewUrl;
        itm.ContentLayout      = this.ContentLayout;
        itm.BoxCssClass        = this.BoxCssClass;
        itm.HoverCssClass      = this.HoverCssClass;
        itm.AltCssClass        = this.AltCssClass;
        itm.ThumbCssClass      = this.ThumbCssClass;
        itm.BoldLinkCssClass   = this.BoldLinkCssClass;
        itm.NormalLinkCssClass = this.NormalLinkCssClass;
        itm.AltLinkCssClass    = this.AltLinkCssClass;
        itm.GoodCssClass       = this.GoodCssClass;
        itm.NormalTextCssClass = this.NormalTextCssClass;
        itm.BadCssClass        = this.BadCssClass;
        itm.ShowLocationInfo   = this.ShowLocationInfo;
        itm.ShowMessageLink    = this.ShowMessageLink;
        itm.ShowAddFriendLink  = this.ShowAddFriendLink;
        itm.ShowUserName       = this.ShowUserName;
        itm.DateCaption        = this.DateCaption;
        itm.UserCaption        = this.UserCaption;

        Item = itm.Process(this.PH);
    }
    protected void Page_PreRender(object sender, EventArgs e)
    {
        ChannelItem itm = new ChannelItem();
        itm.BoxWidth = this.BoxWidth;
        itm.TitleLength =this.TitleLength;
        itm.Width=this.Width;
        itm.LeftWidth =this.LeftWidth;
        itm.RightWidth = this.RightWidth;
        itm.Height=this.Height;
        itm.BoxSpace =this.BoxSpace;
        itm.isHoverEffect=this.isHoverEffect;
        itm.BreakLine=this.BreakLine;
        itm.isAdmin=this.isAdmin;
        itm.ThumbPreviewOption = this.ThumbPreviewOption;
        itm.ThumbOnly=this.ThumbOnly;
        itm.ShowDate =this.ShowDate;
        itm.DateFormat=this.DateFormat;
        itm.ShowViews=this.ShowViews;
        itm.ShowDisabled=this.ShowDisabled;
        itm.PreviewUrl=this.PreviewUrl;
        itm.ContentLayout=this.ContentLayout;
        itm.BoxCssClass=this.BoxCssClass;
        itm.HoverCssClass=this.HoverCssClass;
        itm.AltCssClass=this.AltCssClass;
        itm.ThumbCssClass=this.ThumbCssClass;
        itm.BoldLinkCssClass=this.BoldLinkCssClass;
        itm.NormalLinkCssClass=this.NormalLinkCssClass;
        itm.AltLinkCssClass=this.AltLinkCssClass;
        itm.GoodCssClass=this.GoodCssClass;
        itm.NormalTextCssClass=this.NormalTextCssClass;
        itm.BadCssClass=this.BadCssClass;
        itm.ShowLocationInfo=this.ShowLocationInfo;
        itm.ShowMessageLink=this.ShowMessageLink;
        itm.ShowAddFriendLink=this.ShowAddFriendLink;
        itm.ShowUserName=this.ShowUserName;
        itm.DateCaption=this.DateCaption;
        itm.UserCaption=this.UserCaption;

        Item = itm.Process(this.PH);
    }
Exemple #3
0
    private void BindList()
    {
        StringBuilder str = new StringBuilder();

        this.TotalRecords = 0;
        this.TotalRecords = _members.Count_Channels(this.Term, this.Character, this.AccountType, this.Country, this.Gender, this.HavePhoto, this.Filter, this.isCache);
        if (this.TotalRecords == 0)
        {
            // no records found
            pg.Visible = false;
            str.Append("<div class=\"bx_norecord\">");
            str.Append("<h4>" + NoRecordFound + "</h4>");
            str.Append("</div>");
            lst.InnerHtml = str.ToString();
            return;
        }
        List <Member_Struct> _list = null;

        _list = _members.Load_Channels_ADV(this.Term, this.Character, this.AccountType, this.Country, this.Gender, this.HavePhoto, this.Filter, this.Order, this.PageNumber, this.PageSize, this.AdvList, this.isCache);
        if (_list.Count > 0)
        {
            if (Site_Settings.Pagination_Type == 2)
            {
                // sql server 2000 compatibility
                this.TotalRecords = _list.Count;
            }

            // Maximum Pagination Restriction for Main Listing
            int maximum_allowed_records = Site_Settings.Pagination_Links * this.PageSize;
            if (this.TotalRecords > maximum_allowed_records)
            {
                this.TotalRecords = maximum_allowed_records;
            }

            if (this.isListStatus)
            {
                // List Statistic Display
                list_stat1.TotalRecords = this.TotalRecords;
                list_stat1.PageSize     = this.PageSize;
                list_stat1.PageNumber   = this.PageNumber;
            }
            else
            {
                // disable showing list status on top of page
                lstat.Visible = false;
            }

            if (this.TotalRecords > this.PageSize)
            {
                pagination1.TotalRecords   = this.TotalRecords;
                pagination1.PageSize       = this.PageSize;
                pagination1.PageNumber     = this.PageNumber;
                pagination1.Default_Url    = this.Default_Url;
                pagination1.Pagination_Url = this.Pagination_Url;
                if (this.Filter > 0)
                {
                    pagination1.isFilter              = true;
                    pagination1.Filter_Default_Url    = this.Filter_DefaultUrl;
                    pagination1.Filter_Pagination_Url = this.Filter_Pagination_Url;
                }
                pagination1.BindPagination();
            }
            else
            {
                pg.Visible = false;
            }


            // generate channel listing
            int i       = 0;
            int counter = 0;
            //int total_columns = 6;

            ChannelItem itm = new ChannelItem();
            if (this.AdvList)
            {
                // advance listing options
                itm.ContentLayout      = 1; // left / right side listing type
                itm.LeftWidth          = 13;
                itm.RightWidth         = 86;
                itm.NormalLinkCssClass = "xxmedium-text bold";
                itm.AltLinkCssClass    = "normal-text light";
                itm.BoxCssClass        = "bx_br_bt item_pad_4";
                itm.isHoverEffect      = true;
                itm.ShowLocationInfo   = true;
                itm.Height             = 64;
                itm.Width     = 64;
                itm.ShowViews = true;
                itm.ShowDate  = true;
            }
            else
            {
                // normal listing options
                itm.ShowDate           = false;
                itm.isHoverEffect      = false;
                itm.NormalLinkCssClass = "mini-text bold";
                itm.AltLinkCssClass    = "mini-text light";
                itm.BoxWidth           = 75;
                itm.BoxSpace           = 10;
                itm.Width       = 62;
                itm.Height      = 62;
                itm.TitleLength = 8;
                itm.ShowViews   = true;
            }
            for (i = 0; i <= _list.Count - 1; i++)
            {
                counter = counter + 1;
                str.Append(itm.Process(_list[i]));
            }
            str.Append("<div class=\"clear\"></div>"); // clear floating items
        }
        else
        {
            pg.Visible = false;
            str.Append("<div class=\"bx_norecord\">");
            str.Append("<h4>" + NoRecordFound + "</h4>");
            str.Append("</div>");
        }

        lst.InnerHtml = str.ToString();
    }
    private void BindList()
    {
        StringBuilder str = new StringBuilder();
        this.TotalRecords = 0;
        this.TotalRecords = _members.Count_Channels(this.Term, this.Character, this.AccountType, this.Country, this.Gender, this.HavePhoto, this.Filter, this.isCache);
        if (this.TotalRecords == 0)
        {
            // no records found
            pg.Visible = false;
            str.Append("<div class=\"bx_norecord\">");
            str.Append("<h4>" + NoRecordFound + "</h4>");
            str.Append("</div>");
            lst.InnerHtml = str.ToString();
            return;
        }
        List<Member_Struct> _list = null;
        _list = _members.Load_Channels_ADV(this.Term, this.Character, this.AccountType, this.Country, this.Gender, this.HavePhoto, this.Filter, this.Order, this.PageNumber, this.PageSize, this.AdvList, this.isCache);
        if (_list.Count > 0)
        {
            if (Site_Settings.Pagination_Type == 2)
            {
                // sql server 2000 compatibility
                this.TotalRecords = _list.Count;
            }

            // Maximum Pagination Restriction for Main Listing
            int maximum_allowed_records = Site_Settings.Pagination_Links * this.PageSize;
            if (this.TotalRecords > maximum_allowed_records)
                this.TotalRecords = maximum_allowed_records;

            if (this.isListStatus)
            {
                // List Statistic Display
                list_stat1.TotalRecords = this.TotalRecords;
                list_stat1.PageSize = this.PageSize;
                list_stat1.PageNumber = this.PageNumber;
            }
            else
            {
                // disable showing list status on top of page
                lstat.Visible = false;
            }

            if (this.TotalRecords > this.PageSize)
            {
                pagination1.TotalRecords = this.TotalRecords;
                pagination1.PageSize = this.PageSize;
                pagination1.PageNumber = this.PageNumber;
                pagination1.Default_Url = this.Default_Url;
                pagination1.Pagination_Url = this.Pagination_Url;
                if (this.Filter > 0)
                {
                    pagination1.isFilter = true;
                    pagination1.Filter_Default_Url = this.Filter_DefaultUrl;
                    pagination1.Filter_Pagination_Url = this.Filter_Pagination_Url;
                }
                pagination1.BindPagination();
            }
            else
            {
                pg.Visible = false;
            }

           
            // generate channel listing 
            int i = 0;
            int counter = 0;
            //int total_columns = 6;

            ChannelItem itm = new ChannelItem();
            if (this.AdvList)
            {
                // advance listing options
                itm.ContentLayout = 1; // left / right side listing type
                itm.LeftWidth = 13;
                itm.RightWidth = 86;
                itm.NormalLinkCssClass = "xxmedium-text bold";
                itm.AltLinkCssClass = "normal-text light";
                itm.BoxCssClass = "bx_br_bt item_pad_4";
                itm.isHoverEffect = true;
                itm.ShowLocationInfo = true;
                itm.Height = 64;
                itm.Width = 64;
                itm.ShowViews = true;
                itm.ShowDate = true;
            }
            else
            {
                // normal listing options
                itm.ShowDate = false;
                itm.isHoverEffect = false;
                itm.NormalLinkCssClass = "mini-text bold";
                itm.AltLinkCssClass = "mini-text light";
                itm.BoxWidth = 75;
                itm.BoxSpace = 10;
                itm.Width = 62;
                itm.Height = 62;
                itm.TitleLength = 8;
                itm.ShowViews = true;
            }
            for (i = 0; i <= _list.Count - 1; i++)
            {
                counter = counter + 1;
                str.Append(itm.Process(_list[i]));
            }
            str.Append("<div class=\"clear\"></div>"); // clear floating items
        }
        else
        {
            pg.Visible = false;
            str.Append("<div class=\"bx_norecord\">");
            str.Append("<h4>" + NoRecordFound + "</h4>");
            str.Append("</div>");
        }

        lst.InnerHtml = str.ToString();
    }