/// <summary> /// 获取流程信息,是否启用勾选框 /// </summary> /// <param name="nodeParent"></param> /// <param name="parentId"></param> public static void CreateProDef(Node nodeParent, String parentId, Boolean isCheck) { String url = StaticValue.ServicePath.ProdefPath; url += "?category=" + parentId + "&size=100&latest=true&order=desc"; String userName = StaticValue.ServicePath.UserName; String passWord = StaticValue.ServicePath.PassWord; String result = RestUserLoginService.Post(url, "{}", userName, passWord); ProdefDataEntity prodefData = JsonConvert.DeserializeObject <ProdefDataEntity>(result); foreach (var prodef in prodefData.Data) { Node nodeChild = new Node(); nodeChild.Name = "PRODEF_" + prodef.Id; nodeChild.Text = prodef.Name; nodeChild.Tag = prodef; nodeChild.Image = Image.FromFile(AppDomain.CurrentDomain.BaseDirectory + @"\icon\page_go.png"); nodeParent.Nodes.Add(nodeChild); nodeParent.Expanded = true; if (isCheck) { nodeChild.CheckBoxVisible = true; nodeParent.CheckBoxVisible = true; } } }
/// <summary> /// 获取环节信息 /// </summary> /// <param name="prodefIds"></param> /// <returns></returns> public static ActdefDataEntity GetActdefInfo(String[] prodefIds) { String url = StaticValue.ServicePath.ActdefPath; String userName = StaticValue.ServicePath.UserName; String passWord = StaticValue.ServicePath.PassWord; var tempEntity = new { processDefKeys = prodefIds }; string jsonData = JsonConvert.SerializeObject(tempEntity); String restult = RestUserLoginService.Post(url, jsonData, userName, passWord); ActdefDataEntity prodefData = JsonConvert.DeserializeObject <ActdefDataEntity[]>(restult)[0]; return(prodefData); }