コード例 #1
0
        /// <summary>
        /// Получение списка позиций проведенных, но не принятых накладных
        /// </summary>
        /// <param name="storageIdsSubQuery">Подзапрос для кодов МХ</param>
        /// <param name="articleIdsSubQuery">Подзапрос для кодов товаров</param>
        /// <param name="date">Дата выборки</param>
        public IEnumerable <IncomingWaybillRow> GetAcceptedAndNotReceiptedWaybillRows(ISubQuery storageIdsSubQuery, ISubQuery articleIdsSubQuery, DateTime date)
        {
            var receiptWaybillRows = receiptWaybillRepository.GetAcceptedAndNotReceiptedWaybillRows(storageIdsSubQuery, articleIdsSubQuery, date)
                                     .Select(x => ConvertToIncomingWaybillRow(x));

            var movementWaybillRows = movementWaybillRepository.GetAcceptedAndNotReceiptedIncomingWaybillRows(storageIdsSubQuery, articleIdsSubQuery, date)
                                      .Select(x => ConvertToIncomingWaybillRow(x));

            var changeOwnerWaybillRows = changeOwnerWaybillRepository.GetAcceptedAndNotReceiptedIncomingWaybillRows(storageIdsSubQuery, articleIdsSubQuery, date)
                                         .Select(x => ConvertToIncomingWaybillRow(x));

            var returnFromClientWaybillRows = returnFromClientWaybillRepository.GetAcceptedAndNotReceiptedWaybillRows(storageIdsSubQuery, articleIdsSubQuery, date)
                                              .Select(x => ConvertToIncomingWaybillRow(x));

            return(receiptWaybillRows
                   .Concat(movementWaybillRows)
                   .Concat(changeOwnerWaybillRows)
                   .Concat(returnFromClientWaybillRows));
        }