public void addRequisitionOrderItem(RequisitionOrderItem item)
 {
     if (requisitionOrderItemsField == null)
     {
         requisitionOrderItemsField = new List <RequisitionOrderItem>();
     }
     requisitionOrderItemsField.Add(item);
 }
    private RequisitionOrderItem fillOrderDetail(OrderDetail orderDetail)
    {

        RequisitionOrderItem item = new RequisitionOrderItem();

        
        item.id = orderDetail.Id.ToString();
        item.sequenceNo = orderDetail.Sequence;
        item.sequenceNoSpecified = true;
        item.memo = string.Empty;
        item.requiredQuantity = Convert.ToDouble(orderDetail.OrderedQty);
        item.requiredQuantitySpecified = true;
        item.deliveredQuantity = 0;
        if (orderDetail.ShippedQty != null)
        {
            item.deliveredQuantity = Convert.ToDouble(orderDetail.ShippedQty);
        }
        item.deliveredQuantitySpecified = true;
        item.receivedQuantity = 0;
        if (orderDetail.ReceivedQty != null)
        {
            item.receivedQuantity = Convert.ToDouble(orderDetail.ReceivedQty);
        }
        item.receivedQuantitySpecified = true;
        item.unitCount = Convert.ToDouble(orderDetail.UnitCount);
        item.unitCountSpecified = true;

        UOM u = new UOM();
        u.abbreviation = orderDetail.Uom.Code;
        u.description = orderDetail.Uom.Description;

        Material m = new Material();
        m.quantityUOM = u;
        m.id = orderDetail.Item.Code;
        m.no = orderDetail.Item.Code;
        m.name = orderDetail.Item.Description;
        m.description = orderDetail.Item.Description;

        Material supM = new Material();
        supM.quantityUOM = u;
        supM.id = orderDetail.ReferenceItemCode;
        supM.no = orderDetail.ReferenceItemCode;
        supM.name = orderDetail.ReferenceItemCode;
        supM.description = orderDetail.ReferenceItemCode;

        string2MaterialMapEntry[] mapEntry = new string2MaterialMapEntry[1];
        mapEntry[0] = new string2MaterialMapEntry();
        mapEntry[0].key = string.Empty;
        mapEntry[0].value = supM;
        m.supplierMaterials = mapEntry;

        item.material = m;

        return item;
    }
 public void addRequisitionOrderItem(RequisitionOrderItem item)
 {
     if (requisitionOrderItemsField == null)
     {
         requisitionOrderItemsField = new List<RequisitionOrderItem>();
     }
     requisitionOrderItemsField.Add(item);
 }