Пример #1
0
        private void Save()
        {
            vendorBindingSource.EndEdit();
            Vendors vendor = vendorBindingSource.Current as Vendors;

            //BindingList<Vendors> OrderList = (BindingList<Vendors>)userBindingSource.DataSource;
            //Vendors Vendors = OrderList[userBindingSource.Position];

            Vendors.SaveEntity(vendor);

            BindingList <Vendors> vendorList = new BindingList <Vendors>(Vendors.GetEntityList());

            vendorBindingSource.DataSource = vendorList;

            MessageBox.Show("Vendor was saved.");
        }
Пример #2
0
        private void SetupBindings()
        {
            BindingList <Vendors> vendorList = new BindingList <Vendors>(Vendors.GetEntityList());

            vendorBindingSource.DataSource = vendorList;
        }