摘要: --获取当前及以下部门Create proc GetCurrentAndUnderOrg@orgId intasbegin WITH cte AS ( SELECT * ,0 AS level FROM Static_Organ WHERE OrganID=@orgId UNION ALL SELECT g.*,level+1 FROM Static_Organ g INNER JOIN cte ON g.ParentOrgan=cte.OrganID ) SELECT * FROM cteend编辑器加载中... 阅读全文
posted @ 2011-07-21 16:05 Wythe 阅读(1206) 评论(1) 推荐(0) 编辑
摘要: http://blog.csdn.net/21aspnet/article/details/1565877 阅读全文
posted @ 2011-07-16 10:43 Wythe 阅读(110) 评论(0) 推荐(0) 编辑
摘要: 现在的手机号码增加了150,153,156,158,159,157,188,189所以正则表达式如下:string s = @"^(13[0-9]|15[0|3|6|7|8|9]|18[8|9])\d{8}$"; 阅读全文
posted @ 2011-07-13 11:56 Wythe 阅读(202) 评论(0) 推荐(0) 编辑
摘要: 1.表结构 2.查询语句create procedure Pro_GetUnderOrg(in idd varchar(36))begindeclare lev int;set lev=1;drop table if exists tmp1; CREATE TABLE tmp1(ID VARCHAR(36),OrgName varchar(50),ParentID varchar(36) ,levv INT); INSERT tmp1 SELECT ID,OrgName,ParentID,1 FROM `organization` WHERE ParentID=idd;while row_co 阅读全文
posted @ 2011-07-05 10:39 Wythe 阅读(12212) 评论(1) 推荐(2) 编辑
摘要: BULK INSERT dbo.tabTimeDataFROM 'F:\自动观测站\tabtimedata\tabtimedata.txt'WITH ( FIELDTERMINATOR = ',', ROWTERMINATOR = '\n') 阅读全文
posted @ 2011-06-27 19:10 Wythe 阅读(367) 评论(0) 推荐(0) 编辑
摘要: 1,设置mySql连接字符串gb23122,PowerDesinger->Database->Generate Database->Format 阅读全文
posted @ 2011-06-13 13:47 Wythe 阅读(3126) 评论(2) 推荐(0) 编辑
摘要: View Code delete from StationInfo where StationID in (select StationID from StationInfo group by StationID having COUNT(StationID)>1) 阅读全文
posted @ 2011-05-23 13:14 Wythe 阅读(243) 评论(0) 推荐(0) 编辑
摘要: using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.IO.Pipes;using System.Security.Principal;namespace TopInfo.Metevation.Common{ public class PipeMessageUtil { private const string PipeName = "TopInfoPipe"; public static bool NeedSendMessage = fa 阅读全文
posted @ 2011-05-20 16:35 Wythe 阅读(3668) 评论(1) 推荐(0) 编辑
摘要: public class SystemEventLog { private static EventLog mLog; /// <summary> /// 返回操作Windows日志的类。 /// </summary> public static EventLog Log { get { if (mLog == null) { InitSystemEventLog(); } return mLog; } } /// <summary> /// 初始化系统事件日志 /// </summary> private static void InitSys 阅读全文
posted @ 2011-05-20 13:38 Wythe 阅读(349) 评论(0) 推荐(0) 编辑
摘要: using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Runtime.InteropServices;using System.Diagnostics;namespace TopInfo.Metevation.Common{ //WM_COPYDATA消息所要求的数据结构 public struct CopyDataStruct { public IntPtr dwData; public int cbData; [MarshalAs(UnmanagedTyp 阅读全文
posted @ 2011-05-20 13:29 Wythe 阅读(3711) 评论(5) 推荐(1) 编辑