Exemple #1
0
        private void NewNomenclatureSelectorOnEntitySelectedResult(object sender, JournalSelectedNodesEventArgs e)
        {
            var node = e.SelectedNodes.FirstOrDefault();

            if (node == null)
            {
                _newRow = null;
                return;
            }

            var nomenclature = TemplateUoW.GetById <Nomenclature>(node.Id);

            _newRow.NomenclatureNew = nomenclature;
            TemplateUoW.Root.AddItem(_newRow);
        }
        void SelectOldNomenclature_ObjectSelected1(object sender, OrmReferenceObjectSectedEventArgs e)
        {
            var nomenclature = e.Subject as Nomenclature;

            newRow = new RegradingOfGoodsTemplateItem()
            {
                NomenclatureOld = nomenclature
            };

            var selectNewNomenclature = new OrmReference(Repositories.NomenclatureRepository.NomenclatureOfGoodsOnlyQuery());

            selectNewNomenclature.Mode            = OrmReferenceMode.Select;
            selectNewNomenclature.TabName         = "Выберите новую номенклатуру";
            selectNewNomenclature.ObjectSelected += SelectNewNomenclature_ObjectSelected;
            MyTab.TabParent.AddSlaveTab(MyTab, selectNewNomenclature);
        }
Exemple #3
0
        private void OldNomenclatureSelectorOnEntitySelectedResult(object sender, JournalSelectedNodesEventArgs e)
        {
            var node = e.SelectedNodes.FirstOrDefault();

            if (node == null)
            {
                return;
            }

            var nomenclature = TemplateUoW.GetById <Nomenclature>(node.Id);

            _newRow = new RegradingOfGoodsTemplateItem()
            {
                NomenclatureOld = nomenclature
            };

            var newNomenclatureSelector =
                CreateNomenclatureSelector("Выберите новую номенклатуру", NewNomenclatureSelectorOnEntitySelectedResult);

            MyTab.TabParent.AddSlaveTab(MyTab, newNomenclatureSelector);
        }