最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

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);
});
}
}
}

相關文章

最新評論

宜兰市| 隆子县| 玉门市| 广安市| 德州市| 安岳县| 上犹县| 岚皋县| 栖霞市| 浑源县| 娄烦县| 兰西县| 南部县| 昭苏县| 石柱| 和静县| 桐乡市| 湘潭县| 利川市| 郯城县| 漯河市| 阳新县| 徐州市| 吴堡县| 乐昌市| 黑河市| 平乡县| 富宁县| 周口市| 乡宁县| 新龙县| 新余市| 穆棱市| 安塞县| 保山市| 常山县| 文山县| 通道| 蕉岭县| 长武县| 罗源县|