随笔分类 - C#
摘要:public class NPOIHelper { public static MemoryStream Export(DataTable dtSource, string strHeaderText, string strFileName) { string fileExt = Path.GetE
阅读全文
摘要:转:忘了 public class CRC { #region CRC16 public static byte[] CRC16(byte[] data) { int len = data.Length; if (len > 0) { ushort crc = 0xFFFF; for (int i
阅读全文
摘要:本内容部分内容是搬运来,并个人稍加改良完成。 /// <summary> /// 微信JSSDK基础信息 /// </summary> public class WechatJSSDKController : ApiController { private static string appid =
阅读全文
摘要:#region 委托 /// <summary> /// 日志 /// </summary> /// <param name="s"></param> private delegate void MyAddLog(string str); private static event MyAddLog
阅读全文
摘要:using System; using System.Collections; using System.Collections.Generic; using System.Linq; using System.Web; using Newtonsoft.Json; namespace SandMa
阅读全文
摘要:/// <summary> /// 反射执行方法WINFROM /// </summary> /// <param name="strDllName">命名空间</param> /// <param name="strClaName">类</param> /// <param name="strMetName">方法</param> /// <param name="obj_parmer">参数<
阅读全文
摘要:xxx.config 利用EF框架 Code First 完成 EF连接字符串 Oracle连接字符串
阅读全文
摘要:简易聊天室转:忘了... 以下为自动创建代理hub方式 使用NuGet引用:Microsoft.AspNet.SignalR 什么时候使用 generated proxy 如果你要给客户端的方法注册多个事件处理器,那么你就不能使用 generated proxy。如果你不使用 generated p
阅读全文
摘要:Oracle数据库 自增长需要添加触发器,感脚比较麻烦。
阅读全文
摘要:/// /// 转换人民币大小金额 /// /// 金额 /// 返回大写形式 public static string CmycurD(decimal num) { string str1 = "零壹贰叁肆伍陆柒捌玖"; //0-9所对应的汉字 ...
阅读全文
摘要:方便统一ashx返回类型~ weiapi也行~ /// <summary> /// 返回数据 /// </summary> public class ResultData { /// <summary> /// 操作状态 /// </summary> public ResultDataStateEn
阅读全文
摘要:如果项目在IIS发布后,出现System.ComponentModel.Win32Exception: 拒绝访问。 那么就试试下面的办法。 步骤如下: 应用程序池=》设置应用程序池默认设置 将标识:改为LocalSystem 即可。
阅读全文
摘要:Web.config 配置文件很重要,有些蒙圈,自己稍微整理了下。看起来就简单些。 步骤一: NuGet 给项目安装 Entity Framework。 步骤二: NuGet给项目安装 JetEntityFrameworkProvider 步骤三: 添加数据库位置Web.config 步骤四: We
阅读全文
摘要:var ext = Path.GetExtension(filename).ToLower(); using (FileStream fs = File.OpenRead(filename)) { IWorkbook wk; if (ext.Contains("xl...
阅读全文
摘要:using System; using System.Collections.Generic; using System.Drawing; using System.IO; using System.Linq; using System.Security.Cryptography; using Sy
阅读全文
摘要:/// <summary> /// NPOI帮助类 /// </summary> public class NPOIHelper { public static MemoryStream Export(DataTable dtSource, string strHeaderText, string
阅读全文