Exemple #1
0
        public ItemDescriptionDTO LoadItemDescription(NZString MasterNo, NZString PartNo)
        {
            ItemDescriptionDTO dtoItemDesc = new ItemDescriptionDTO();
            ItemDTO            dtoItem     = LoadItem(MasterNo, PartNo);

            if (dtoItem == null)
            {
                return(null);
            }

            dtoItemDesc.MASTER_NO = dtoItem.ITEM_CD;
            dtoItemDesc.PART_NO   = dtoItem.SHORT_NAME;

            //get customer
            DealingBIZ bizCust = new DealingBIZ();
            DealingDTO dtoCust = bizCust.LoadLocation(dtoItem.CUSTOMER_CD);

            if (dtoCust != null)
            {
                dtoItemDesc.CUSTOMER_CD   = dtoCust.LOC_CD;
                dtoItemDesc.CUSTOMER_NAME = dtoCust.LOC_DESC;
            }

            return(dtoItemDesc);
        }
Exemple #2
0
        private void CheckCustomer(DemandOrderDTO dtoOrder)
        {
            ErrorItem errorItem;

            DealingBIZ bizCustomer = new DealingBIZ();
            DealingDTO dtoCustomer = bizCustomer.LoadLocation(dtoOrder.CUSTOMER_CD);

            if (dtoCustomer == null)
            {
                errorItem = new ErrorItem(null, TKPMessages.eValidate.VLM0108.ToString());
                throw new BusinessException(errorItem);
            }

            //check customer is exists
            //CustomerBIZ bizCustomer = new CustomerBIZ();
            //CustomerDTO dtoCustomer = new CustomerDTO();
            //dtoCustomer.CUSTOMER_CODE = dtoOrder.CUSTOMER_CD;
            //if (!bizCustomer.IsExists(dtoCustomer)) {
            //    errorItem = new ErrorItem(null, TKPMessages.eValidate.VLM0108.ToString());
            //    throw new BusinessException(errorItem);
            //}
        }