深蓝-大海的颜色

2016年1月7日

SQL变量、Substring、charindex、case函数、去除重复

摘要: isnull(aa,0)删除表数据:truncate table aaa添加字段:ALTER TABLEtable1ADDcol1varchar(200)DEFAULT '2008-05-22'修改字段名:alter table table1 rename column col1 to col2;修... 阅读全文

posted @ 2016-01-07 15:27 深蓝-大海的颜色 阅读(357) 评论(0) 推荐(0) 编辑

C# Tostring格式

摘要: 开发中经常用到格式化,不管是时间、货币、数字都可以随心所欲。也许你用的是{0:C}方式,也许你用String.Format方式,也许你用.ToString("n"),都是格式化的方式。以下N多种格式化方式程序员们记住常用的就可以了,不常用的随用随查吧。字符型转换 转为字符串string.Remove... 阅读全文

posted @ 2016-01-07 15:25 深蓝-大海的颜色 阅读(377) 评论(0) 推荐(0) 编辑

asp.net导出word(word2007)

摘要: 1、只能导出成word2007格式(.docx),可直接导出到客户端2、服务器上不需要装任何东西,也没有权限限制,比较适合导出表格(支持图片)3、需要一个国外的DocX.dll插件4、需要添加引用:System.Drawing5、需要引用:using Novacode;using System.Dr... 阅读全文

posted @ 2016-01-07 15:23 深蓝-大海的颜色 阅读(411) 评论(0) 推荐(0) 编辑

asp.net生成缩略图

摘要: /// /// 生成缩略图 /// /// 原图片地址 /// 缩略图地址 /// 缩略图宽度 /// 缩略图高度 /// 生成缩略的模式 public void Ma... 阅读全文

posted @ 2016-01-07 15:22 深蓝-大海的颜色 阅读(128) 评论(0) 推荐(0) 编辑

正则表达式语法

摘要: 手机号验证System.Text.RegularExpressions.Regex.IsMatch(mobile, @"^1((([358])\d{9})|(47\d{8}))$")固话验证System.Text.RegularExpressions.Regex.IsMatch(Tel, @"^((... 阅读全文

posted @ 2016-01-07 15:21 深蓝-大海的颜色 阅读(182) 评论(0) 推荐(0) 编辑

解压缩

摘要: 需要下载引用ICSharpCode.SharpZipLib.dll这个文件using ICSharpCode.SharpZipLib.Zip;using System.IO;///////////////////////////////////调用//////////////////////////... 阅读全文

posted @ 2016-01-07 15:20 深蓝-大海的颜色 阅读(169) 评论(0) 推荐(0) 编辑

文件复制

摘要: #region 文件覆盖 /// /// 文件覆盖 /// /// public void FileCopy(string destPath) { string path ... 阅读全文

posted @ 2016-01-07 15:18 深蓝-大海的颜色 阅读(183) 评论(0) 推荐(0) 编辑

C#获取字符首字母

摘要: /// /// 获取字符首字母 /// public static string GetPyChar(string c) { if (string.IsNullOrEmpty(c)) ... 阅读全文

posted @ 2016-01-07 15:16 深蓝-大海的颜色 阅读(1638) 评论(0) 推荐(0) 编辑

生日转换成星座

摘要: /// /// 生日转换成星座 /// /// /// public static string GetAstro(DateTime birthday) { string value = string.Empty; int mo... 阅读全文

posted @ 2016-01-07 15:14 深蓝-大海的颜色 阅读(297) 评论(0) 推荐(0) 编辑

多选打包下载

摘要: using Ionic.Zip;/////////////////在对多文件打包中用到了 DotNetZip 的方法来实现对多文件压缩打包。需要到http://dotnetzip.codeplex.com/处下载该文件,然后引用Ionic.Zip即可 public void PackDown() ... 阅读全文

posted @ 2016-01-07 15:13 深蓝-大海的颜色 阅读(140) 评论(0) 推荐(0) 编辑

导航