10 2012 档案
摘要:HttpContext.Current.Response.Buffer = true;HttpContext.Current.Response.AppendHeader("Content-Disposition", "attachment;filename=" + txtBuyUserID.SelectedValue + ".xls");HttpContext.Current.Response.Charset = "GB2312";HttpContext.Current.Response.ContentEncodi
阅读全文
摘要:1. 引言本文是一套面向C# programmer 和C# developer 进行开发所应遵循的开发规范。按照此规范来开发C#程序可带来以下益处:· 代码的编写保持一致性,· 提高代码的可读性和可维护性,· 在团队开发一个项目的情况下,程序员之间可代码共享· 易于代码的回顾,本规范是初版,只适用于一般情况的通用规范,并不能覆盖所有的情况。2. 文件组织2.1 C# 源文件类名或文件名要简短,不要超过2000LOC,将代码分割开,使结构清晰。将每个类放在一个单独的文件中,使用类名来命名文件名(当然扩展名是.cs)。这种约定会使大家工作更简单。2.2 目录
阅读全文
摘要:/// <summary> /// 获取单条数据 /// </summary> /// <param name="Id">Id</param> /// <returns></returns> public LinksEntity GetLinksEntity(Int64 Id) { LinksEntity LinksEntity = null; SqlParameter[] Para = new SqlParameter[1]; Para[0] = new SqlParameter("@Id&
阅读全文
摘要:delete from tab where id not in ( select id from tab t1 where n1=( select min(n1) from tab t2 where s1=t1.s1 ))--------------------------------delete tab where id not in(select tab.id from tab,(select min(n1) as n1,s1 from tab group by s1) B where tab.n1=B.n1 and tab.s1=B.s1)连表的目的 是为了 得到 ID
阅读全文

浙公网安备 33010602011771号