public IActionResult Create() { var boxesType = _boxApplicationService.GetAllBoxesType() .Select(boxType => new SelectListItem { Value = boxType.DT_RowId, Text = $"{boxType.Name} - {boxType.Description}" }).ToList(); ViewData["BoxesType"] = boxesType; 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 boxes = _boxApplicationService.GetBoxesParentsWithBoxTypeEndProduct() .Select(box => new SelectListItem { Value = box.DT_RowId, Text = $"{box.BoxBarcode.BarcodeEAN13} {box.Description}" }).ToList(); ViewData["Boxes"] = boxes; return(View()); }
public IActionResult BoxCreate() { var boxesType = _boxAppService.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; return(View()); }