コード例 #1
0
        public static WCFPurchaseOrderList Make(string creationDate, string poId, string supplierName)
        {
            WCFPurchaseOrderList poList = new WCFPurchaseOrderList();

            poList.creationDate = creationDate;
            poList.poId         = poId;
            poList.supplierName = supplierName;

            return(poList);
        }
コード例 #2
0
ファイル: Service.svc.cs プロジェクト: cheesiang89/Team10AD
        public WCFPurchaseOrderList[] CompletedPurchaseOrderList()
        {
            List <WCFPurchaseOrderList> wcfpolist = new List <WCFPurchaseOrderList>();

            List <PurchaseOrder> polist = Data.CompletedPurchaseOrderList();

            foreach (PurchaseOrder po in polist)
            {
                WCFPurchaseOrderList wcfpo = WCFPurchaseOrderList.Make(po.CreationDate.HasValue ? po.CreationDate.Value.ToString("dd-MMM-yyyy") : null, po.POID.ToString(), po.Supplier.SupplierName);
                wcfpolist.Add(wcfpo);
            }

            return(wcfpolist.ToArray <WCFPurchaseOrderList>());
        }