/// /// 转换人民币大小金额 /// /// 金额 /// 返回大写形式 public static string CmycurD(decimal num) { string str1 = "零壹贰叁肆伍陆柒捌玖"; //0-9所对应的汉字 string str2 = "万仟佰拾亿仟佰拾万仟佰拾元角分"; //数字位所对应的汉字 string str3 = ""; //从原num... Read More
posted @ 2013-07-01 17:21
梦醒心晴
Views(1169)
Comments(0)
Diggs(0)
using System;using System.Drawing;using System.Collections;using System.ComponentModel;using System.Data;using System.Runtime.InteropServices;namespace Test{ /**/ /// /// Provides static methods to read system icons for both folders and files. /// /// /// IconReader.GetFileIcon(... Read More
posted @ 2013-07-01 15:21
梦醒心晴
Views(292)
Comments(0)
Diggs(0)
using System;using System.Web;/// ///session操作类/// public class appCookie{ #region COOKIE 操作相关 /// /// 写入Cookie /// /// /// public static void WriteCookie(string strName, string strValue) { WriteCookie(strName, strValue, 30); } public static void WriteCookie(... Read More
posted @ 2013-07-01 15:14
梦醒心晴
Views(181)
Comments(0)
Diggs(0)
/// /// 获取客户端IP地址,优先取得代理IP,没有代理IP则直接取客户端IP /// /// public static string GetRealUserHostAddress() { string ip = ""; try { if (HttpContext.Current.Request.Headers["ZZReader-X-Forwarded-For"] == null) {... Read More
posted @ 2013-07-01 15:12
梦醒心晴
Views(268)
Comments(0)
Diggs(0)
private static Random rd = new Random(); /// /// 获取指定长度的随机数 /// /// /// public static string GetNewCode(int pwdLength) { byte[] pwd = new byte[pwdLength]; int i; for (i = 0; i = 48 && a =65 && a=97 && a ... Read More
posted @ 2013-07-01 15:11
梦醒心晴
Views(261)
Comments(0)
Diggs(0)
/// /// 返回两个日期之间的时间间隔(y:年份间隔、M:月份间隔、【d:天数间隔、h:小时间隔、m:分钟间隔、s:秒钟间隔、ms:微秒间隔,中括号内前加t,表示总数,如td,总天数】) /// /// 间隔标志 /// 开始日期 /// 结束日期 /// 返回间隔标志指定的时间间隔 public static double DateDiff(string Interval, System.DateTime? Date1, Syst... Read More
posted @ 2013-07-01 15:08
梦醒心晴
Views(397)
Comments(0)
Diggs(0)
/// /// 简体中文输出 /// /// /// public static string ToSChinese(string str) { return Strings.StrConv(str, VbStrConv.SimplifiedChinese, 0); } /// /// 繁体中文输出 /// /// /// public static string ToTChi... Read More
posted @ 2013-07-01 15:07
梦醒心晴
Views(337)
Comments(0)
Diggs(0)
/// /// 返回将str以md5方式加密后的字符串 /// /// /// public static string MD5(string str) { byte[] bytes = Encoding.Default.GetBytes(str); bytes = new MD5CryptoServiceProvider().ComputeHash(bytes); string text = ""; for (in... Read More
posted @ 2013-07-01 15:06
梦醒心晴
Views(196)
Comments(0)
Diggs(0)
/// /// 将数字转换为数据大小格式 /// /// /// public static string FormatBytesStr(long bytes) { double num; if (bytes > 0x40000000) { num = (double)bytes / 0x40000000; return (num.ToString("N02") + "G"); ... Read More
posted @ 2013-07-01 15:04
梦醒心晴
Views(342)
Comments(0)
Diggs(0)
/// /// 将HTML去除 /// /// /// public static string DelHTML(string Htmlstring) { #region //删除脚本 Htmlstring = System.Text.RegularExpressions.Regex.Replace(Htmlstring, @"", "", System.Text.RegularExpressions.RegexOptions.I... Read More
posted @ 2013-07-01 14:58
梦醒心晴
Views(262)
Comments(0)
Diggs(0)

浙公网安备 33010602011771号