Ejemplo n.º 1
0
        public PCompanyInfoForm(int id)
        {
            _id = id;
            this.InitializeComponent();
            Company c = DataBaseInterface.GetCompanyById(DataSaver.UId, DataSaver.PasswordHash, id);

            XCompanyAvatar.Source = c.Logo;
            XCompanyInfoList.Items.Add(new PropertyShower("Название", c.Name));
            XCompanyInfoList.Items.Add(new PropertyShower("Специализация", c.Specialization));
            foreach (Contact t in c.Contacts)
            {
                XCompanyInfoList.Items.Add(new PropertyShower(t.Type, t.Value));
            }
            XComments.Href  = "PReferencesForm.xaml?c" + c.Id;
            XVacancies.Href = "PSearchForm.xaml?c" + c.Id;
            if (DataBaseInterface.HasSubscribe(DataSaver.UId, DataSaver.PasswordHash, _id))
            {
                XSubscribeButton.Content = "Отписаться";
            }
        }