Esempio n. 1
0
        protected void PerformSearch_Click(object sender, EventArgs e)
        {
            PageDataCollection pdc    = SearchRelations();
            PageDataCollection result = new PageDataCollection();

            if (!string.IsNullOrEmpty(SearchKeyWord.Text))
            {
                foreach (PageData pd in pdc)
                {
                    if (pd.PageName.ToLower().Contains(SearchKeyWord.Text.ToString().ToLower()))
                    {
                        result.Add(pd);
                    }
                }
            }
            else
            {
                result = pdc;
            }

            AllRelations.DataSource = result;

            AllRelations.DataBind();
        }
Esempio n. 2
0
 public bool IsAcquaintedWith(int otherCharacterId)
 {
     return(AllRelations.Any(r => r.OtherId == otherCharacterId));
 }