コード例 #1
0
ファイル: Service.svc.cs プロジェクト: cheesiang89/Team10AD
        public WCFDisbursement[] ListDisbursements(String status)
        {
            List <WCFDisbursement> l = new List <WCFDisbursement>();

            foreach (Disbursement d in Data.ListDisbursements(status))
            {
                WCFDisbursement w = WCFDisbursement.Make(d.DisbursementID.ToString(), d.CollectionDate.HasValue ? d.CollectionDate.Value.ToString("dd-MMM-yyyy") : null, d.CollectionPoint.PointName, d.Department.DepartmentName, d.Status, d.StoreStaffID.ToString());
                l.Add(w);
            }

            return(l.ToArray <WCFDisbursement>());
        }
コード例 #2
0
        public static WCFDisbursement Make(string disbursementID, string collectionDate, string pointName, string departmentName, string status, string storeStaffID)
        {
            WCFDisbursement c = new WCFDisbursement();

            c.DisbursementID = disbursementID;
            c.CollectionDate = collectionDate;
            c.PointName      = pointName;
            c.DepartmentName = departmentName;
            c.Status         = status;
            c.StoreStaffID   = storeStaffID;
            return(c);
        }