05 2014 档案
摘要:添加重要的命名空间:using System.Runtime.InteropServices;先建立结构相同(char长度相同)的Struct类型用于转换:[StructLayout(LayoutKind.Sequential, Pack = 1)] public struct Employe...
阅读全文
摘要:想使用using(...), 如:using (Getter process = new Getter()){ //...}就必须给类实现接口IDisposablepublic sealed class Getter: IDisposable { #region ...
阅读全文
摘要:首先在SQLServer定义一个自定义表类型:USE [ABC]GOCREATE TYPE [ABC].[MyCustomType] AS TABLE( [EmployeeId] [char](6) NOT NULL, [LastName] [varchar](30) NULL, ...
阅读全文
摘要:static void Main(string[] args) { //定义与目标表结构相同的DataTable DataTable dataTable = new DataTable(); dataTable.Colu...
阅读全文
摘要:@echo off:openchoice /c:123 /m "1:创建,2:终止,3:删除"if errorlevel 3 goto deleteif errorlevel 2 goto endif errorlevel 1 goto create:create@schtasks /create ...
阅读全文
摘要:以下Function可以用于textbox的KeyUp事件:2014-06-06 发现旧版IE不支持selectionStart还有字符串的"[]"索引获取值, 已经修复这个bug.2014-06-10 修复上一次修复遗留的IE的bug./*Validate the textbox value is...
阅读全文
摘要:以下是一个相对简陋的扩展, 主要是针对金额显示的Textbox扩展.using System;using System.Collections.Generic;using System.Linq;using System.Web;using System.Web.UI.WebControls;usi...
阅读全文
摘要:Row_number配合over(partition by xx order by xx) 与 Group by 的区别, = order + group?Guidance Automation Toolkit 2010 ReferenceBETWEEN 操作符实例如需以字母顺序显示介于 "Adam...
阅读全文
摘要:1. 对索引列使用Like语句, 如果是"Like 'aa%'"则使用索引优化, 若是"Like '%aa'"则不使用索引优化. 2. "[Age] <> 3" 不使用索引优化, 在SQL Server2005或以上可以改为"[Age] < 3 || [Age] > 3", 此时会使用索引优化. 3
阅读全文
摘要:IF EXISTS ( --判断是否存在合符条件的记录 SELECT TOP ( 1 ) 1 FROM [DCL].[SecurityUser] WHERE [U...
阅读全文
摘要:原来ID=8的记录删除后, 下一个Insert记录为9当插入ID=10的记录后, 使用DBCC CHECKIDENT('[MCU].[RecordSequence]',RESEED,7)当再次Insert记录, 就会是ID为8.不过以上不是真实的使用场景, 以上情况应该插入包含ID的记录就行:SET...
阅读全文
摘要:SET IDENTITY_INSERT 表 ONINSERT INTO 表 ([ID] ,[SequenceNumber] ,[EnumCode] ,[Description]) VALUES ...
阅读全文