摘要: View Code public class NmSecurity { /************************************************** * FileName: NmSecurity.cs * Version: 1.00 * Author: Kria * Date: 2009-3-4 * Last Modified Date: 2009-3-6 * Function: * Copy... 阅读全文
posted @ 2012-06-27 23:36 kiddy-star 阅读(296) 评论(0) 推荐(0) 编辑
摘要: View Code public class ErrorLog { /// <summary> /// 创建错误日志到文件 /// </summary> /// <param name="exceptionMessage">异常说明</param> /// <param name="exceptionStackTrace">异常跟踪堆栈信息</param> public static void AddLog(string exceptionMessage, string except 阅读全文
posted @ 2012-06-27 23:29 kiddy-star 阅读(163) 评论(0) 推荐(0) 编辑
摘要: View Code ////存储用户登录信息 private UserInfo _GustUserDynamicInfor; public UserInfo GustUserDynamicInfor { get { if (_GustUserDynamicInfor == null) { if (Session["GuestUser"] != null) { ... 阅读全文
posted @ 2012-06-27 23:19 kiddy-star 阅读(237) 评论(0) 推荐(0) 编辑
摘要: View Code /// <summary> /// 添加索引 /// </summary> /// <param name="TypeValue">1,企业-2,产品-3,供求、商机-4,资讯</param> /// <param name="ID">所要添加索引的记录的ID</param> /// <returns>0,失败-1,成功-2,Type值错误,3-索引添加出错</returns> public static int AddSearchInde 阅读全文
posted @ 2012-06-27 23:03 kiddy-star 阅读(254) 评论(0) 推荐(0) 编辑
摘要: /// <summary> /// SQL like 语句特殊字符 替换 /// </summary> /// <returns></returns> public static string SQLStrReplace(string str) { String RetuenValue = ""; if (str.Trim() != "") { RetuenValue = str.Replace("[", "[[]").Replace("'" 阅读全文
posted @ 2012-06-27 22:58 kiddy-star 阅读(486) 评论(0) 推荐(0) 编辑
摘要: View Code #region 中英文截取长度一致 //是否是中文 public static bool IsChinese(char c) { return (int)c >= 0x4E00 && (int)c <= 0x9FA5; } //获得字节长度 private static int getLengthb(string str) { return System.Text.Encoding.Default.GetByteCount(str); } //c#的中英文混合字符串截取指定长度,sta... 阅读全文
posted @ 2012-06-27 22:55 kiddy-star 阅读(229) 评论(0) 推荐(0) 编辑
摘要: View Code using System;using System.Data;using System.Configuration;using System.Web;using System.Web.Security;using System.Web.UI;using System.Web.UI.WebControls;using System.Web.UI.WebControls.WebParts;using System.Web.UI.HtmlControls;using Com.Netmarch.BLL;using Com.Netmarch.Model;/// <summary 阅读全文
posted @ 2012-06-27 22:47 kiddy-star 阅读(142) 评论(0) 推荐(0) 编辑
摘要: View Code protected void Page_Load(object sender, EventArgs e) { try { //获取文件路径 string filepath = Server.MapPath("xmsbry/upload/b/") + Request.QueryString["filename"]; if (System.IO.File.Exists(filepath)) { Download(filepat... 阅读全文
posted @ 2012-06-27 22:32 kiddy-star 阅读(158) 评论(0) 推荐(0) 编辑