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

            connection.Tovarnoy_NakladnoyFill();
            cbTovarnoy_Nakladnoy_ID.ItemsSource       = connection.dtTovarnaya_Nakladnaya.DefaultView;
            cbTovarnoy_Nakladnoy_ID.SelectedValuePath = "ID_Tovarnoy_Nakladnoy";
            cbTovarnoy_Nakladnoy_ID.DisplayMemberPath = "Nazv_Tovarnoy_Nakladnoy";
        }
        //Заполнение датагрида
        private void dgFill(string qr)
        {
            DBConnection2 connection = new DBConnection2();

            DBConnection2.qrTovarnoy_Nakladnoy = qr;
            connection.Tovarnoy_NakladnoyFill();
            dgTovarnoy_NakladnoyWPF.ItemsSource           = connection.dtTovarnaya_Nakladnaya.DefaultView;
            dgTovarnoy_NakladnoyWPF.Columns[0].Visibility = Visibility.Collapsed;
            dgTovarnoy_NakladnoyWPF.Columns[4].Visibility = Visibility.Collapsed;
            dgTovarnoy_NakladnoyWPF.Columns[3].Visibility = Visibility.Collapsed;
        }