06 2012 档案

摘要:http://social.msdn.microsoft.com/Forums/en-US/csharpgeneral/thread/e745e812-1644-491f-9034-39855cd16016 阅读全文
posted @ 2012-06-27 01:06 hishanghai 阅读(115) 评论(0) 推荐(0)
摘要:http://msdn.microsoft.com/en-us/library/ms180833(vs.80).aspx http://www.activexperts.com/activmonitor/windowsmanagement/scripts/activedirectory/user/retrieving/#ListAllowed.htmPS C:\> [byte[]]$hours = @(0,0,0,0,255,3,0,255,3,0,255,3,0,255,3,0,255,3,0,0,0)PS C:\> # create a hashtable to update 阅读全文
posted @ 2012-06-27 00:57 hishanghai 阅读(384) 评论(0) 推荐(0)
摘要:usingSystem;usingSystem.Collections;usingSystem.Configuration;usingSystem.Data;usingSystem.Linq;usingSystem.Web;usingSystem.Web.Security;usingSystem.Web.UI;usingSystem.Web.UI.HtmlControls;usingSystem.Web.UI.WebControls;usingSystem.Web.UI.WebControls.WebParts;usingSystem.Xml.Linq;usingSystem.IO;usin. 阅读全文
posted @ 2012-06-23 00:52 hishanghai 阅读(346) 评论(0) 推荐(0)
摘要:usingSystem;usingSystem.Collections;usingSystem.Configuration;usingSystem.Data;usingSystem.Linq;usingSystem.Web;usingSystem.Web.Security;usingSystem.Web.UI;usingSystem.Web.UI.HtmlControls;usingSystem.Web.UI.WebControls;usingSystem.Web.UI.WebControls.WebParts;usingSystem.Xml.Linq;usingSystem.IO;usin. 阅读全文
posted @ 2012-06-22 20:10 hishanghai 阅读(774) 评论(0) 推荐(1)
摘要:protectedvoidButton1_Click(objectsender,EventArgse){stringpath="";stringphysicsPath=Server.MapPath(Request.ApplicationPath);//将当前虚拟根路径转为实际物理路径stringtoFindDirectoryName="ss";//要查找的文件夹名FindDirectory(physicsPath+"\\",toFindDirectoryName,outpath);//用递归的方式去查找文件夹if(!string.Is 阅读全文
posted @ 2012-06-22 18:19 hishanghai 阅读(1035) 评论(0) 推荐(0)
摘要:http://www.codeguru.com/csharp/.net/net_asp/controls/article.php/c12235/ASPNET-Booking-Calendar-User-Control.htmBooking Calendar 阅读全文
posted @ 2012-06-15 19:48 hishanghai 阅读(84) 评论(0) 推荐(0)
摘要:SELECTCONVERT(VARCHAR,(DATEADD(week,1,getdate())-(DATEPART(DW,DATEADD(week,1,getdate())))),23)as下周一SELECTCONVERT(VARCHAR,(DATEADD(week,1,getdate())-(DATEPART(DW,DATEADD(week,1,getdate())))+1),23)SELECTCONVERT(VARCHAR,(DATEADD(week,1,getdate())-(DATEPART(DW,DATEADD(week,1,getdate())))+2),23)SELECTCON 阅读全文
posted @ 2012-06-15 19:23 hishanghai 阅读(160) 评论(0) 推荐(0)
摘要:DECLARE@REPORT_DATEDATETIME,@WEEK_BEGININGVARCHAR(10)SELECT@REPORT_DATE=getdate()SELECT@WEEK_BEGINING='MONDAY'IF@WEEK_BEGINING='MONDAY'SETDATEFIRST1ELSEIF@WEEK_BEGINING='TUESDAY'SETDATEFIRST2ELSEIF@WEEK_BEGINING='WEDNESDAY'SETDATEFIRST3ELSEIF@WEEK_BEGINING='THURSD 阅读全文
posted @ 2012-06-15 17:47 hishanghai 阅读(438) 评论(0) 推荐(0)
摘要:protectedvoidPage_Load(objectsender,EventArgse){SQLHelpersqH;if(!Page.IsPostBack){sqH=newSQLHelper();stringstrSelPro="SELECT[proName]FROM[db_city].[dbo].[tb_province]";DataTabledt=sqH.ExecuteQuery(strSelPro,CommandType.Text);if(dt.Rows.Count>0){DropDownList1.DataSource=dt;DropDownList1. 阅读全文
posted @ 2012-06-14 00:38 hishanghai 阅读(297) 评论(0) 推荐(0)
摘要:<!DOCTYPEhtmlPUBLIC"-//W3C//DTDXHTML1.0Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><htmlxmlns="http://www.w3.org/1999/xhtml"><headrunat="server"><title>无标题页</title><linkhref="css/mycss.css&qu 阅读全文
posted @ 2012-06-11 22:44 hishanghai 阅读(171) 评论(0) 推荐(0)
摘要:execmaster..xp_cmdshell'bcp"select*from[BookShop].[dbo].[tb_Books]where[UnitPrice]=22"queryoutd:temp.xls-c-q-S"."-U"sa"-P""' 阅读全文
posted @ 2012-06-05 00:04 hishanghai 阅读(129) 评论(0) 推荐(0)
摘要:1. 当前系统日期、时间select getdate()2. dateadd 在向指定日期加上一段时间的基础上,返回新的 datetime 值例如:向日期加上2天select dateadd(day,2,'2004-10-15') --返回:2004-10-17 00:00:00.0003. datediff 返回跨两个指定日期的日期和时间边界数。select datediff(day,'2004-09-01','2004-09-18') --返回:174. datepart 返回代表指定日期的指定日期部分的整数。SELECT DATEPART( 阅读全文
posted @ 2012-06-04 18:14 hishanghai 阅读(226) 评论(0) 推荐(0)
摘要:-- =============================================-- Author:<Author,,Name>-- Create date: <Create Date,,>-- Description:修改新闻-- =============================================ALTER PROCEDURE [dbo].[news_UpdateByID] @newsName varchar(100), @classID int, @newsContent text, @newsID intASBEGINupd 阅读全文
posted @ 2012-06-03 23:31 hishanghai 阅读(121) 评论(0) 推荐(0)
摘要:selectage,count(*),max(age)as最大年龄fromperson1groupbyAgehavingAge>20selecttop3*fromperson1--筛选出年龄不在top3中的数据,也就是第四、五selecttop2*fromperson1whereagenotin(selecttop3agefromperson1orderbyagedesc)orderbyage--去掉数据重复selectDepartment,count(*)fromperson1groupbyDepartmentselectdistinctDepartment,Agefromperson 阅读全文
posted @ 2012-06-03 23:13 hishanghai 阅读(337) 评论(0) 推荐(0)
摘要:ALTER TRIGGER [dbo].[trigCateDelete] ON [dbo].[category] instead of DELETEAS BEGIN declare @caId int select @caId=(select id from deleted) delete comment where newsId in (select newsId from news where caId=@caId) delete news where caId=@caId delete category where id=@caIdENDALTER procedure [dbo].[p. 阅读全文
posted @ 2012-06-03 23:12 hishanghai 阅读(86) 评论(0) 推荐(0)