符合中小企业对网站设计、功能常规化式的企业展示型网站建设
本套餐主要针对企业品牌型网站、中高端设计、前端互动体验...
商城网站建设因基本功能的需求不同费用上面也有很大的差别...
手机微信网站开发、微信官网、微信商城网站...
DataSet 和 DataTable都有现成的方法:WriteXml
创新互联是一家专注于成都做网站、网站设计与策划设计,松桃网站建设哪家好?创新互联做网站,专注于网站建设十余年,网设计领域的专业建站公司;建站业务涵盖:松桃等地区。松桃做网站价格咨询:18982081108
DataTable tb = this.dataGridView1.DataSource as DataTable;
if(tb != null)
{
tb.WriteXml(@"C:\table.xml",true);
return;
}
DataView dv = this.dataGridView1.DataSource as DataView;
if(dv != null)
{
dv.Table.WriteXml(@"C:\table.xml",true);
return;
}
IList list = this.dataGridView1.DataSource as IList;
if(list != null)
{
//to do,如果是IList,就要你自己想办法导出了
//XmlDocument or XmlWriter都可以考虑
}
DataSet
和
DataTable
都有现成的方法:WriteXml
DataTable
tb
=
this.
dataGridView
1.DataSource
as
DataTable;
if(tb
!=
null)
{
tb.WriteXml(@"C:\table.xml",true);
return;
}
DataView
dv
=
this.dataGridView1.DataSource
as
DataView;
if(dv
!=
null)
{
dv.Table.WriteXml(@"C:\table.xml",true);
return;
}
IList
list
=
this.dataGridView1.DataSource
as
IList;
if(list
!=
null)
{
//to
do,如果是IList,就要你自己想办法导出了
//XmlDocument
or
XmlWriter
都可以考虑
}
Imports System.IO
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim f As New FileInfo("d:\doc.xml")
If f.Exists = False Then
f.Create()
f.Refresh()
End If
Dim s As String = ""
Dim sw As StreamWriter = f.CreateText()
s = "?xml version=""1.0"" encoding=""GB2312""?"
sw.WriteLine(s)
sw.WriteLine("doc")
sw.WriteLine(" assembly")
sw.WriteLine("userId34/userId")
sw.WriteLine("userName张三/userName")
sw.WriteLine("qxbz1/qxbz")
sw.WriteLine(" /assembly")
sw.WriteLine("/doc")
sw.Flush()
sw.Close()
Process.Start("d:\doc.xml")
End Sub
End Class