亚洲乱码中文字幕综合,中国熟女仑乱hd,亚洲精品乱拍国产一区二区三区,一本大道卡一卡二卡三乱码全集资源,又粗又黄又硬又爽的免费视频

linq 查詢 Linq 高級查詢實例代碼

 更新時間:2013年01月02日 15:36:22   投稿:whsnow  
本文針對Linq 高級查詢實例進行詳解,需要了解的朋友可以參考下

[code]
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Text.RegularExpressions;
using System.IO;
using System.Text;
using System.Data;
namespace SJLERP
{
public partial class WebForm1 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
Dictionary<string, string> cityAndNum =
Regex.Matches(City.data, @"[^\r].*?\r")
.Cast<Match>()
.Select(c => Regex.Replace(c.Value, @"\s", ""))
.Aggregate(new Dictionary<string, string>(), (reval, item) =>
{
if (Regex.IsMatch(item, @"[\u4e00-\u9fa5]+\d+"))
{
string word = Regex.Match(item, @"[\u4e00-\u9fa5]+").Value;
string num = Regex.Match(item, @"\d+").Value;
reval.Add(word, num);
}
return reval;
});
ADOHelper.ExecuteCommand("create table KaixuanTest ( city varchar(max),num varchar(max) ) ");
cityAndNum.ToList().ForEach(c =>
{
string sql = string.Format(" insert KaixuanTest select '{0}','{1}'",c.Key,c.Value);
ADOHelper.ExecuteCommand(sql);
});
}
}
}

相關文章

最新評論