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 ActionResult AjaxHandlerGet() { var productVMs = _productAppService.GetAll(); return(Json(new { aaData = productVMs, success = true })); }
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()); }
public IEnumerable <ProductVM> GetProdutsItems() { var prod = _productApplicationService.GetAll(); IList <ProductVM> productVMs = _mapper.Map <List <ProductVM> >(prod); return(productVMs); }
public void LoadViewDataProducts(IProductApplicationService productAppService) { var products = productAppService.GetAll() .Select(prod => new SelectListItem { Value = prod.DT_RowId, Text = $"{prod.Name} - {prod.Description} - {prod.Package} - {prod.Capacity}{prod.UnitMeasure}" }).ToList(); ViewData["Products"] = products; }
public IActionResult GetAll() { return(Ok(_productApplicationService.GetAll())); }
public IActionResult GetAll(int page = 1, int pageSize = 10, string sortBy = "product_id", string sortDirection = "asc") { _logger.LogInformation("Product GetAll!"); return(Ok(_productApplicationService.GetAll(page, pageSize, sortBy, sortDirection))); }
public ActionResult <IEnumerable <string> > Get() { return(Ok(_applicationService.GetAll())); }