Beispiel #1
0
        private void PopulateIndexViewModel(PropertyEditorViewModel model)
        {
            var vwh = _service.GetVwhList().ToList();

            model.VirtualWareHouseList = vwh.Select(p => MapCode(p));
            model.TargetVwhList        = vwh.Select(p => MapCode(p));
            var areas = _service.GetCartonAreas();

            model.SourceAreas      = new SelectList(areas.Where(p => (p.LocationNumberingFlag && (p.IsCartonArea))).OrderBy(m => m.BuildingId), "AreaId", "Description", "BuildingId", 1);
            model.DestinationAreas = new SelectList(areas.Where(p => (!p.LocationNumberingFlag)).OrderBy(m => m.BuildingId), "AreaId", "Description", "BuildingId", 1);
            var qualityCode = _service.GetQualityCodes();

            model.TargetQualityCodeList = qualityCode.Select(p => MapCode(p));
            model.SourceQualityCodeList = qualityCode.Select(p => MapCode(p));
            var saleTypes = _service.GetSaleTypeList();

            model.SaleTypes = saleTypes.Select(p => MapCode(p));
            var buildings = _service.GetBuildingList();

            model.BuildingList = buildings.Select(p => MapCode(p));
            var priceSeasonCodes = _service.GetPriceSeasonCodes();

            model.PriceSeason = priceSeasonCodes.Select(p => MapCode(p));

            var sewingPlants = _service.GetSewingPlantCodes();

            model.SewingPlant = sewingPlants.Select(p => MapCode(p));
        }
Beispiel #2
0
        private ActionResult DoDisplayRequest(PullRequest requestInfo, ViewTab selectedTab)
        {
            var model = new ManageSkuViewModel(requestInfo);

            var qualities = _service.GetQualityCodes();

            model.Qualities = qualities.Select(p => MapCode(p));

            var sewingPlants = _service.GetSewingPlantCodes();

            model.SewingPlantCodes = sewingPlants.Select(p => MapCode(p));

            var priceSeasonCodes = _service.GetPriceSeasonCodes();

            model.PriceSeasonCodes = priceSeasonCodes.Select(p => MapCode(p));

            var buildings = _service.GetBuildingList();

            model.BuildingList = buildings.Select(p => MapCode(p));

            //model.CurrentRequest = new ManageSkuRequestModel(requestInfo);

            var skus = _service.GetRequestSKUs(requestInfo.CtnResvId);

            model.RequestedSkus = skus.Select(p => new RequestSkuViewModel(p)).ToList();

            var result = _service.GetAssignedCartons(requestInfo.CtnResvId);

            model.AssignedCartonInfo = result.Select(row => new AssignedCartonModel
            {
                PulledCartons = row.PulledCartons,
                TotalCartons  = row.TotalCartons,
                PulledPieces  = row.PulledPieces,
                TotalPieces   = row.TotalPieces,
                Sku           = new SkuModel
                {
                    Style     = row.Sku.Style,
                    Color     = row.Sku.Color,
                    Dimension = row.Sku.Dimension,
                    SkuSize   = row.Sku.SkuSize,
                    SkuId     = row.Sku.SkuId,
                    UpcCode   = row.Sku.UpcCode
                }
            }).ToList();
            model.SelectedTab = selectedTab;

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