文章分类 -  C#

摘要://先是封装数组 var idArray = {}; var j=0; idArray["OperationCheckIds[" + j + "]"] = dataitem.OperationCheckId;//j必须是从0开始的数组,不然后台是不能为空的数组或list集合类型时会接受不到数据 // 阅读全文
posted @ 2017-01-22 10:24 飞刀软件 阅读(956) 评论(0) 推荐(0)
摘要:list集合与json之间的互转,可以使用ObjectExtensions扩展类,需要引用命名空间System.Xml.Linq; ObjectExtensions扩展类中有 ToJson和FromJson方法; 例如: using System.Xml.Linq; List<CheckItemJs 阅读全文
posted @ 2017-01-16 15:58 飞刀软件 阅读(2369) 评论(0) 推荐(0)
摘要:Guid.NewGuid() 是生成不为零的guid,字符串为:14870550-1334-4AA6-A229-3726B7AAB2AE new Guid() 是生成为零的guid,字符串为:00000000-0000-0000-0000-000000000000 阅读全文
posted @ 2017-01-04 10:10 飞刀软件 阅读(748) 评论(0) 推荐(0)
摘要:HttpRuntime.Cache是应用程序级别的 HttpContext.Current.Cache是针对当前WEB上下文定义的 不同的是:HttpRuntime下的除了WEB中可以使用外,非WEB程序也可以使用。 HttpRuntime.Cache 和 HttpContext.Current.C 阅读全文
posted @ 2016-12-29 17:51 飞刀软件 阅读(476) 评论(0) 推荐(1)
摘要:sqlserver上创建存储过程案例: CREATE proc [dbo].[proc_GetAllStructureIdByStructureId] @Com_StructureId uniqueidentifier @Com_StructureId传入参数ASBEGIN select a.*,c 阅读全文
posted @ 2016-12-28 15:14 飞刀软件 阅读(222) 评论(0) 推荐(0)
摘要:Asp.net Cache所在命名空间是System.Web.HttpContext.Current.Cache; 例子: var cache = System.Web.HttpContext.Current.Cache; cache["ActiveYear"] = DateTime.Now.Yea 阅读全文
posted @ 2016-12-26 17:35 飞刀软件 阅读(82) 评论(0) 推荐(0)
摘要:string monitorLeveIds=""; List<Guid> monitorLevelIdList=monitorLeveIds.Split(",").Select(item => Guid.Parse(item)).ToList(); 阅读全文
posted @ 2016-12-07 10:07 飞刀软件 阅读(177) 评论(0) 推荐(0)
摘要:Listdlist= getPageDate(c => new { c }, c => c.TecId == TecId, c => c.CommentId, int.Parse(parameters["pageIndex"].ToString()), 2, out Total_);Comment ... 阅读全文
posted @ 2015-06-01 11:40 飞刀软件 阅读(3057) 评论(1) 推荐(1)