public int GetSumRetrievalDetailQty(QTY_TYPE quantityType, Retrieval retrieval)
        {
            int?totalQty = 0;

            switch (quantityType)
            {
            case QTY_TYPE.ACTUAL_QTY:
                totalQty = retrieval.RetrievalDetails.Where(x => x.Retrieval.Id == retrieval.Id).Sum(x => x.ActualQty).Value;
                break;

            case QTY_TYPE.NEEDED_QTY:
                totalQty = retrieval.RetrievalDetails.Where(x => x.Retrieval.Id == retrieval.Id).Sum(x => x.NeededQty);
                break;
            }

            return(totalQty.HasValue ? totalQty.Value : 0);
        }
        public int GetSumRetrievalDetailQty(QTY_TYPE quantityType, Retrieval retrieval)
        {
            int? totalQty = 0;
            switch (quantityType)
            {
                case QTY_TYPE.ACTUAL_QTY:
                    totalQty = retrieval.RetrievalDetails.Where(x=> x.Retrieval.Id == retrieval.Id).Sum(x => x.ActualQty).Value;
                    break;
                case QTY_TYPE.NEEDED_QTY:
                    totalQty = retrieval.RetrievalDetails.Where(x => x.Retrieval.Id == retrieval.Id).Sum(x => x.NeededQty);
                    break;
            }

            return totalQty.HasValue ? totalQty.Value : 0;
        }