Esempio n. 1
0
        private void OfferPromotionChoosingDialog_Load(object sender, EventArgs e)
        {
            try
            {
                using (OfferPromotionDataSetTableAdapters.fo_offer_promotionsTableAdapter tableAdapter = new OfferPromotionDataSetTableAdapters.fo_offer_promotionsTableAdapter())

                    using (OfferPromotionDataSet dataset = new OfferPromotionDataSet())
                    {
                        // Отключить проверку ограничений, что бы можно было получить DataTable без
                        // картинок(picture), кот. являются обязательными!
                        dataset.EnforceConstraints = false;

                        tableAdapter.Id_Name_Fill(dataset.fo_offer_promotions);

                        bindingSource1.DataSource = dataset.fo_offer_promotions.Rows;
                    }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }