Пример #1
0
        private void Save()
        {
            assetgroupBindingSource.EndEdit();
            AssetGroups assetgroup = assetgroupBindingSource.Current as AssetGroups;

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

            AssetGroups.SaveEntity(assetgroup);

            BindingList <AssetGroups> orderList = new BindingList <AssetGroups>(AssetGroups.GetEntityList());

            assetgroupBindingSource.DataSource = orderList;

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

            assetgroupBindingSource.DataSource = buyerList;
        }