예제 #1
0
        public virtual ActionResult WaveBoxes(int bucketId)
        {
            var model = new WaveBoxListModel
            {
                BucketId = bucketId,
                //StateFilter = stateFilter,
                //ActivityFilter = activityFilter,
                BoxesList = (from box in _service.GetBucketBoxes(bucketId)
                             let routeBox = Url.RouteCollection[DcmsLibrary.Mvc.PublicRoutes.DcmsConnect_SearchUcc1]
                                            select new BoxModel
                {
                    Ucc128Id = box.Ucc128Id,
                    AreaId = box.AreaId,
                    VerifyDate = box.VerifyDate,
                    ExpectedPieces = box.ExpectedPieces,
                    CurrentPieces = box.CurrentPieces,
                    CartonId = box.CartonId,
                    CancelDate = box.CancelDate,
                    MaxPitchingEndDate = box.PitchingEndDate,
                    PickslipId = box.PickslipId,
                    CreatedBy = box.CreatedBy,
                    CreatedDate = box.CreatedDate,
                    VWhId = box.VWhId,
                    UrlInquiryBox = routeBox == null ? null : Url.RouteUrl(DcmsLibrary.Mvc.PublicRoutes.DcmsConnect_SearchUcc1, new
                    {
                        id = box.Ucc128Id
                    })
                }).ToArray()
            };

            return(PartialView(this.Views._waveBoxesPartial, model));
        }
예제 #2
0
        public virtual ActionResult WaveBoxes(int bucketId)
        {
            var bucket = _service.Value.GetBucket(bucketId);
            var boxes  = _service.Value.GetBucketBoxes(bucketId);
            var model  = new WaveBoxListModel
            {
                Bucket = new BucketModel(bucket, _service.Value.GetCustomerName(bucket.MaxCustomerId), BucketModelFlags.HideViewerLink),
                // List sorted by pull/pitch, followed by box state
                BoxesList = (from box in boxes
                             let routeBox = Url.RouteCollection[DcmsLibrary.Mvc.PublicRoutes.DcmsConnect_SearchUcc1]
                                            let routePickslip = Url.RouteCollection[DcmsLibrary.Mvc.PublicRoutes.DcmsConnect_SearchPickslip1]
                                                                let routeCarton = Url.RouteCollection[DcmsLibrary.Mvc.PublicRoutes.DcmsConnect_SearchCarton1]
                                                                                  select new BoxModel
                {
                    Ucc128Id = box.Ucc128Id,
                    AreaId = box.AreaId,
                    VerifyDate = box.VerifyDate,
                    ExpectedPieces = box.ExpectedPieces,
                    CurrentPieces = box.CurrentPieces,
                    CartonId = box.CartonId,
                    CancelDate = box.CancelDate,
                    MaxPitchingEndDate = box.PitchingEndDate,
                    PickslipId = box.PickslipId,
                    CreatedBy = box.CreatedBy,
                    CreatedDate = box.CreatedDate,
                    VWhId = box.VWhId,
                    UrlInquiryBox = routeBox == null ? null : Url.RouteUrl(DcmsLibrary.Mvc.PublicRoutes.DcmsConnect_SearchUcc1, new
                    {
                        id = box.Ucc128Id
                    }),
                    UrlInquiryPickslip = routePickslip == null ? null : Url.RouteUrl(DcmsLibrary.Mvc.PublicRoutes.DcmsConnect_SearchPickslip1, new
                    {
                        id = box.PickslipId
                    }),
                    UrlInquiryCarton = routeCarton == null ? null : Url.RouteUrl(DcmsLibrary.Mvc.PublicRoutes.DcmsConnect_SearchCarton1, new
                    {
                        id = box.CartonId
                    })
                }).OrderBy(p => string.IsNullOrWhiteSpace(p.CartonId)).ThenBy(p => p.State).ThenBy(p => p.Ucc128Id).ToList()
            };

            return(View(Views.WaveBox, model));
        }