摘要: HTML:需要用到事件:onsorting <asp:GridView ID="MainLists" runat="server" DataKeyNames="WZLBID" CssClass="Grid" AllowSorting="True" OnRowDataBound="MainLists_RowDataBound" AllowPaging="True" OnPageIndexChanging=... 阅读全文
posted @ 2012-11-20 18:32 偶不是大叔 阅读(2340) 评论(0) 推荐(0) 编辑
摘要: JS: //判定是单选还是全选var isMulti = "<% =Request.QueryString["mode"]%>"; //全选 function selectAll(ctlName, bool) { var ctl = document.getElementById(ctlName); var checkbox = ctl.getElementsByTagName('input'); for (var i = 0; i < checkbox.length; i++) { ... 阅读全文
posted @ 2012-11-12 18:24 偶不是大叔 阅读(345) 评论(0) 推荐(0) 编辑
摘要: 将表T_wz_wz中的部分数据插入到表t_wz_kc:insert into t_wz_kc(wzid,jldwid,kcsl,yfpkcsl,cshwcbz) select wzid,jldwid,0,0,'Y' from t_wz_wz where yxbz='Y' --去重复-- and wzid not in (select wzid from t_wz_kc) 阅读全文
posted @ 2012-11-06 12:38 偶不是大叔 阅读(16647) 评论(0) 推荐(0) 编辑
摘要: 消息: Sys.WebForms.PageRequestManagerServerErrorException: Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046} failed due to the following error: 80070005 拒绝访问。 (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)).在asp.net程序中用到了导入、导出excel 在调试的时候没有问题,能够正常导入 阅读全文
posted @ 2012-10-09 14:57 偶不是大叔 阅读(3260) 评论(0) 推荐(0) 编辑
摘要: Chart1.DataSource = dtb; string[] strcolor = new string[20]; strcolor[0] = "220, 224, 64, 10"; strcolor[1] = "220, 252, 180, 65"; strcolor[2] = "220, 159, 100, 100"; strcolor[3] = "220, 5, 100, 146"; strcolor[4] = "91,42,0"; ... 阅读全文
posted @ 2012-10-09 14:16 偶不是大叔 阅读(12504) 评论(1) 推荐(0) 编辑
摘要: gdvSaleVoucher.Columns.Clear(); DataTable dt = new DataTable(); string strSql = @"select [level] from dbo.Film_FilmRelation group by [level] order by [level] desc "; using (SqlConnection conn = new SqlConnection(System.Configuration.ConfigurationManager.ConnectionStrin... 阅读全文
posted @ 2012-10-09 14:10 偶不是大叔 阅读(288) 评论(0) 推荐(0) 编辑
摘要: string s = "2012-04-23"; DateTime dt; if (DateTime.TryParseExact(s, "yyyy-MM-dd", null, DateTimeStyles.None, out dt)) {//验证通过}需要用到的命名空间:using System.Globalization;原文System.Globalization 命名空间 阅读全文
posted @ 2012-09-17 18:39 偶不是大叔 阅读(4827) 评论(0) 推荐(0) 编辑
摘要: 实例:select userid,SignId,UserFullName , count(roleid) from dbo.View_SignInfo where userid=27 group by userid,UserFullName,SignId代码解释:列值不同的列是:roleid列值相同的列是:userid,SignId,UserFullName 阅读全文
posted @ 2012-09-05 09:42 偶不是大叔 阅读(1556) 评论(0) 推荐(0) 编辑
摘要: 1.UserID 并非主键,UserID有重复值SELECT b.*FROM(SELECT*,rid=ROW_NUMBER() OVER(PARTITION BY UserID ORDER BY UserID) FROM EmployeeAllInfo) bWHERE rid =1 阅读全文
posted @ 2012-09-04 11:04 偶不是大叔 阅读(285) 评论(0) 推荐(0) 编辑
摘要: 一:if else 语法: if 条件 begin 执行的操作 end else begin 执行的操作 end二:while 语法:while 条件 begin 执行操作 end实例:USE [OABusiness]GO/****** 对象: StoredProcedure [dbo].[inertdate] 脚本日期: 08/31/2012 15:30:23 ******/SET ANSI_NULLS ONGOSET QUOTED_IDENTIFIER ONGOCREATE procedure [dbo].[inertdate]( @date datetime , --插... 阅读全文
posted @ 2012-09-02 14:01 偶不是大叔 阅读(41514) 评论(0) 推荐(1) 编辑