public ActionResult GetTemplateData(int nodeId) { var json = new ResultResponseWithStringData(); try { json.Success = true; json.Message = "Lyckades med att hitta mall."; json.Data = _templateService.GetTemplateData(nodeId); } catch (Exception e) { json.Success = false; json.Message = "Misslyckades med att hitta malldata: " + e.Message; } return(Json(json, JsonRequestBehavior.AllowGet)); }
public ActionResult GetPopulatedTemplateData(int templateId, int orderItemNodeId) { var json = new ResultResponseWithStringData(); try { var orderItem = _orderItemManager.GetOrderItem(orderItemNodeId); json.Success = true; json.Message = "Populerade malldata."; json.Data = _templateService.GetTemplateData(templateId, orderItem); } catch (Exception e) { json.Success = false; json.Message = "Misslyckades med att populera malldata: " + e.Message; } return(Json(json, JsonRequestBehavior.AllowGet)); }