public static bool SetOrderId(string fieldName, int modelId, int orderId) { XmlManage manage = XmlManage.Instance(GetXmlFieldList(modelId), XmlType.Content); string nodeName = "/ArrayOfFieldInfo/FieldInfo[@Id=\"" + fieldName.ToLower() + "\"]"; manage.SetAttributesValue(nodeName, "OrderId", orderId.ToString()); return(UpdateField(modelId, manage.Xml)); }
public static bool SetOrderId(IList <FieldInfo> fieldInfoList, int modelId) { XmlManage manage = XmlManage.Instance(GetXmlFieldList(modelId), XmlType.Content); foreach (FieldInfo info in fieldInfoList) { string nodeName = "/ArrayOfFieldInfo/FieldInfo[@Id=\"" + info.Id.ToLower() + "\"]"; manage.SetAttributesValue(nodeName, "OrderId", info.OrderId.ToString()); } return(UpdateField(modelId, manage.Xml)); }