05 2012 档案
摘要:-------------------------(一)准备工作---------------------------CREATE TABLE CUSTOMERCREATE TABLE CUSTOMER(ID INT PRIMARY KEY,CUSTOMER_NAME NVARCHAR(50))--CREATE TABLE PRODUCTIONCREATE TABLE PRODUCTION(ID INT PRIMARY KEY,PRODUCTION_NAME NVARCHAR(100),CUSTOMER_ID_COLLECTIONS NVARCHAR(100))--INSERT INIT DA
阅读全文
摘要:Enum.GetValues方法:检索指定枚举中常数值的数组。反编译代码:[ComVisible]public static Array GetValues(Type enumType){ if(enumType==null) { throw new ArgumentNullException("enumType"); } return enumType.GetEnumValues();}[DllImport("QCall",CharSet=CharSet.Unicode)]private static extern void GetEnumValued
阅读全文
摘要:using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Reflection;namespace Tool{ public class CustomAttribute { public static string GetCustomAttribute<T>(Type type) where T:System.Attribute { return type.GetCustomAttributes(typeof(T), false)[0] as stri
阅读全文
摘要:有限状态机(finite-state machine,fsm),又称有限状态自动机,简称状态机,是表示有限个状态以及在这些状态之间的转移和动作等行为的数学模型。概念和术语状态存储关于过去的信息,就是说:它反映从系统开始到现在时刻的输入变化。转移只是状态变更,并且用必须满足来确使状态转移发生的条件来描叙她。动作是在给定时刻要进行的活动的描述。有多种类型的动作:进入动作(entry action):在进入状态时进行退出动作:在退出状态时进行输入动作:依赖于当前状态和输入条件进行转移动作:在进行特定转移时进行fsm(有限状态机)可使用上面图那样的状态图(或状态转移图)来表示。此外可以使用多种类型的状
阅读全文
摘要:存储过程create proc test4@res varchar(10) outputasselect @res=count(*) from Ship_TUser_Infogocs文件:SqlParameter[] paras = new SqlParameter[] { new SqlParameter("@res", SqlDbType.Int) }; paras[0].Direction = ParameterDirection.Output; SqlHelper.ExecuteNonQuery(SqlHelper.ConnectionStringLocalTran
阅读全文
摘要:SqlParameter类的SQlValue与Value的区别:msdn说:SqlVaue是Sql类型的参数值以字符串类型来说,Sql类型有varchar,nvarchar,char等等C#类型有string,字符数组等等SqlValue指代Sql类型的值Value表示C#类型的值在存储结构上及表示范围、精度等方面有区别。
阅读全文
摘要:///<summary>///Parses the specified block of a text///</summary>///<return>///Returns the end position of a parsed block.///</return>protected int ParseBlock(XmlNode parentNode,TagBase parentTag,string text,int position){ #region check the arguments if(parentNode==null) { thr
阅读全文
摘要:///<summary>///the name of the Value xml node.///</summary>protected const string cValueXmlAttributeName="Value";///<summary>///Retrieves the value of the specified tag xml node.///</summary>protected string GetXmlNodeValue(XmlNode node){ if(node==null) { throw new
阅读全文
摘要:///<summary>///the name of the Tag xml node.///</summary>protected const string cTagXmlNodeName="Tag";///<summary>///Determines whether the specified node is a tag node///</summary>protected bool IsTagXmlNode(XmlNode node){ if(node==node) { throw new ArgumentNullExc
阅读全文
摘要:///<summary>///Check whether there is the tag at the specified position in the specified sql///<sumary>///<name>The value of the Name property</name>///<returns>///The position after the tag or -1 there is no tag at the position.///</returns>internal static int Ma
阅读全文
摘要:--根据小类名称和品牌名来取客户信息declare @brandname nvarchar(50)declare @categoryname nvarchar(50) ---分类的中文名set @categoryname='空调'set @brandname='海尔'--取得ClassIDdeclare @categoryid nvarchar(15)if OBJECT_ID('Tempdb.dbo.#categoryids') is not nullbeginprint 'Exists Table Tempdb.dbo.#categor
阅读全文
摘要:--根据小类名称和品牌名来取客户信息declare @brandname nvarchar(50)declare @categoryname nvarchar(50) ---分类的中文名set @categoryname='空调'set @brandname='海尔'--取得ClassIDdeclare @categoryid nvarchar(15)if OBJECT_ID('Tempdb.dbo.#categoryids') is not nullbeginprint 'Exists Table Tempdb.dbo.#categor
阅读全文
摘要:--根据小类名称和品牌名来取客户信息declare @brandname nvarchar(50)declare @categoryname nvarchar(50) ---分类的中文名set @categoryname='空调'set @brandname='海尔'--取得ClassIDdeclare @categoryid nvarchar(15)if OBJECT_ID('Tempdb.dbo.#categoryids') is not nullbegin print 'Exists Table Tempdb.dbo.#catego
阅读全文
摘要:using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Data;using System.Reflection;using System.Collections;namespace Tool{ public class DataTable2Object { /// <summary> /// Convert an DataRow to an object /// </summary> /// <typeparam name=&qu
阅读全文