Exemple #1
0
        public int InsertMockTransit(Package Package, int SenderId, int ReceiverId)
        {
            DistributionCentre mySenderCentre   = MockDataAccess.GetDistributionCentre(SenderId);
            DistributionCentre myReceiverCentre = MockDataAccess.GetDistributionCentre(ReceiverId);
            PackageTransit     newTransit       = new PackageTransit();

            newTransit.Package        = Package;
            newTransit.DateSent       = DateTime.Today.AddDays(-2);
            newTransit.SenderCentre   = mySenderCentre;
            newTransit.ReceiverCentre = myReceiverCentre;
            int newTransitId = MockDataAccess.InsertPackageTransit(newTransit);

            return(newTransitId);
        }
Exemple #2
0
        //public int InsertTransit(PackageTransit PackageTransit)
        //{
        //    Package tempPackage = new Package();
        //    tempPackage.PackageId = 1;
        //    tempPackage.BarCode = "012365423";
        //    DateTime dateTemp = new DateTime(2015, 05, 20);
        //    tempPackage.ExpirationDate = dateTemp;
        //    tempPackage.PackageType.PackageTypeId = 1;
        //    tempPackage.CurrentLocation.CentreId = 1;
        //    tempPackage.CurrentStatus = PackageStatus.InStock;
        //    // need more work to complete!
        //    return 1;
        //}
        public int InsertTransit(PackageTransit PackageTransit)
        {
            int transitId = MockDataAccess.InsertPackageTransit(PackageTransit);

            return(transitId);
        }