Пример #1
0
        public void DataBind()
        {
            if (BillId != null)
            {
                if (IsDetailBeforePerformDataSelect)
                {
                    return;
                }

                InventoryCommandBO     inventoryCommandBO           = new InventoryCommandBO();
                InventoryTransactionBO purchaseInvoiceTransactionBO = new InventoryTransactionBO();
                GridDeliveryPlanning.DataSource   = purchaseInvoiceTransactionBO.GetDeliveryPlanningForBill <PurchaseInvoice>(session, BillId);
                GridDeliveryPlanning.KeyFieldName = "InventoryTransactionId";
                GridDeliveryPlanning.DataBind();
                GridDeliveryActual.DataSource   = inventoryCommandBO.GetActualInventoryJournalOfBill(session, BillId, NAS.DAL.CMS.ObjectDocument.DefaultObjectTypeCustomFieldEnum.INVENTORY_OUT_SALE_INVOICE);
                GridDeliveryActual.KeyFieldName = "InventoryJournalId";
                GridDeliveryActual.DataBind();
            }
        }
Пример #2
0
        public XPCollection <Transaction> GetTransactionsAndRelatedTransactions(Session session, Guid billId)
        {
            try
            {
                XPCollection <Transaction> ret = null;
                XPCollection <Transaction> billTransactions      = null;
                XPCollection <Transaction> voucherTransactions   = null;
                XPCollection <Transaction> inventoryTransactions = null;
                InventoryCommandBO         inventoryCommandBO    = new InventoryCommandBO();

                inventoryTransactions = inventoryCommandBO.GetInventoryFinancialTransactionOfSourceBill(session, billId);

                ReceiptVoucherTransactionBO receiptVoucherTransactionBO = new ReceiptVoucherTransactionBO();

                //Get bill transactions
                billTransactions = GetTransactions(session, billId);
                //Get related voucher transactions
                voucherTransactions =
                    receiptVoucherTransactionBO.GetRelatedTransactionsWithBill(session, billId);
                //Get related inventory transactions...

                ret = billTransactions;

                if (voucherTransactions != null)
                {
                    ret.AddRange(voucherTransactions);
                }

                if (inventoryTransactions != null)
                {
                    ret.AddRange(inventoryTransactions);
                }

                return(ret);
            }
            catch (Exception)
            {
                throw;
            }
        }
Пример #3
0
        public XPCollection <Transaction> GetInventoryTransactions(Session session, Guid billId)
        {
            InventoryCommandBO inventoryCommandBO = new InventoryCommandBO();

            return(inventoryCommandBO.GetInventoryFinancialTransactionOfSourceBill(session, billId));
        }