Exemplo n.º 1
0
        protected void OnButtonAddClicked(object sender, EventArgs e)
        {
            ITdiTab mytab = DialogHelper.FindParentTab(this);

            if (mytab == null)
            {
                logger.Warn("Родительская вкладка не найдена.");
                return;
            }

            OrmReference SelectDialog = new OrmReference(typeof(Nomenclature),
                                                         SpecificationUoW,
                                                         _nomenclatureRepository.NomenclatureForProductMaterialsQuery()
                                                         .GetExecutableQueryOver(SpecificationUoW.Session).RootCriteria
                                                         );

            SelectDialog.Mode            = OrmReferenceMode.Select;
            SelectDialog.ObjectSelected += NomenclatureSelected;

            mytab.TabParent.AddSlaveTab(mytab, SelectDialog);
        }