摘要: 获取动态SQL的返回值declare@returnbitdeclare@sqlnvarchar(1000)set@sql='if(''abc''=''abc'')set@return=1elseset@return=0'Execsp_executesql@sql,N'@returnintoutput',@returnoutputselect@return 阅读全文
posted @ 2011-11-05 12:29 王庭安 阅读(142) 评论(0) 推荐(0) 编辑
摘要: 设置Excel文档权限的工具类引用Microsoft Office 12.0 Object Library引用Microsoft Excel 12.0 Object Library///<summary>///设置Excel文档权限的工具类///</summary>publicclassRmsExcelHelper:IDisposable{///<summary>///Excel应用程序对象///</summary>privateMicrosoft.Office.Interop.Excel.ApplicationClassapp;///<s 阅读全文
posted @ 2011-08-29 00:27 王庭安 阅读(552) 评论(0) 推荐(0) 编辑
摘要: 设置Word文档的ADRMS权限引用Microsoft Office 12.0 Object Library引用Microsoft Word 12.0 Object Library///<summary>///设置Word文档权限的工具类///</summary>publicclassRmsWordHelper:IDisposable{///<summary>///Word应用程序对象///</summary>privateMicrosoft.Office.Interop.Word.ApplicationClassapp;///<summa 阅读全文
posted @ 2011-08-29 00:22 王庭安 阅读(953) 评论(0) 推荐(1) 编辑
摘要: /// <summary> /// 图片处理工具类 /// </summary> public class ImageUtils { /// <summary> /// 产生缩略图 /// </summary> public static System.IO.Stream GenerateThumbnail(System.IO.Stream imageStream, int width, int height) { System.IO.Stream ms; using (var originalImage = System.Drawing.Ima 阅读全文
posted @ 2011-07-11 01:07 王庭安 阅读(434) 评论(0) 推荐(0) 编辑
摘要: 用户模拟角色类。实现在程序段内进行用户角色模拟。(以前收集的资料,原始出处当时没记,请作者谅解) 阅读全文
posted @ 2011-04-24 14:11 王庭安 阅读(304) 评论(0) 推荐(0) 编辑
摘要: 这个就是MOSS中传说的上传多个文件的控件,好用啊,哈哈。。。 貌似还没有人给过一个完整可用的代码示例。。。奇怪。。。 老衲只好献丑了,哦弥陀佛。。。 阅读全文
posted @ 2011-03-25 01:32 王庭安 阅读(2274) 评论(3) 推荐(1) 编辑
摘要: 主机配置文件 <!-- WCF配置部分 --> <system.serviceModel> <services> <service name="Gren.Practices.Wcf.Behavior.WcfService" behaviorConfiguration="Gren.Practices.Wcf.BehaviorConfiguration">... 阅读全文
posted @ 2010-09-19 01:49 王庭安 阅读(5239) 评论(1) 推荐(0) 编辑
摘要: 匿名对象工具类public class AnonymousObject{ private object obj; public AnonymousObject(object obj) { this.obj = obj; } public Dictionary<string, object> ToDictionary() { var dict = new Dictionary<st... 阅读全文
posted @ 2010-09-02 01:34 王庭安 阅读(299) 评论(0) 推荐(0) 编辑
摘要: 参考网上一些资料自己整理的一个工具类,用于异步执行耗时作业,然后回到主线程刷新UI属性 阅读全文
posted @ 2010-07-17 00:30 王庭安 阅读(706) 评论(3) 推荐(0) 编辑
摘要: public class LogManager{ private static string logPath = string.Empty; /// <summary> /// 保存日志的文件夹 /// </summary> public static string LogPath { get { if (logPath == string.Empty) { if (Sys... 阅读全文
posted @ 2010-04-25 22:25 王庭安 阅读(835) 评论(0) 推荐(0) 编辑