int[] getTicketPositions(categoriesJSON c, int templateNum) { //var c = getCategoryByID(categoryID); var t = getTemplate(c, templateNum); //for (int i = 0; i < t.Positions.Length; i++) print(t.Positions[i]); if (t != null) { return(t.Positions); } //print("Error! [getTicketPositions] categoryID#"+ c.CatId + " with template#"+ templateNum + " not find!"); return(new int[] { }); }
// (отлкючено) Получить категорию по её индексу в масиве /*categoriesJSON getCategory(int index) { * print("getCategory(" + index + ")"); * return serverTemplates.Cat[index]; * }*/ // Получить шаблоны из указаной категории, по указаному (JSON) id templatesJSON getTemplate(categoriesJSON inCategory, int id) { if (inCategory != null) { //print("inCategory.Templates.Length: " + inCategory.Templates.Length); for (int i = 0; i < inCategory.Templates.Length; i++) { if (inCategory.Templates[i].Templ_id == id) { return(inCategory.Templates[i]); } } } return(null); }