/// <summary> /// 根据节点编号删除流程节点 /// </summary> /// <returns>执行结果</returns> private string Node_DeleteNodeOfNodeID() { try { int delResult = 0; string FK_Node = getUTF8ToString("FK_Node"); if (string.IsNullOrEmpty(FK_Node)) { return("true"); } BP.WF.Node node = new BP.WF.Node(int.Parse(FK_Node)); if (node.IsExits == false) { return("true"); } if (node.IsStartNode == true) { return("开始节点不允许被删除。"); } delResult = node.Delete(); if (delResult > 0) { return("true"); } return("Delete Error."); } catch (Exception ex) { return(ex.Message); } }
/// <summary> /// 删除节点 /// </summary> /// <returns></returns> public ActionResult DeleteNode(int nodeId) { try { BP.WF.Node delNode = new BP.WF.Node(nodeId); delNode.Delete(); var sql = string.Format("delete from wf_direction where node={0} or tonode={0}", nodeId); BP.DA.DBAccess.RunSQL(sql); //var directionList = FlowService.GetDirectionsByFlowNo(delNode.FK_Flow); return(Json(new { success = true, msg = "删除成功" })); } catch { return(Json(new { success = false, msg = "删除失败" })); } }