private async void btnDeleteContact_Click(object sender, RoutedEventArgs e)
        {
            int indexContact = dgContacts.SelectedIndex;
            int contact_id;

            if (indexContact >= 0 && indexContact < dgContacts.Items.Count)
            {
                var contact = (Contact)dgContacts.SelectedItem;
                contact_id = contact.contact_id;

                Logic.HttpClientContact httpClientContact = new Logic.HttpClientContact();
                Result resultDelete = await httpClientContact.deleteContactAsyns(contact_id);

                if (resultDelete.code == 0)
                {
                    this.showContactsAsyns(contact.employee_id);
                }
                else
                {
                    MessageBox.Show("" + resultDelete.info);
                }
            }
            else
            {
                MessageBox.Show("Не выбрана строка для удаления");
            }
        }
        private async void btnAddContact_Click(object sender, RoutedEventArgs e)
        {
            Contact newContact = new Contact();

            Logic.HttpClientContact httpClientContact = new Logic.HttpClientContact();



            if (txtemployee_id.Text != "")
            {
                int typeContact = Convert.ToInt32(((ComboBoxItem)cbTypeContact.SelectedItem).DataContext);
                newContact.contact_type = typeContact;
                newContact.content      = txtContact.Text;
                newContact.employee_id  = Convert.ToInt32(txtemployee_id.Text);

                ResultApiContact resultCreateContact = await httpClientContact.createNewContactAsyns(newContact);

                if (resultCreateContact.code == 0)
                {
                    this.showContactsAsyns(newContact.employee_id);
                    MessageBox.Show("Сохранено");
                }
                else
                {
                    MessageBox.Show(resultCreateContact.info);
                }
            }
            else
            {
                MessageBox.Show("Пользователь не сохранен");
            }
        }
        private async void showContactsAsyns(int employee_id)
        {
            if (employee_id == 0)
            {
                dgContacts.ItemsSource = null;
            }
            else
            {
                Logic.HttpClientContact httpClientContact = new Logic.HttpClientContact();
                List <Contact>          listContacts      = await httpClientContact.getListContactAsyns(employee_id);

                if (listContacts != null)
                {
                    this.dgContacts.ItemsSource = listContacts;
                }
            }
        }