1.数组中使用linq

public List<A_FlowPointModel> PointList;

 var result = PointList.Where(p => p.ParentPointIdList.Contains(parentPointId.ToString()) == true);

  foreach (var point in result)
        {}

2、xml 中使用linq

using System.Xml.Linq;

  string xmlPath = Server.MapPath("~/ERPA/Flow/FlowXml/") + flowId + ".xml";
  string xmlTemplatePath = Server.MapPath("~/ERPA/Flow/FlowXml/newflow.xml"); //xml模板

  XElement WebFlow = XElement.Load(xmlTemplatePath);
   WebFlow.Element("FlowConfig").Element("BaseProperties").SetAttributeValue("flowId", FlowID);
   WebFlow.Element("FlowConfig").Element("BaseProperties").SetAttributeValue("flowText", txtFlowName.Text);

 

 XElement steps=WebFlow.Element("Steps");
  XElement actions = WebFlow.Element("Actions");

      new XElement("BaseProperties",
                new XAttribute("id",point.PointID),
                new XAttribute("text",point.PointName),
                 new XAttribute("stepType", "NormalStep")),
                 XElement.Parse(@"<VMLProperties width='200' height='200' x='"+xPosition+"px' y='" +yPosition + "px' textWeight='' strokeWeight='' zIndex='40' />"),
                 new XElement("FlowProperties"));

 

相关文章:

  • 2021-04-14
  • 2021-10-02
  • 2021-04-12
  • 2021-05-19
  • 2021-05-07
  • 2021-08-24
  • 2021-11-06
  • 2021-09-28
猜你喜欢
  • 2021-12-29
  • 2021-07-23
  • 2021-06-29
  • 2021-06-05
  • 2021-05-28
  • 2021-05-02
  • 2021-07-27
相关资源
相似解决方案