Exemple #1
0
        public ActionResult DeliveredPackages(LoginPassModel user)
        {
            var userFromDB = _proxy.GetAllUsers().SingleOrDefault(x => x.Username == user.Username);
            var packages   = _proxy.GetAllPackages().Where(x => x.CourierID == userFromDB.IDInDB).Select(x => new WebClientMVC.Models.PackageModel
            {
                Barcode           = x.barcode,
                Distance          = _proxy.GetDeliveryByPackageBarcode(x.barcode).Distance.ToString(),
                Price             = _proxy.GetDeliveryByPackageBarcode(x.barcode).Price.ToString(),
                ReceiverFirstName = x.ReceiverFirstName,
                ReceiverLastName  = x.ReceiverLastName,
                StatusID          = x.StatusID
            });

            return(View(packages));
        }