摘要: protected void Page_Load(object sender, EventArgs e) { creatDataTable(); } protected void Button1_Click(object send... 阅读全文
posted @ 2012-11-23 12:48 深南大道 阅读(205) 评论(0) 推荐(0)
摘要: //方法一 利用DataTable中的Compute方法 例如:1*2-(4/1)+2*4=6 string formulate = string.Format("{0}*{1} - {2}/{3} +{1}*{2}", 1, 2, 4, 1... 阅读全文
posted @ 2012-11-23 09:06 深南大道 阅读(1383) 评论(0) 推荐(0)
摘要: protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { DataTable tt = GetCrossTable(CreateDT()); ... 阅读全文
posted @ 2012-11-22 09:51 深南大道 阅读(176) 评论(0) 推荐(0)
摘要: protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { DataTable dt = FormatDT(); ... 阅读全文
posted @ 2012-11-22 08:45 深南大道 阅读(843) 评论(0) 推荐(0)
摘要: Expand/Collapse ... 阅读全文
posted @ 2012-11-21 09:11 深南大道 阅读(211) 评论(0) 推荐(0)
摘要: Tip15:Jquery触发回车事件 $(function () { $('#target').bind('keyup', function (event) { if (event.keyCode == 13) { ... 阅读全文
posted @ 2012-11-20 09:50 深南大道 阅读(122) 评论(0) 推荐(0)
摘要: 百度地图API自定义地图 阅读全文
posted @ 2012-11-16 14:57 深南大道 阅读(128) 评论(0) 推荐(0)
摘要: 可同时操作多个不同类型的数据库。 完全不用考虑数据类型的差别,再也不用想字符型字段加不加单引号。 调用非常简单,对数据库的主要操作一般只需要一行代码。 支持mssql事务回滚。 可自动生成和输出sql语句方便调试。 使用方法: 1. 修改clsDbctrl.asp文件中的第1行为你... 阅读全文
posted @ 2012-11-16 08:28 深南大道 阅读(153) 评论(0) 推荐(0)
摘要: 创建表头固定,表体可滚动的GridView 阅读全文
posted @ 2012-11-15 16:20 深南大道 阅读(223) 评论(0) 推荐(0)
摘要: protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { GridView1.DataSource = FormatDT(); ... 阅读全文
posted @ 2012-11-15 14:43 深南大道 阅读(597) 评论(0) 推荐(0)
摘要: /// /// 将DT转换为Execl的方法 /// /// 需要导出的DT /// 页面 /// 文件名 public void ToExecl(DataTable dt, Page page, string fileName) ... 阅读全文
posted @ 2012-11-14 14:56 深南大道 阅读(187) 评论(0) 推荐(0)
摘要: protected void GridView1_RowCreated(object sender, GridViewRowEventArgs e) { if (e.Row.RowType == DataControlRowType.DataRow... 阅读全文
posted @ 2012-11-13 09:59 深南大道 阅读(206) 评论(0) 推荐(0)
摘要: F.1字符函数——返回字符值 这些函数全都接收的是字符族类型的参数(CHR除外)并且返回字符值.除了特别说明的之外,这些函数大部分返回VARCHAR2类型的数值.字符函数的返回类型所受的限制和基本数据库类型所受的限制是相同的,比如: VARCHAR2数值被限制为2000字符(ORACLE ... 阅读全文
posted @ 2012-11-12 09:27 深南大道 阅读(220) 评论(0) 推荐(0)
摘要: using System;using System.Collections.Generic;using System.Text;using System.Data.SQLite; //引用using System.Data;using System.Data.Common;namespace M... 阅读全文
posted @ 2012-11-09 16:34 深南大道 阅读(180) 评论(0) 推荐(0)
摘要: private void Page_Load(object sender, System.EventArgs e) { beginProgress(); for (int i = 1; i 无标题页 ... 阅读全文
posted @ 2012-11-09 16:29 深南大道 阅读(396) 评论(0) 推荐(0)
摘要: public static string ExportTable(DataSet ds) { StringBuilder sb = new StringBuilder(); int count = 0; foreach (Data... 阅读全文
posted @ 2012-11-09 15:59 深南大道 阅读(190) 评论(0) 推荐(0)
摘要: //Execl某单元格数据为 2012-1-10 读取到DataTable变为40918 不是正确的2012-1-10 //解决方法一: //strValue是你的日期40918 值带进来 public static string getDateStr(strin... 阅读全文
posted @ 2012-11-09 15:40 深南大道 阅读(277) 评论(0) 推荐(0)
摘要: set ANSI_NULLS ON set QUOTED_IDENTIFIER ON go -- 日期检测函数,返回相关节假日 -- 0 非假日 -- 农历相关假日 -- 1 春节(正月初一 至 正月初七) -- 2 端午节(五月五日) -- 4 中秋节(八月十五) --阳历相关节日 --... 阅读全文
posted @ 2012-11-09 14:04 深南大道 阅读(1885) 评论(2) 推荐(0)
摘要: using System; using System.Data; using System.Configuration; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.W... 阅读全文
posted @ 2012-11-09 13:41 深南大道 阅读(258) 评论(0) 推荐(0)
摘要: //1.字符串比较 //字符串.ComparTo(目标字符串) "a".ComparTo("b"); //2.查找子串 //字符串.IndexOf(子串,查找其实位置) ; //字符串.LastIndexOf(... 阅读全文
posted @ 2012-11-08 16:19 深南大道 阅读(227) 评论(0) 推荐(0)
摘要: //在项目里添加一个"全局应用程序类(Global Application Class)",在里面写这样的代码: public class Global : System.Web.HttpApplication { static Timer BuildStati... 阅读全文
posted @ 2012-11-08 10:18 深南大道 阅读(223) 评论(0) 推荐(0)
摘要: //清除页面缓存,防止页面回退重复提交数据 在页面里做以下设置就可以使页面的缓存失效,每次都需要获取新页面。 Response.Cache.SetCacheability(System.Web.HttpCacheability.NoCache); ... 阅读全文
posted @ 2012-11-08 10:04 深南大道 阅读(259) 评论(0) 推荐(0)
摘要: //大家在做报表或查询的时候都会有给用户预设一些可选的日期范围(如上图) //如本年度销售额、本季度利润、本月新增客户 //C#里内置的DateTime基本上都可以实现这些功能,巧用DateTime会使你处理这些事来变轻松多了 /... 阅读全文
posted @ 2012-11-08 09:46 深南大道 阅读(142) 评论(0) 推荐(0)
摘要: //实现思路 //利用Cache的功能,把用户的登录信息保存在Cache中,并设置过期时间为Session失效的时间,因此,一旦Session失效,Cache也过期;而Cache对所有的用户都可以访问,因此,用它保存用户信息比数据库来得方便。 //代码如下 : ... 阅读全文
posted @ 2012-11-08 09:39 深南大道 阅读(323) 评论(0) 推荐(0)
摘要: #region 上传Execl文件 protected void Button1_Click(object sender, EventArgs e) { if (FileUpload1.HasFile) { stri... 阅读全文
posted @ 2012-11-02 14:14 深南大道 阅读(158) 评论(0) 推荐(0)
摘要: 经常需要在数据库与Execl之间互导数据。net时代,ADO.NET可以使用使用Microsoft.Jet.OleDb访问访问Excel,网上已经有很多类似的资源,最典型也是最简单的可能如下:(asp.net环境) // 连接字符串 string xlsPath = Se... 阅读全文
posted @ 2012-11-01 14:31 深南大道 阅读(182) 评论(0) 推荐(0)
摘要: ... 阅读全文
posted @ 2012-10-31 21:20 深南大道 阅读(225) 评论(0) 推荐(0)
摘要: /// /// 获取指定月份指定周数的开始日期 /// /// 年份 /// 月份 /// 周数 /// private DateTime GetStartDay... 阅读全文
posted @ 2012-10-31 13:59 深南大道 阅读(1262) 评论(0) 推荐(0)
摘要: using System; using System.Collections.Generic; using System.Text; using System.Data.SqlClient; using System.IO; namespace Tool { /// ///... 阅读全文
posted @ 2012-10-30 16:42 深南大道 阅读(166) 评论(0) 推荐(0)
摘要: 原始表如下格式: Class CallDate CallCount 1 2005-8-8 40 1 2005-8-7 6 2 2005-8-8 77 3 2005-8-9 33 3 2005-8-8 9 3 ... 阅读全文
posted @ 2012-10-26 16:54 深南大道 阅读(217) 评论(0) 推荐(0)