上一页 1 ··· 4 5 6 7 8 9 10 11 下一页
摘要: //大家在做报表或查询的时候都会有给用户预设一些可选的日期范围(如上图)//如本年度销售额、本季度利润、本月新增客户//C#里内置的DateTime基本上都可以实现这些功能,巧用DateTime会使你处理这些事来变轻松多了//今天DateTime.Now.Date.ToShortDateString();//昨天,就是今天的日期减一DateTime.Now.AddDays(-1).ToShortDateString();//明天,同理,加一DateTime.Now.AddDays(1).ToShortDateString();//本周(要知道本周的第一天就得先知道今天是星期几,从而得知本周的第 阅读全文
posted @ 2011-09-09 10:15 荡来荡去(allen) 阅读(231) 评论(0) 推荐(0)
摘要: JS 操作IE游览器常用函数:window.external,history,document.execCommand js 操作IE游览器 window.external...1、window.external...<INPUT onclick='window.external.ImportExportFavorites(true,"http://localhost");' type=button value=导入收藏夹> <INPUT onclick='window.external.ImportExportFavorites( 阅读全文
posted @ 2011-09-09 10:14 荡来荡去(allen) 阅读(362) 评论(0) 推荐(0)
摘要: 1.文本框焦点问题onBlur:当失去输入焦点后产生该事件onFocus:当输入获得焦点后,产生该文件Onchange:当文字值改变时,产生该事件Onselect:当文字加亮后,产生该文件<input type="text" value="mm" onfocus="if(value=='mm) {value=''}" onblur="if(value=='') {value='mm'}">点击时文字消失,失去焦点时文字再出现2.网页按钮的特殊颜色& 阅读全文
posted @ 2011-09-06 13:44 荡来荡去(allen) 阅读(777) 评论(0) 推荐(0)
摘要: CONVERT 函数 [数据类型转换]--------------------------------------------------------------------------------功能 返回转换成提供的数据类型的表达式。语法 CONVERT ( data type, expression [ , format-style ] )参数 data type 表达式将转换成的数据类型。expression 要转换的表达式。format-style 对于将字符串转换为日期或时间数据类型以及相反的转换过程,format-style 是描述要使用的日期格式字符串的样式代码。 format 阅读全文
posted @ 2011-08-12 10:34 荡来荡去(allen) 阅读(7742) 评论(2) 推荐(0)
摘要: SQL Server 中行列转换 Pivot UnPivot在做报表时,经常需要将数据表中的行转列,或者列转行,如果不知道方法,你会觉得通过SQL语句来实现非常难。这里,我将使用pivot和unpivot来实现看似复杂的功能。这个功能在sql2005及以上版本才有。引用MSDN:可以使用 PIVOT 和 UNPIVOT 关系运算符将表值表达式更改为另一个表。PIVOT 通过将表达式某一列中的唯一值转换为输出中的多个列来旋转表值表达式,并在必要时对最终输出中所需的任何其余列值执行聚合。UNPIVOT 与 PIVOT 执行相反的操作,将表值表达式的列转换为列值,但是在实际应用中,有些聚合之后的数据 阅读全文
posted @ 2011-08-11 12:47 荡来荡去(allen) 阅读(857) 评论(0) 推荐(1)
摘要: ALTER PROCEDURE p_test@OrderID intASBEGINDECLARE @mainid varchar(5)SELECT @strFlowSet = ISNULL([WorkflowSet],'2,3|4|16|1|11|12|13') FROM [sysconfig] --创建临时表CREATE TABLE #temp(FlowID int,FlowName nvarchar(50),TimerID int)DECLARE rs CURSOR FOR --声明一个游标select [a] from Split(@strFlowSet,'|&# 阅读全文
posted @ 2011-08-04 09:10 荡来荡去(allen) 阅读(265) 评论(0) 推荐(0)
摘要: Description:4种ASP.NET文件下载//TransmitFile实现下载 protectedvoid Button1_Click(object sender, EventArgs e) {Response.ContentType = "application/x-zip-compressed";Response.AddHeader("Content-Disposition","attachment;filename=z.zip");string filename = Server.MapPath("DownLo 阅读全文
posted @ 2011-07-19 20:17 荡来荡去(allen) 阅读(365) 评论(0) 推荐(0)
摘要: Description: http://localhost:4336/Web/AjaxDemo.aspx,最后输出的结果:Request.AppRelativeCurrentExecutionFilePath=~/AjaxDemo.aspxRequest.CurrentExecutionFilePath=/Web/AjaxDemo.aspxRequest.FilePath=/Web/AjaxDemo.aspxRequest.Path=/Web/AjaxDemo.aspxRequest.PathInfo=Request.PhysicalApplicationPath=D:\SXJST\Web\R 阅读全文
posted @ 2011-07-19 20:16 荡来荡去(allen) 阅读(235) 评论(0) 推荐(0)
摘要: Java代码/** *树形菜单VO */publicclassSelectTreeimplementsSerializable{ privateintid; privateStringname; privateList<SelectTree>child=newArrayList<SelectTree>(); //getter&setter....略 } /** *树形菜单VO */ public class SelectTree implements Serializable{ private int id; private String name; priva 阅读全文
posted @ 2011-07-09 16:32 荡来荡去(allen) 阅读(952) 评论(0) 推荐(0)
摘要: 我们知道,用SQLDMO可以实现对数据库的备份与恢复,下面给出简单的实现方法。首先需要添加对SQLDMO引用1.实现数据库的备份:1 ///<summary>2///数据库备份3///</summary>4///<returns>备份是否成功</returns>5publicboolDbBackup()6{7stringpath=CreatePath();8SQLDMO.BackupoBackup=newSQLDMO.BackupClass();9SQLDMO.SQLServeroSQLServer=newSQLDMO.SQLServerClas 阅读全文
posted @ 2011-07-07 15:19 荡来荡去(allen) 阅读(164) 评论(0) 推荐(0)
上一页 1 ··· 4 5 6 7 8 9 10 11 下一页