.net 汉字转拼音

/// /// 汉字转拼音类 /// public class Hz2Py { private static int[] pyValue = new int[] { -20319,-20317,-20304,-20295,-20292,-20283,-20265,-20257,-20 …… 阅读全文

将汉字转化成首字母序列

/// /// 得到一个汉字的拼音第一个字母,如果是一个英文字母则直接返回大写字母 /// /// 单个汉字 /// 单个大写字母 private static string GetCharSpellCode(string CnChar) { …… 阅读全文

ASP.NET获取汉字首字母

/// /// 获取汉字首字母(可包含多个汉字) /// /// /// public string GetChineseSpell(string strText) { int len = strText.Length; string myStr = ""; for (int i = 0; i …… 阅读全文

Linq多表链接分页,Select new{"需要的字段列.."},配合杨涛Mvcpager,前台遍历展示自定义字段

题前:,Select new{"需要的字段列.."}好处,减少不必要数据的查询,尤其是分布式的时候,网络再不好的情况下,而不必要的数据又很多,Select new{"需要的字段列.."}好处明显如题,Linq多表链接分页,Select new{"需要的字段列.."},配合杨涛Mvcpager,前台遍历展示自定义字段(1)我的例子是,(Tb_Mnager)管理员表 …… 阅读全文

SQL从一张表的某个字段更新为另一张表的字段

update Bset B.B05=A02from B join A on B.C01=A.C01 …… 阅读全文

在EF4.1的DBContext中实现事务处理(BeginTransaction)和直接执行SQL语句的示例

public ActionResult _Function21Update(string id){GEN_PARAMETER parameter = db.GEN_PARAMETER.Find(id);if (TryUpdateModel(parameter)){ …… 阅读全文