Пример #1
0
        protected void OnResetClick(object sender, EventArgs e)
        {
            InitializeFromQueryString();
            InitializeSearchWordFilter();
            InitializeTypes();
            InitializeCommunities();
            InitializeMyContentFilter();
            InitializeTagFilter();

            MyContent.ObjectType        = Helper.GetObjectTypeNumericID(objectType);
            MyContent.SearchWord        = string.Empty;
            MyContent.CommunityIds      = string.Empty;
            MyContent.ShowMyContentOnly = null;
            MyContent.TagList           = string.Empty;
            MyContent.InitializeFromQueryString();
            MyContent.SetCurrentPage(1);
            MyContent.Reload();
            MyContent.Refresh();
        }
Пример #2
0
        protected void OnFindClick(object sender, EventArgs e)
        {
            generalSearchWord = TxtSearch.Text;
            objectType        = DdObjType.SelectedValue;
            communityList     = string.Empty;
            if (objectType != "Community" && objectType != "Page")
            {
                for (int i = 0; i < DdComms.Items.Count; i++)
                {
                    string checkboxId = DdComms.UniqueID + "$i" + i + "$CheckBox";
                    if (!string.IsNullOrEmpty(Request.Form[checkboxId]))
                    {
                        communityList += DdComms.Items[i].Value + Constants.TAG_DELIMITER;
                    }
                }
                communityList = communityList.TrimEnd(Constants.TAG_DELIMITER);
            }

            tagList = string.Empty;
            for (int i = 0; i < RlbTags.Items.Count; i++)
            {
                if (RlbTags.Items[i].Checked)
                {
                    tagList += RlbTags.Items[i].Value + ",";
                }
            }
            tagList = tagList.TrimEnd(',');

            MyContent.ObjectType        = Helper.GetObjectTypeNumericID(objectType);
            MyContent.SearchWord        = generalSearchWord;
            MyContent.CommunityIds      = communityList;
            MyContent.ShowMyContentOnly = bool.Parse(DdMyCont.SelectedValue);
            MyContent.TagList           = tagList;
            MyContent.SetCurrentPage(1);
            MyContent.Reload();
            MyContent.Refresh();
        }