• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
 






风云博客(IT技术版)

 
 

Powered by 博客园
博客园 | 首页 | 新随笔 | 联系 | 订阅 订阅 | 管理

2012年4月5日

C# 日期差(2)
摘要: ///<summary> ///计算日期间隔///</summary>///<paramname="d1">要参与计算的其中一个日期</param>///<paramname="d2">要参与计算的另一个日期</param>///<paramname="drf">决定返回值形式的枚举</param>///<returns>一个代表年月日的int数组,具体数组长度与枚举参数drf有关</returns>publicst 阅读全文
posted @ 2012-04-05 12:53 风云1号 阅读(242) 评论(0) 推荐(0)
 
通用JS验证函数
摘要: function SSCheck(wrapid) { var bd = wrapid ? document.getElementById(wrapid) : document.getElementsByTagName('body')[0],inputs = bd.getElementsByTagName('input'),textareas = bd.getElementsByTagName('textarea'),isNull = /^( )*$/,isNumber = /^\d+(\.\d+)?$/,isInt = /^\d+$/; for 阅读全文
posted @ 2012-04-05 12:00 风云1号 阅读(231) 评论(0) 推荐(0)
 
常用通用JS函数
摘要: function isNumeric(strValue) { if (!isNaN(Trim(strValue))) { return true; } else { return false; }}//清除字符串开始处空格 function LTrim(str) { for (var i = 0; str.charAt(i) == " "; i++); return str.substring(i, str.length);}//清除字符串末端空格 function RTrim(str) { for (var i = str.length - 1; str.charAt(i 阅读全文
posted @ 2012-04-05 11:56 风云1号 阅读(240) 评论(0) 推荐(0)
 
DataTable 行列转置
摘要: using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Data;namespace SSCMS.CommonClass{ public class DataTableHelper { /// <summary> /// DataTable 行列转置 /// </summary> /// <param name="dt"></param> /// <returns></retu 阅读全文
posted @ 2012-04-05 11:53 风云1号 阅读(544) 评论(0) 推荐(0)
 
MD5加密、DES加密解密类
摘要: using System;using System.Collections.Generic;using System.Text;using System.Security.Cryptography;using System.IO;using System.Text.RegularExpressions;using System.Web.Security;namespace SSCMS.CommonClass{ /// <summary> /// 描述:MD5加密、DES加密解密类 /// </summary>a public class EncryptHelper { 阅读全文
posted @ 2012-04-05 11:52 风云1号 阅读(293) 评论(0) 推荐(0)
 
从datatable导出到Excel
摘要: using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.IO;using System.Web;using System.Data;using System.Data.SqlClient;using System.Data.OleDb;using System.Web.UI;using System.Web.UI.HtmlControls;using System.Web.UI.WebControls;namespace SSCMS.CommonClass{ p 阅读全文
posted @ 2012-04-05 11:35 风云1号 阅读(412) 评论(0) 推荐(0)
 
C#邮件操作类
摘要: using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Net.Mail;using System.Net;namespace SSCMS.CommonClass{ /// <summary> /// 描述:邮件操作类 /// 作者:slickly /// 日期:2009-7-31 /// </summary> public class MailHelper { protected int emailPriority = 1; //邮件紧 阅读全文
posted @ 2012-04-05 11:32 风云1号 阅读(437) 评论(0) 推荐(0)
 
检验上传文件是否为图片
摘要: public enum FileExtension { JPG = 255216, GIF = 7173, BMP = 6677, PNG = 13780, } public static bool IsAllowedExtension(FileUpload fu, FileExtension[] fileEx) { int fileLen = fu.PostedFile.ContentLength; byte[] imgArray = new byte[fileLen]; fu.PostedFile.InputStre... 阅读全文
posted @ 2012-04-05 11:31 风云1号 阅读(237) 评论(0) 推荐(0)
 
【SQL Server】删除所有表、存储过程
摘要: DECLARE @table varchar(64),@sql varchar(150)DECLARE curTable SCROLL CURSOR FOR SELECT name FROM sysobjects WHERE Type = 'U' And Name <> 'dtproperties' ORDER BY nameOPEN curTableFETCH FIRST FROM curTable INTO @tableWHILE (@@FETCH_STATUS = 0)BEGINset @sql = 'Drop table [' 阅读全文
posted @ 2012-04-05 11:29 风云1号 阅读(202) 评论(0) 推荐(0)
 
Javascript 在IE和火狐( Mozilla Firefox)下不同之处
摘要: 1. document.form.item 问题问题:现有代码中存在许多 document.formName.item("itemName") 这样的语句,不能在Firefox下运行解决方法:统一使用 document.formName.elements["elementName"] 2. 集合类对象问题 问题:IE下,可以使用()或[]获取集合类对象;Firefox下,只能使用[]获取集合类对象 解决方法:改用[ ]作为下标运算。如:document.forms("formName") 改为 document.forms[" 阅读全文
posted @ 2012-04-05 11:27 风云1号 阅读(250) 评论(0) 推荐(0)
 
下一页