public ActionResult AdjDetails(string stockAdjId)
        {
            AdjustmentDetailsViewModel stockAdjViewModel = imService.GetAdjustmentViewModel(stockAdjId);

            if (stockAdjViewModel == null)
            {
                return(HttpNotFound());
            }
            return(View(stockAdjViewModel));
        }
Пример #2
0
        public AdjustmentDetailsViewModel GetAdjustmentViewModel(string stockAdjId)
        {
            StockAdjustment          stockAdjustment   = context.StockAdjustment.FirstOrDefault(x => x.StockAdjId == stockAdjId);
            List <TransactionDetail> transactionDetail = context.TransactionDetail.Where(x => x.TransactionRef == stockAdjId).ToList();

            if (stockAdjustment == null)
            {
                return(null);
            }
            var stockAdjViewModel = new AdjustmentDetailsViewModel
            {
                StockAdjustment   = stockAdjustment,
                AdjustmentDetails = transactionDetail
            };

            return(stockAdjViewModel);
        }