public PSearchForm(string keyWord) { this.InitializeComponent(); SearchResult result = DataBaseInterface.Search(DataSaver.UId,DataSaver.PasswordHash,keyWord); XSearchResultList.Items.Add(new Separator("Вакансии: "+result.Vacancies.Count)); foreach (Vacancy v in result.Vacancies) { XSearchResultList.Items.Add(new VacancyShower(v)); } XSearchResultList.Items.Add(new Separator("Пользователи: "+result.Users.Count)); Link t; foreach (User u in result.Users) { t=new Link(); t.Margin = new Thickness(30, 0, 0, 0); t.Text=u.Login+": "+ u.FIO; t.Href = "PUserInfoForm.xaml?" + u.Id; XSearchResultList.Items.Add(t); } XSearchResultList.Items.Add(new Separator("Компании: " + result.Companies.Count)); foreach (Company c in result.Companies) { t = new Link(); t.Margin = new Thickness(30, 0, 0, 0); t.Text = c.Name; t.Href = "PCompanyInfoForm.xaml?" + c.Id; XSearchResultList.Items.Add(t); } }
public ManagerCornerItem(string text,string linkText,UIElement linkHref) { this.InitializeComponent(); Link t = new Link(linkText); t.HREF = linkHref; this.LayoutRoot.Children.Add(t); TextBlock b = new TextBlock(); b.Text = text; this.LayoutRoot.Children.Add(b); Grid.SetColumn(t, 1); }