Пример #1
0
        private void SearchButton_Click(object sender, RoutedEventArgs e)
        {
            HHModel        hhmodel   = new HHModel();
            List <Vacancy> vacancies = hhmodel.JsonParceString(hhmodel.RequestGet("https://api.hh.ru/vacancies?text=" + SearchTextBox.Text));

            DataJson.ItemsSource = vacancies;
            foreach (Vacancy vacancy in vacancies)
            {
                DataJson.Tag = vacancy.Link;
            }
        }
        private void searchButton_Click(object sender, RoutedEventArgs e)
        {
            ResListBox.Items.Clear();
            HHModel        m = new HHModel();
            List <Vacancy> v = m.JsonParseStringItems(
                m.RequestGet("http://api.hh.ru/vacancies?text=" + searchBox.Text));

            foreach (Vacancy vacancy in v)
            {
                ListBoxItem item = new ListBoxItem();
                item.Content = vacancy.id + " " + vacancy.name;
                item.Tag     = vacancy.info;
                ResListBox.Items.Add(item);
            }
        }
Пример #3
0
        private void SearchButton_Click(object sender, EventArgs e)
        {
            List <Vacancy> vacancies = model.JsonParceString(model.RequestGet("https://api.hh.ru/vacancies?text=" + SearchBox.Text));

            DataJson.Rows.Clear();
            label1.Text = vacancies.Count() + " вакансий всего";
            foreach (Vacancy v in vacancies)
            {
                DataGridViewRow row = (DataGridViewRow)DataJson.Rows[0].Clone();
                row.Cells[0].Value = v.Area;
                row.Cells[1].Value = v.Name;
                row.Cells[2].Value = v.SalaryFrom;
                row.Cells[3].Value = v.SalaryTo;
                row.Cells[4].Value = v.EmployerName;
                row.Cells[5].Value = v.AddressStreet;
                row.Cells[6].Value = v.Info;
                DataJson.Rows.Add(row);
            }
        }
Пример #4
0
        private void buttonSearch_Click(object sender, EventArgs e)
        {
            List <Vacancy> vacancies = model.JsonParseStringItems(model.RequestGet("http://api.hh.ru/vacancies?text=" + searchBox.Text));

            labelCount.Text = vacancies.Count() + " вакансий всего.";
            GridView.Rows.Clear();

            foreach (Vacancy v in vacancies)
            {
                DataGridViewRow row = (DataGridViewRow)GridView.Rows[0].Clone();
                row.Cells[0].Value = v.id;
                row.Cells[1].Value = v.name;
                row.Cells[2].Value = v.salary_from;
                row.Cells[3].Value = v.salary_to;
                row.Cells[4].Value = v.employer_name;
                row.Cells[5].Value = v.address;
                row.Cells[6].Value = v.info;
                GridView.Rows.Add(row);
            }
        }
 private void Button_Click(object sender, RoutedEventArgs e)
 {
     ResBox.Text = model.RequestGet(search.Text);
 }
Пример #6
0
 private void ButTest_Click(object sender, EventArgs e)
 {
     textRes.Text = model.RequestGet("http://api.hh.ru/vacancies/35895798");
 }