Exemplo n.º 1
0
        protected override void DeleteComponentAction()
        {
            if (Datos_Components.Current == null)
            {
                return;
            }

            Kit item = Datos_Components.Current as Kit;

            _entity.Components.Remove(item);
            Datos_Components.ResetBindings(false);
        }
Exemplo n.º 2
0
        protected override void AddComponentAction()
        {
            ProductList       list = ProductList.GetKitList(false, false);
            ProductSelectForm form = new ProductSelectForm(this, list);

            if (form.ShowDialog(this) == DialogResult.OK)
            {
                ProductInfo item = form.Selected as ProductInfo;

                if (_entity.Components.GetItemByComponent(item.Oid) == null)
                {
                    _entity.Components.NewItem(_entity, item);
                }

                Datos_Components.ResetBindings(false);
            }
        }