添加引用http://htmlagilitypack.codeplex.com/downloads/get/437941protected
void Export(string content,string file) { HtmlDocument doc = new HtmlD...
分类:
Web程序 时间:
2014-07-22 23:17:32
阅读次数:
426
1 public DataTable ConvertToDataTable(IList
data) 2 { 3 PropertyDescriptorCollection properties = 4
TypeDescriptor.GetProperti...
分类:
其他好文 时间:
2014-07-22 23:17:12
阅读次数:
463
领导让在存储过程中批量添加数据,找出效率最高的,我看到后台代码后,发现可以将list转换成DataTable,把DataTable转换成参数传入存储过程实现批量插入数据,知道还有其他的方法,不过这个方法已经实现,就写一下了:
1.创建表。CREATE TABLE [dbo].[person]( .....
分类:
其他好文 时间:
2014-05-01 15:00:10
阅读次数:
314
1.this.dsConfig = new DataSet();//使用指定的文件将 XML
架构和数据读入 System.Data.DataSet。
this.dsConfig.ReadXml(System.Windows.Forms.Application.StartupP...
分类:
其他好文 时间:
2014-05-01 13:47:02
阅读次数:
304
目标:降低研发人员门槛,提高效率,去除重复引用DLL的工作,基础配置由抽象工厂处理。基础扩展/// /// DataTable 转换为List 集合///
/// 类型/// DataTable/// public static List ToList(this DataTable dt) wher...
分类:
其他好文 时间:
2014-04-30 21:27:46
阅读次数:
508
List to DataTable. 利用反射,将任意元素类型 的 List 转为
DataTable.Using System.Collections;Using System.Reflection; public static
DataTable ToDataTable(IList...
分类:
其他好文 时间:
2014-04-30 20:06:11
阅读次数:
422
封装处理下,以后项目用到可以直接使用,比较简单。 1.首先看封装好的类 using
System;using System.Data;using System.IO;using System.Text;using
CSharpUtilHelpV2;using StringUtilHelp;names...
分类:
其他好文 时间:
2014-04-30 15:47:46
阅读次数:
470
使用DataTable作为存储过程的参数最近工作中写了几个存储过
程,需要向存储过程中传递字符串,因为SQL Server 2000中没有内置类似于 split
的函数,只好自己处理,将前台数据集中的一列用逗号拆分存到一个List中,再转化为字符串传给存储过程,很是麻烦。今天看了下SQL Serve...
分类:
数据库 时间:
2014-04-29 17:24:46
阅读次数:
434
1 /// 2 /// 将集合转换成DataTable 3 /// 4 /// 集合 5 /// 6
public static DataTable ToDataTable(IList list) 7 ...
分类:
其他好文 时间:
2014-04-29 17:22:46
阅读次数:
321
dt.Compute("max(列名)","");Compute函数的参数就两个:Expression,和Filter。Expresstion是计算表达式,关于Expression的详细内容请看这里“http://msdn2.microsoft.com/zh-cn/library/system.da...
分类:
其他好文 时间:
2014-04-29 11:31:46
阅读次数:
397