コード例 #1
0
        void articleChooserViewModel_OnSelect(OITM_Articles obj)
        {
            IsModalVisible = false;

            var branch = obj.OITW_BranchArticles.FirstOrDefault();
            //var OnHand1 = branch == null ? 0 : branch.OnHand1;

            var detail = new IGN1_GoodsReceiptDetail()
            {
                ItemCode = obj.ItemCode,
                Quantity = ArticleChooserViewModel.Quantity,
                UnitMsr  = obj.InvntryUom,
                AcctCode = obj.AccCount,
                //OITM_Articles = obj
                Dscription = obj.ItemName,
            };


            ArticleChooserViewModel.CleanFields();

            GoodsReceiptsDetails.Add(detail);

            if (SelectedGoodsReceipt != null)
            {
                SelectedGoodsReceipt.IGN1_GoodsReceiptDetail.Add(detail);
            }

            IsEnabled = GoodsReceiptsDetails.Count == 0;
            RaisePropertyChanged("GoodsReceiptsDetails");
        }
コード例 #2
0
        void articleChooserViewModel_OnSelect(OITM_Articles obj)
        {
            IsModalVisible = false;

            var detail = new IGE1_GoodsIssueDetail()
            {
                ItemCode = obj.ItemCode,
                Quantity = ArticleChooserViewModel.Quantity,
                UnitMsr  = obj.InvntryUom,
                AcctCode = obj.AccCount,
                // OITM_Articles = obj
                OnHand     = ArticlesHelper.GetOnHandFor(obj.ItemCode),
                Dscription = obj.ItemName,
            };


            ArticleChooserViewModel.CleanFields();


            GoodsIssuesDetails.Add(detail);

            if (SelectedGoodsIssues != null)
            {
                SelectedGoodsIssues.IGE1_GoodsIssueDetail.Add(detail);
            }

            RaisePropertyChanged("GoodsIssuesDetails");

            IsEnabled = GoodsIssuesDetails.Count == 0;
        }