Beispiel #1
0
        private void CheckPurchaseOrderItem(List <PurchaseOrderDDTO> dtoDs)
        {
            ErrorItem errorItem;

            //check item is exists in master
            ItemBIZ bizItem = new ItemBIZ();

            foreach (PurchaseOrderDDTO item in dtoDs)
            {
                ItemDTO dtoItem = bizItem.LoadItem(item.ITEM_CD);
                if (dtoItem == null)
                {
                    errorItem = new ErrorItem(null, TKPMessages.eValidate.VLM0109.ToString());
                    throw new BusinessException(errorItem);
                }
            }
        }
Beispiel #2
0
        private void CheckOrderItem(List <TmpDemandOrderDTO> dtoItems)
        {
            ErrorItem errorItem;

            if (dtoItems.Count == 0)
            {
                errorItem = new ErrorItem(null, TKPMessages.eValidate.VLM0115.ToString());
                throw new BusinessException(errorItem);
            }

            //check item is exists in master
            ItemBIZ bizItem = new ItemBIZ();

            foreach (TmpDemandOrderDTO orderItem in dtoItems)
            {
                ItemDTO dtoItem = bizItem.LoadItem(orderItem.ITEM_CD);
                if (dtoItem == null)
                {
                    errorItem = new ErrorItem(null, TKPMessages.eValidate.VLM0109.ToString());
                    throw new BusinessException(errorItem);
                }
            }
        }