示例#1
0
        public void LoadViewDataTracking(ITrackingApplicationService trackingAppService)
        {
            var trackingsTypes = trackingAppService.GetAllTrackingsTypesByPlace()
                                 .Select(trace => new SelectListItem
            {
                Value = trace.DT_RowId,
                Text  = trace.Description
            }).ToList();

            ViewData["TrackingTypes"] = trackingsTypes;
        }
        public ActionResult MakeDelivery(Guid routeID, Guid clientID, Guid deliveryID)
        {
            var trackingsTypes = _trackingApplicationService.GetAllTrackingsTypesByPlace()
                                 .Select(trace => new SelectListItem
            {
                Value = trace.DT_RowId,
                Text  = trace.Description
            }).ToList();

            ViewData["TrackingTypes"] = trackingsTypes;


            var client = _clientService.GetById(clientID);

            ViewData["Client"]     = client.Name;
            ViewData["ClientID"]   = clientID;
            ViewData["DeliveryID"] = deliveryID;

            return(View());
        }
示例#3
0
        public IActionResult BoxStock()
        {
            var boxesType = _boxApplicationService.GetAllBoxesType()
                            .Select(boxType => new SelectListItem
            {
                Value = boxType.DT_RowId,
                Text  = $"{boxType.Name} - {boxType.Description}"
            }).ToList();

            ViewData["BoxesType"] = boxesType;

            var clients = _clientService.GetAll()
                          .Select(client => new SelectListItem
            {
                Value = client.DT_RowId,
                Text  = client.Name
            }).ToList();

            ViewData["Clients"] = clients;

            var products = _productApplicationService.GetAll()
                           .Select(prod => new SelectListItem
            {
                Value = prod.DT_RowId,
                Text  = $"{prod.Name} - {prod.Description} - {prod.Package} - {prod.Capacity}{prod.UnitMeasure}"
            }).ToList();

            ViewData["Products"] = products;

            var trackingsTypes = _trackingService.GetAllTrackingsTypesByPlace()
                                 .Select(trace => new SelectListItem
            {
                Value = trace.DT_RowId,
                Text  = trace.Description
            }).ToList();

            ViewData["TrackingTypes"] = trackingsTypes;
            return(Index());
        }