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

浙公网安备 33010602011771号