01 2014 档案
摘要:1.代码using System;using System.Collections.Generic;using System.Linq;using System.Runtime.Serialization;using System.ServiceModel;using System.Text;namespace WcfServiceLibrary1{ // 注意: 使用“重构”菜单上的“重命名”命令,可以同时更改代码和配置文件中的接口名“IService1”。 [ServiceContract] public interface IService1 { [...
阅读全文
摘要:1 使用 netsh.exe 工具C:\Windows\system32>netsh http add urlacl url=http://+:8733/WcfServiceLibrary1 user=lin.su已成功添加 URL 保留项备注:为了使没有管理员权限的用户能够开发 WCF 服务,在安装 Visual Studio 的过程中为命名空间“http://+:8731/Design_Time_Addresses”创建了一个 ACL(访 问控制列表)具体使用方法 netsh.exe
阅读全文
摘要:1 效果图2.代码引用组件:using iTextSharp.text;using iTextSharp.text.pdf;using System;using System.Data;using System.IO;using System.Text;using System.Xml;示例: /// /// 利用itextsharp 创建一个简单pdf文件 /// private static void GetCreateDocumentPDF() { //开始创建PDF文档 Docume...
阅读全文
摘要:1 应用组件using NPOI.SS.UserModel;using NPOI.HSSF.Util;2.一个简单demo2.1 定义单元格常用到样式的枚举 public enum stylexls { shead,//头 surl, sdate,//时间 snumber,//数字 smoney,//钱 spercentage,//百分比 schinaUpper,//中文大写 scientific,//科学...
阅读全文
摘要:1.net 获取客户端ip方法(此方法不是很准确)public static string GetIP() { string str; if (!string.IsNullOrEmpty(HttpContext.Current.Request.ServerVariables["HTTP_X_FORWARDED_FOR"])) { str = HttpContext.Current.Request.ServerVariables["HTTP_X_FORWARDED_FOR"].ToString(); ...
阅读全文