Example #1
0
        internal static MaterialReceiptPartSummary GetReceiveSummaryForPart
            (MaterialPurchaseOrder order, Part part)
        {
            var op1      = new BinaryOperator("MaterialPurchaseOrder", order);
            var op2      = new BinaryOperator("Part", part);
            var criteria = new GroupOperator(op1, op2);

            return(Repository
                   .Get <MaterialReceiptPartSummary>(part.Session)
                   .ByCriteria(criteria));
        }
Example #2
0
        public static int GetReceiveQtyForPart(MaterialPurchaseOrder order, Part part)
        {
            MaterialReceiptPartSummary summary;

            summary = GetReceiveSummaryForPart(order, part);

            if (summary == null)
            {
                return(0);
            }
            else
            {
                return(summary.ReceiveQty);
            }
        }