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" })); }
public ActionResult PutAjaxHandlerRemoveClients(string[] clientsIDs) { try { JsonSerialize jsonS = new JsonSerialize(); var routeClientVM = jsonS.JsonDeserialize <RouteClientVM>(clientsIDs[0]); _routeApplicationService.RemoveRouteFromClient(routeClientVM); return(Json(new { success = true, Message = "OK" })); } catch (Exception ex) { throw ex; } }
public ActionResult PostAjaxHandlerCreateDelivery(string[] tbBoxesTypes, string routeID, string userID) { try { JsonSerialize jsonS = new JsonSerialize(); var deliveryBoxTypeVMs = jsonS.JsonDeserialize <BoxTypeVM>(tbBoxesTypes[0]); OrderVM deliveryVM = new OrderVM(); deliveryVM.RouteID = new Guid(routeID); deliveryVM.UserID = new Guid(userID); deliveryVM.BoxesTypes = deliveryBoxTypeVMs; _deliveryService.Add(deliveryVM); return(Json(new { success = true, Message = "OK" })); } catch (Exception ex) { throw ex; } }