Example #1
0
        private void NomenclatureSelectorOnEntitySelectedResult(object sender, JournalSelectedNodesEventArgs e)
        {
            var nomenclatureNode = e.SelectedNodes.FirstOrDefault();

            if (nomenclatureNode == null)
            {
                return;
            }

            var nomenclature = UoW.GetById <Nomenclature>(nomenclatureNode.Id);

            var node = new GoodsReceptionVMNode
            {
                Category       = nomenclature.Category,
                NomenclatureId = nomenclature.Id,
                Name           = nomenclature.Name
            };

            if (node.Category == NomenclatureCategory.equipment)
            {
                node.Direction = Domain.Orders.Direction.PickUp;
            }

            if (!GoodsReceptionList.Any(n => n.NomenclatureId == node.NomenclatureId))
            {
                GoodsReceptionList.Add(node);
            }
        }
Example #2
0
        void FillTrees()
        {
            GoodsReceptionVMNode resultAlias       = null;
            Nomenclature         nomenclatureAlias = null;

            var orderBottles = UoW.Session.QueryOver <Nomenclature>(() => nomenclatureAlias)
                               .Where(n => n.Category == NomenclatureCategory.bottle)
                               .SelectList(list => list
                                           .Select(() => nomenclatureAlias.Id).WithAlias(() => resultAlias.NomenclatureId)
                                           .Select(() => nomenclatureAlias.Name).WithAlias(() => resultAlias.Name)
                                           ).TransformUsing(Transformers.AliasToBean <GoodsReceptionVMNode>())
                               .List <GoodsReceptionVMNode>();

            if (Entity.ReturnedItems.Any())
            {
                LoadReturned();
            }
        }
Example #3
0
        void RefWin_ObjectSelected(object sender, OrmReferenceObjectSectedEventArgs e)
        {
            Nomenclature nomenclature = (e.Subject as Nomenclature);

            if (nomenclature == null)
            {
                return;
            }
            var node = new GoodsReceptionVMNode()
            {
                Category       = nomenclature.Category,
                NomenclatureId = nomenclature.Id,
                Name           = nomenclature.Name
            };

            if (!GoodsReceptionList.Any(n => n.NomenclatureId == node.NomenclatureId))
            {
                GoodsReceptionList.Add(node);
            }
        }
Example #4
0
        void RefWin_ObjectSelected(object sender, OrmReferenceObjectSectedEventArgs e)
        {
            Nomenclature nomenclature = (e.Subject as Nomenclature);

            if (nomenclature == null)
            {
                return;
            }
            var node = new GoodsReceptionVMNode {
                Category       = nomenclature.Category,
                NomenclatureId = nomenclature.Id,
                Name           = nomenclature.Name
            };

            if (node.Category == NomenclatureCategory.equipment)
            {
                node.Direction = Domain.Orders.Direction.PickUp;
            }

            if (!GoodsReceptionList.Any(n => n.NomenclatureId == node.NomenclatureId))
            {
                GoodsReceptionList.Add(node);
            }
        }