//Заполнение комбо-бокса
        private void cbPFill()
        {
            DBConnection2 connection = new DBConnection2();

            connection.DogovoraFill();
            cbNomer_of_Dogovor.ItemsSource       = connection.dtDogovora.DefaultView;
            cbNomer_of_Dogovor.SelectedValuePath = "ID_Dogovor";
            cbNomer_of_Dogovor.DisplayMemberPath = "Nomer_of_Dogovor";
        }
Esempio n. 2
0
        //Заполнение датагрида
        private void dgFill(string qr)
        {
            Action action = () =>
            {
                DBConnection2 connection = new DBConnection2();
                DBConnection2.qrDogovara = qr;
                connection.DogovoraFill();
                dgDogovara.ItemsSource           = connection.dtDogovora.DefaultView;
                dgDogovara.Columns[0].Visibility = Visibility.Collapsed;
                dgDogovara.Columns[4].Visibility = Visibility.Collapsed;
                dgDogovara.Columns[5].Visibility = Visibility.Collapsed;
            };

            Dispatcher.Invoke(action);
        }