The Perfect Day

分享技术,编写未来

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::
上一页 1 ··· 3 4 5 6 7 8 下一页

2006年11月25日

摘要: //方法1 private void btnQuery_DayOfWeek_Click(object sender, EventArgs e) { MessageBox.Show("今天是:"+"日一二三四五六".Substring((int)DateTime.Now.DayOfWeek,1); } //方法2 //必... 阅读全文
posted @ 2006-11-25 01:12 StephenJu 阅读(565) 评论(0) 推荐(0) 编辑

2006年11月24日

摘要: //KeyPress事件:当控件获得焦点,并且用户按下且释放键盘上的键后发生 private void textBox1_KeyPress(object sender, KeyPressEventArgs e)//文本框只接受数字的输入和小数点 { //IsNumber:指定字符串中位于指定位置的字符是否属于数字类别 //I... 阅读全文
posted @ 2006-11-24 16:02 StephenJu 阅读(673) 评论(0) 推荐(0) 编辑

摘要: //在DataGridView中显示行号,需要要处理DataGridView的RowPostPaint事件: private void dataGridView1_RowPostPaint(object sender, DataGridViewRowPostPaintEventArgs e) { SolidBrush B = new SolidB... 阅读全文
posted @ 2006-11-24 15:56 StephenJu 阅读(1634) 评论(0) 推荐(0) 编辑

2006年11月21日

摘要: -创建数据库if exists(select * from sysdatabases where name=N'master..test')drop database testcreate database test--创建存储过程(法1)if exists(select * from sysobjects where name=N'proc_name' and type='p')drop pro... 阅读全文
posted @ 2006-11-21 15:29 StephenJu 阅读(560) 评论(0) 推荐(0) 编辑

2006年11月20日

摘要: scope_indentity() 返回插入到同一作用域中(存储过程,.......)的indentity列内的最后一个indentity值例: declare @dt table( _id int identity(1,1), _name char(10))insert into @dt (_name) values('zhang')insert into @dt (_name) value... 阅读全文
posted @ 2006-11-20 22:16 StephenJu 阅读(497) 评论(0) 推荐(0) 编辑

摘要: 注:This method gets the record count much faster than select count(*) from table_name1、一般情况下,可以通过聚合函数Count实现查询出记录的总数 select count(*) as 记录总数 from table_name2、也可以通过查询系统表sysindexes实现 select row... 阅读全文
posted @ 2006-11-20 22:03 StephenJu 阅读(389) 评论(0) 推荐(0) 编辑

2006年11月10日

摘要: ROUND函数是四舍五入函数,返回数字表达式并四舍五入为指定的长度或精度。 语法:ROUND ( numeric_expression , length [ , function ] ) 参数:numeric_expression 精确数字或近似数字数据类型类别的表达式(bit 数据类型除外)。 length 是 numeric_expression 将要四舍五入的精度。length 必须是 t... 阅读全文
posted @ 2006-11-10 11:56 StephenJu 阅读(4298) 评论(0) 推荐(0) 编辑

2006年11月9日

摘要: 若b列的值都为1则返回Y,否则返回X declare @t table(a int,b int)insert @tselect 1,1 union all select 2,1 union all select 3,1 union all select 4,0 select b=case when exists(select b from @t where b1) then 'X' else 'Y... 阅读全文
posted @ 2006-11-09 11:45 StephenJu 阅读(531) 评论(0) 推荐(0) 编辑

摘要: 重载:(2必须1可以) 方法名必须相同 参数列表必须不相同 返回类型可以不相同 覆写:(3相同) 方法名必须相同 ... 阅读全文
posted @ 2006-11-09 11:31 StephenJu 阅读(307) 评论(0) 推荐(0) 编辑

2006年9月27日

摘要: using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Data.SqlClient;using System.Drawing;using System.Text;using System.Windows.Forms;using System... 阅读全文
posted @ 2006-09-27 11:34 StephenJu 阅读(15448) 评论(10) 推荐(0) 编辑

上一页 1 ··· 3 4 5 6 7 8 下一页