The Perfect Day

分享技术,编写未来

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

2008年5月26日

摘要: DataRow dr = ds.Tables["student"].NewRow(); dr.ItemArray = ds.Tables["student"].Rows[0].ItemArray; ds.Tables["student"].Rows.Add(dr); //===========================1===============================// ... 阅读全文
posted @ 2008-05-26 14:53 StephenJu 阅读(2742) 评论(0) 推荐(0) 编辑

摘要: void dataGridView1_EditingControlShowing(object sender, DataGridViewEditingControlShowingEventArgs e) { DataGridView dgv = (DataGridView)sender; if (e.Control is DataGr... 阅读全文
posted @ 2008-05-26 14:52 StephenJu 阅读(650) 评论(0) 推荐(0) 编辑

摘要: C# 的类型转换,其内容涉及 C# 的装箱/拆箱/别名、数值类型间相互转换、字符的 ASCII 码和 Unicode 码、数值字符串和数值之间的转换、字符串和字符数组/字节数组之间的转换、各种数值类型和字节数组之间的转换、十六进制数输出以及日期型数据的一些转换处理,写在这里以备共同研究。 1. 装箱、拆箱还是别名 许多 C#.NET 的书上都有介绍 int -> Int32 是一个装... 阅读全文
posted @ 2008-05-26 14:50 StephenJu 阅读(386) 评论(0) 推荐(0) 编辑

摘要: 关键字:构造函数;析构函数;垃圾回收器;非托管资源;托管资源 一.构造函数与析构函数的原理 作为比C更先进的语言,C#提供了更好的机制来增强程序的安全性。C#编译器具有严格的类型安全检查功能,它几乎能找出程序中所有的语法问题,这的确帮了程序员的大忙。但是程序通过了编译检查并不表示错误已经不存在了,在“错误”的大家庭里,“语法错误”的地位只能算是冰山一角。级别高的错误通常隐藏得很深,不容... 阅读全文
posted @ 2008-05-26 14:49 StephenJu 阅读(453) 评论(0) 推荐(0) 编辑

摘要: DateTime dt = DateTime.Now; Label1.Text = dt.ToString();//2005-11-5 13:21:25 Label2.Text = dt.ToFileTime().ToString();//127756416859912816 Label3.Text = dt.ToFileTimeUtc().ToString();//12775... 阅读全文
posted @ 2008-05-26 14:47 StephenJu 阅读(267) 评论(0) 推荐(0) 编辑

摘要: using System; using System.Collections.Generic; using System.ComponentModel; using System.Drawing; using System.Data; using System.Text; using System.Windows.Forms; namespace StephenJu.Second { ... 阅读全文
posted @ 2008-05-26 14:33 StephenJu 阅读(327) 评论(0) 推荐(0) 编辑

摘要: 将Excel导入SQL Server2000 select * into tableName from opendatasource('Microsoft.Jet.OLEDB.4.0','Data Source=e:\simple.xls;Extended Properties=Excel 8.0')[sheet1$] select * into tableName from openrowse... 阅读全文
posted @ 2008-05-26 12:44 StephenJu 阅读(228) 评论(0) 推荐(0) 编辑

摘要: 1.比较字符串:Compare、CompareTo、Equals、==、!= 2.定位字符和子串:StartWith/EndsWith、IndexOf/LastIndexOf、IndexOfAny/LastIndexOfAny 3.格式化字符串:Format 4.连接字符串:Concat、Join、+ 5.分裂字符串:Split 6.插入和填充字符串:Insert、PadLeft/PagRight... 阅读全文
posted @ 2008-05-26 12:38 StephenJu 阅读(278) 评论(0) 推荐(0) 编辑

摘要: create proc pr_test @IN_STORE_CODE varchar(11), @in_date_start varchar(8), @in_date_end varchar(8), @state_flag char(1), @WH_CODE varchar(3), @RECIPT_NO char(11), @SUP_NAME varchar(60), @MATERIAL_CO... 阅读全文
posted @ 2008-05-26 12:36 StephenJu 阅读(407) 评论(0) 推荐(0) 编辑

摘要: --查看表的属性 select * from sysObjects where [Name] = 'section' --用法 if exists ( select * from sysObjects where [Name] = 'section' and xtype='U' ) Drop Table table1 go Create table1 ( ) --获取所有用... 阅读全文
posted @ 2008-05-26 12:32 StephenJu 阅读(262) 评论(0) 推荐(0) 编辑