日期:2014-05-17 浏览次数:20456 次
string vid = Request.QueryString["vid"].ToString();
string sql = "select * from VideoEntities where VideoInfoId='" + vid + "'";
DataTable dt = new DataTable();
dt = opsql.GetValue(sql, "VideoEntities", "ConnectionString");
if (dt.Rows.Count > 0)
{
for (int i = 0; i < dt.Rows.Count; i++)
{
string name = dt.Rows[i]["name"].ToString();//.Replace("'", " ")
name = System.Text.RegularExpressions.Regex.Replace(name, "第|集", "");
//Mfile.InnerHtml += "<a href=\"" + dt.Rows[i]["DownloadUrl"] + "\" target=\"_blank\">" + name + "</a>";
}
}
tblDatas.Rows.Add(new object[] { null, "张一5", 10, 10 });
tblDatas.Rows.Add(new object[] { null, "张二10", 15, 20 });
tblDatas.Rows.Add(new object[] { null, "张三6", 20, 30 });
tblDatas.Rows.Add(new object[] { null, "张四7", 18, 40});
tblDatas.Rows.Add(new object[] { null, "张五3", 25, 50 });
dt = dt.AsEnumerable().OrderBy(a =>int.Parse(Regex.Replace(a.Field<string>("name"), @"[\u4e00-\u9fa5]", string.Empty))).CopyToDataTable();
/*
* 张五3
* 张一