注意:多级目录必须逐一创建 Read More
posted @ 2016-07-27 15:41 ミ茹此茹此↘ Views(338) Comments(0) Diggs(0) Edit
JSON是专门为浏览器中的网页上运行的JavaScript代码而设计的一种数据格式。在网站应用中使用JSON的场景越来越多,本文介绍ASP.NET中JSON的序列化和反序列化,主要对JSON的简单介绍,ASP.NET如何序列化和反序列化的处理,在序列化和反序列化对日期时间、集合、字典的处理。 一、JSON简介 JSON(JavaScript Object Notation,JavaScript对象表示法)是一种轻量级的数据交换格式。 JSON是“名值对”的集合。结构由大括号'{}',中括号'[]',逗号',',冒号':',双引号& Read More
posted @ 2013-03-25 17:13 ミ茹此茹此↘ Views(215) Comments(0) Diggs(0) Edit
1 public static string DataTableToJSON(DataTable table) 2 { 3 List<Dictionary<string, object>> list = new List<Dictionary<string, object>>(); 4 5 foreach (DataRow row in table.Rows) 6 { 7 Dictionary<string, object> dict = new Dictionary<string, object>(); 8 9 fore Read More
posted @ 2013-01-16 17:37 ミ茹此茹此↘ Views(277) Comments(0) Diggs(0) Edit
在powerBuilder中新建一个Physical Data Model,在其中新建一个用户表,信息如下图所示:此时的SQL语句可从其中的Preview视图中得到,如下图所示:这个时候生成的sql语句是没有注释的,而且sql语句可能也不是适合自己所对应的数据库语言。此时可以通过以下方法来生成注释并且选择所需的数据库语言。1、为sql生成注释,操作如下,我用的是PowerDesigner12.5,在其中选择Tools----》Excute commands-----》Edit/Run Script打开的窗口中添加以下信息'******************************** Read More
posted @ 2012-12-17 18:25 ミ茹此茹此↘ Views(174) Comments(0) Diggs(0) Edit
构建测试表:create table TABLE1( ID INTEGER, NAME VARCHAR2(10))create table TABLE2( ID INTEGER, ROLE VARCHAR2(10))insert into TABLE1 (ID, NAME) values (1, '张三');insert into TABLE1 (ID, NAME) values (2, '李四');commit;insert into TABLE2 (ID, ROLE) values (1, '查询');insert into TABLE2 ( Read More
posted @ 2012-10-16 19:02 ミ茹此茹此↘ Views(511) Comments(0) Diggs(0) Edit
Repository.cs 1 using System; 2 using System.Collections.Generic; 3 using System.Linq; 4 using System.Data; 5 using System.Data.Entity; 6 using Models; 7 using System.Linq.Expressions; 8 using System.Reflection; 9 using System.Web; 10 using System.Data.OracleClient; 11 12 namespace DAL 13 ... Read More
posted @ 2012-10-12 11:51 ミ茹此茹此↘ Views(911) Comments(1) Diggs(0) Edit
SQL SERVER TRIGGER Read More
posted @ 2012-10-12 10:30 ミ茹此茹此↘ Views(212) Comments(0) Diggs(0) Edit
SQL Server中行列转换 Pivot UnPivotPIVOT用于将列值旋转为列名(即行转列),在SQL Server 2000可以用聚合函数配合CASE语句实现PIVOT的一般语法是:PIVOT(聚合函数(列) FOR 列 in (…) )AS P完整语法:table_sourcePIVOT(聚合函数(value_column)FOR pivot_columnIN(<column_list>))UNPIVOT用于将列明转为列值(即列转行),在SQL Server 2000可以用UNION来实现完整语法:table_sourceUNPIVOT(value_columnFOR Read More
posted @ 2012-06-19 00:49 ミ茹此茹此↘ Views(4621) Comments(0) Diggs(0) Edit
双屏显示1// 利用WinForm中的Screen类,即可比较方便地实现多窗体分别在多个屏幕上显示。 //•获取当前系统连接的屏幕数量: Screen.AllScreens.Count(); //•获取当前屏幕的名称:string CurrentScreenName = Screen.FromControl(this).DeviceName; //•获取当前屏幕对象:Screen CurrentScreen = Screen.FromControl(this); //•获取当前鼠标所在的屏幕:Screen CurrentScreen = ... Read More
posted @ 2012-06-13 14:56 ミ茹此茹此↘ Views(9888) Comments(0) Diggs(1) Edit
View Code 1 //命名空间 2 using System.Drawing.Imaging; 3 using System.Drawing; 4 using System.Drawing.Drawing2D; 5 6 /// <summary> 7 /// 无损压缩图片 8 /// </summary> 9 /// <param name="sFile">原图片</param>10 /// <param name="dFile">压缩后保存位置</param>11 /// & Read More
posted @ 2012-05-12 13:12 ミ茹此茹此↘ Views(416) Comments(0) Diggs(0) Edit