2011年7月15日

摘要: using System.Windows.Forms;using DevExpress.XtraPrinting;using System.Xml.Serialization;namespace MyDevExpressDemo{ /// <summary> /// PrintSettingController 的摘要说明。 /// </summary> public class PrintSettingController { PrintingSystem ps = null; string formName=null; DevExpress.XtraPrinting 阅读全文
posted @ 2011-07-15 23:39 骑着毛驴去编程 阅读(1370) 评论(0) 推荐(0) 编辑
摘要: using System;using System.Drawing;using System.Collections;using System.ComponentModel;using DevExpress.XtraReports.UI;using System.Collections.Generic;namespace DL698AmmeterTest.form{ public partial class XtraReport1 : DevExpress.XtraReports.UI.XtraReport { private string _changShang;//厂商 private s 阅读全文
posted @ 2011-07-15 23:18 骑着毛驴去编程 阅读(2382) 评论(1) 推荐(1) 编辑
摘要: 保存和加载XML文档Save()方法&Load()方法: 在用LINQ to XML方法Save()把XML文档保存到文件时,会自动创建文档开头的声明,一般不需要用XDeclaration()来创建。 XDocument.Load()是静态的,可以加载由别的程序创建的文档,创建XDocument实例。 例: XDocument xdoc = new XDocument(..............); string xmlFileName = @"C:/....../example.xml";xdoc.Save(xmlFileName); //将构造好的XML文档, 阅读全文
posted @ 2011-07-15 16:07 骑着毛驴去编程 阅读(232) 评论(0) 推荐(0) 编辑
摘要: 通过LINQ to XML生成 XML XML常常用语在客户机和服务器之间交流数据,或者多层应用程序之间交流。 用LINQ to SQL查询数据,再用LINQ to XML吧数据转换为XML. 例: ....... AreslabDataContext aresData = new aresData();//创建DataContext实例 XElement aresCustomerOrders = new XElement("customers",//创建XML片段实例 from c in aresData.Customers//利用LINQ查询数据,DataContext 阅读全文
posted @ 2011-07-15 16:06 骑着毛驴去编程 阅读(244) 评论(0) 推荐(0) 编辑
摘要: 处理XML片段 处理片段时,只是把XElement(而不是XDocument)当作顶级XML对象。 片段的唯一限制是,不能添加比较节点类型,例如:XComment,XDeclaration,XProcessingInstruction(用于XML处理指令)。 例: XElement xcust = new XElement( new XElement(......)..........); 注意:这两个类都实现了Load()和Save()方法,XElemnt 和 XDocument继承自LINQ to XML类的XContainer; 在XDocument上执行的大多数操作,在XElement 阅读全文
posted @ 2011-07-15 16:06 骑着毛驴去编程 阅读(170) 评论(0) 推荐(0) 编辑
摘要: 查询XML文档 LINQ to XML类提供属性和方法,返回可查询的类的对象集合。将XML对象作为LINQ查询对象:....... XDocumentcustomers= XDocument.Load(xmlFileName); var queryResult = from c incustomers.Elements()select c.Name;使用查询成员 1)Element():返回文档 或 片段中的第一个元素。文档的话就返回根元素; 2)Descendants():返回文档 或 片段中的所有子元素(所有级别); 例:queryResults = from c in customers 阅读全文
posted @ 2011-07-15 16:05 骑着毛驴去编程 阅读(157) 评论(0) 推荐(0) 编辑
摘要: 用程序生成RSS订阅的XML文档,然后用Response发送给客户端,即浏览器,就可以了。 首先,在用 Response 产生RSS订阅代码之前,需要以下操作: Response.ClearContent(); Response.ContentType = "text/xml;charset=UTF-8"; Response.ContentEncoding = System.Text.UTF8Encoding.UTF8;接下来,编写程序向客户端返回 如 图一及 图二是 所示代码。当浏览器或RSS订阅软件 接受到RSS订阅的 XML文档后,就会启动订阅工具(浏览器要支持RSS 阅读全文
posted @ 2011-07-15 16:04 骑着毛驴去编程 阅读(298) 评论(0) 推荐(0) 编辑
摘要: 移除事件 unbind(type [,data]) //data是要移除的函数 $('#btn').unbind("click"); //移除click $('#btn').unbind(); //移除所有 对于只需要触发一次的,随后就要立即解除绑定的情况,用one() $('#btn').one("click",function(){.......}); 模拟操作 可以用trigger()方法完成模拟操作。 $('#btn').trigger("click"); $(& 阅读全文
posted @ 2011-07-15 16:01 骑着毛驴去编程 阅读(278) 评论(0) 推荐(0) 编辑

导航