• 博客园logo
  • 会员
  • 周边
  • 新闻
  • 博问
  • 闪存
  • 众包
  • 赞助商
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
森林小屋
IT学习园地
博客园 首页 新随笔 联系 订阅 订阅 管理

2009年6月2日

C#解压zip文件
摘要: 因为工作中需要在C#项目中将多张图片一次上传,最近两天一直在研究,网上提供的方法很多,整理了一下,整合出一个方法,需要添加引用 Shell32.dll,可以在Windows\system32中找到它。 代码如下:#region 解压zip格式的文件 /// <summary> /// 功能:解压zip格式的文件。 /// </summary> /// <param n... 阅读全文
posted @ 2009-06-02 14:58 湖底苍月 阅读(2179) 评论(1) 推荐(0)
 
 

2008年7月22日

数据库联表查询sql语句
摘要: string tempsql2 = "select a.tid,a.click,b.newsId,b.newstitle,b.addate " + " from Tdayclick a inner join ncar_news b on a.tid = b.newsid where a.type = 1 and a.adddate = " + yday + " order by a.cli... 阅读全文
posted @ 2008-07-22 09:33 湖底苍月 阅读(828) 评论(1) 推荐(0)
 
返回多个参数的函数
摘要: public static void InitOption(int optionId,out string optiontitle,out string optioncontent) 阅读全文
posted @ 2008-07-22 09:32 湖底苍月 阅读(216) 评论(0) 推荐(0)
 
值类型与引用类型
摘要: 值类型 引用类型 内存分配地点 ... 阅读全文
posted @ 2008-07-22 09:30 湖底苍月 阅读(148) 评论(0) 推荐(0)
 
 

2008年7月14日

从前台页面取参数到sql的like中比较时参数的预处理
摘要: //从前台页面取参数到sql的like中比较时参数的预处理 this.keytxt.Text.Trim().Replace("'", "''").Replace("[", "[[]").Replace("]", "[]]").Replace("_", "[_]").Replace("%", "[%]") 阅读全文
posted @ 2008-07-14 17:43 湖底苍月 阅读(344) 评论(0) 推荐(0)
 
从前台页面取参数
摘要: //从前台页面取参数 parameter =new SqlParameter[] { DCommon.SqlHelper.MakeInParam("UserName", SqlDbType.NVarChar, 200, this.searchkey.text.Trim()) }; if(DCommon.SqlHelper.ExecuteScalar("sel... 阅读全文
posted @ 2008-07-14 17:42 湖底苍月 阅读(219) 评论(1) 推荐(0)
 
移页按钮
摘要: //当前页为首页或尾页时,首页,上一页按钮或下一页,尾页按钮不可用 protected void isFirstLastPage() { if (hdUserList.PageCount != 1) { if (hdUserList.CurrentPageIndex == 0) { th... 阅读全文
posted @ 2008-07-14 17:41 湖底苍月 阅读(207) 评论(0) 推荐(0)
 
 

公告


博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3