摘要: using Newtonsoft.Json; string jsonstr = "[{\"id\":1,\"name\":\"张三\"},{\"id\":2,\"name\":\"李四\"}]"; List<object> sg = new List<object>(); var json = Js 阅读全文
posted @ 2017-07-27 11:35 ■乐 阅读(5291) 评论(0) 推荐(0) 编辑
摘要: 附件:SharpZipLib.zip public class UnZipClass//解压 { /// <summary> /// 解压功能(解压压缩文件到指定目录) /// </summary> /// <param name="FileToUpZip">待解压的文件</param> /// < 阅读全文
posted @ 2016-12-12 11:07 ■乐 阅读(661) 评论(3) 推荐(0) 编辑
摘要: 附件:Aspose.Cells.dll 1.创建execl(不需要服务器或者客户端安装office) public void DCExexl(DataTable dt) { Workbook wb = new Workbook(); Worksheet ws = wb.Worksheets[0]; 阅读全文
posted @ 2016-11-18 16:22 ■乐 阅读(2699) 评论(0) 推荐(0) 编辑
摘要: C#中是没有类的多重继承这个概念.要使用多重继承必须要通过接口Interface来完成, 一。接口类 interface getTable{ DataTable Getdatatable(string str); } 二。业务类 class getTableA:getTable{ public vi 阅读全文
posted @ 2016-11-07 16:40 ■乐 阅读(543) 评论(0) 推荐(0) 编辑
摘要: php代码 一。php <?php header("Content-Type:text/html;charset=UTF-8"); $u=$_POST['zdupdate'];$p=$_POST['pid'];$a=$_POST["afid"];$d=$_POST["dtime"]; require 阅读全文
posted @ 2016-08-22 16:03 ■乐 阅读(1173) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2015-08-27 10:59 ■乐 阅读(323) 评论(0) 推荐(0) 编辑
摘要: 安装 Autofac.Extensions.DependencyInjection;Autofac 1.在Startup.cs里面添加 public void ConfigureContainer(ContainerBuilder containerBuilder) { containerBuild 阅读全文
posted @ 2021-09-08 16:21 ■乐 阅读(510) 评论(0) 推荐(0) 编辑
摘要: 在appsettings.json中添加apollo地址 "apollo": { "AppId": "", "MetaServer": "http://部署apollo地址" }, 在Program.cs public static void Main(string[] args) { Create 阅读全文
posted @ 2021-04-14 15:34 ■乐 阅读(356) 评论(0) 推荐(0) 编辑
摘要: @using (Html.BeginForm("Index_load", "Index_", new { }, FormMethod.Post, new { @id = "form0", @class = "form-horizontal", @enctype = "multipart/form-d 阅读全文
posted @ 2017-08-16 18:10 ■乐 阅读(326) 评论(0) 推荐(0) 编辑
摘要: var attributes = typeof(MyClass).GetCustomAttributes(typeof(TestAttribute), true); //MyClass 表示引用特性的类 TestAttribute特性定义的类 foreach (var attribute in at 阅读全文
posted @ 2017-08-15 15:34 ■乐 阅读(156) 评论(0) 推荐(0) 编辑
摘要: using Newtonsoft.Json.Linq;//添加的引用,Newtonsoft.dll可以到guget里面下载 string json="json字符串" JObject json = JObject.Parse(jsn); string jsontext = json["jsontex 阅读全文
posted @ 2017-05-24 11:52 ■乐 阅读(936) 评论(0) 推荐(0) 编辑
摘要: 一,后台获取json数据 protected void Page_Load(object sender, EventArgs e){ DataTable dt = DBhepler.GetDataTable("select top 100 * from Tstudent"); jsn = DataT 阅读全文
posted @ 2017-01-10 15:16 ■乐 阅读(2424) 评论(0) 推荐(0) 编辑
摘要: public class INI { public static string IniFileName = "";//路径 [DllImport("kernel32")] private static extern int GetPrivateProfileInt(string lpApplicat 阅读全文
posted @ 2016-12-12 10:59 ■乐 阅读(466) 评论(0) 推荐(0) 编辑