Ejemplo n.º 1
0
        public ActionResult SubmitProductValue(string[] listJSON)
        {
            JsonSerialize jsonS = new JsonSerialize();
            var           clientsProductsValuesVM = jsonS.JsonDeserialize <ClientProductValueVM>(listJSON[0]);

            _productAppService.ConnectRouteToClient(clientsProductsValuesVM);

            return(Json(new
            {
                success = true,
                Message = "OK"
            }));
        }
Ejemplo n.º 2
0
        public IActionResult ConnectProductToClient(ICollection <ClientProductValueVM> clientsProductsValuesVM)
        {
            //if (ModelState.IsValid)
            if (true)
            {
                try
                {
                    var newClient = _productApplicationService.ConnectRouteToClient(clientsProductsValuesVM);

                    if (newClient.Count > 0)
                    {
                        return(Ok(newClient));
                    }
                    else
                    {
                        return(NotFound());
                    }
                }
                catch (Exception ex)
                {
                    return(BadRequest(ex.Message));
                }
            }
        }