2008年12月27日

摘要: 当数据绑定控件(如 GridView、DetailsView 或 FormView 控件)与 ASP.NET 数据源控件共同使用时,数据绑定控件可根据数据绑定控件中的绑定字段向数据源控件传递参数名称和值。然后数据源控件会在参数集合中包含字段名称和值,以进行选择或更新操作。有关更多信息,请参见对 SqlDataSource 控件使用参数和对 ObjectDataSource 控件使用参数。 传递给数... 阅读全文
posted @ 2008-12-27 13:02 J-Pei 阅读(1316) 评论(0) 推荐(0) 编辑

2008年12月5日

摘要: click() 对象.click() 使对象被点击。 closed 对象.closed 对象窗口是否已关闭true/false clearTimeout(对象) 清除已设置的setTimeout对象 clearInterval(对象) 清除已设置的setInterval对象 confirm("提示信息") 弹出确认框,确定返回true取消返回false cursor:样式 更改... 阅读全文
posted @ 2008-12-05 13:24 J-Pei 阅读(154) 评论(0) 推荐(0) 编辑

2008年8月28日

摘要: 匹配1;2;3 的正则表达式 public static bool IsValidPage(string strIn,int b) { bool aa = Regex.IsMatch(strIn, @"([a-zA-Z0-9];){"+(b-1).ToString()+"}([a-zA-Z0-9])$"); return aa; ... 阅读全文
posted @ 2008-08-28 17:00 J-Pei 阅读(258) 评论(0) 推荐(0) 编辑

2008年8月9日

摘要: 用CellEndEdit事件触发函数去响应cell值的改变. combbox绑定的问题,我把datagridview的那一列定义成DataGridViewComboBoxColumn,然后再把指定cell强制转换为datagridviewcomboboxcell就可以绑定数据了. // 你可以在DataGridView的EditingControlShowing事件中加入如下代码,来给你的C... 阅读全文
posted @ 2008-08-09 17:05 J-Pei 阅读(2561) 评论(0) 推荐(0) 编辑
摘要: private DataGridView dataGridView1 = new DataGridView(); private void AddColorColumn() { DataGridViewComboBoxColumn comboBoxColumn = new DataGridViewComboBoxColumn(); comboBoxColumn.I... 阅读全文
posted @ 2008-08-09 11:16 J-Pei 阅读(684) 评论(0) 推荐(0) 编辑

2008年8月5日

摘要: private void dataGridView1_CellBeginEdit(object sender, DataGridViewCellCancelEventArgs e) { if (dataGridView1.Rows[e.RowIndex].Cells[e.ColumnIndex].GetType().Name == ... 阅读全文
posted @ 2008-08-05 12:49 J-Pei 阅读(168) 评论(0) 推荐(0) 编辑

2008年6月10日

摘要: 在DataGridView的RowDataBound事件裡判斷並修改: if(e.Row.Cells[n].Text=="0") { e.Row.Attributes.Add("bgColor", "red"); } else if(e.Row.Cells[n].Text>"500") { e... 阅读全文
posted @ 2008-06-10 15:40 J-Pei 阅读(1732) 评论(0) 推荐(0) 编辑

2008年5月28日

摘要: 关于C#数据类型之间转换的讨论 在装箱,拆箱过程中,首先涉及到的是数据的转换。发下午几个小时,研究了C#中数据类型之间的转换涉及的一些问题,希望大家给予意见! 1、数据类型的类名 这里讲的数据的类名指的是: Sytem.data.DbType对应的类型,我是这样理解的。 类名 System中相对应的类型 bool System.Boolean (布尔型,其值为 true 或者 f... 阅读全文
posted @ 2008-05-28 15:27 J-Pei 阅读(621) 评论(0) 推荐(0) 编辑

2008年2月3日

摘要: http://msdn2.microsoft.com/zh-cn/library/3xdhey7w(VS.80).aspx 阅读全文
posted @ 2008-02-03 09:16 J-Pei 阅读(125) 评论(0) 推荐(0) 编辑

2008年2月2日

摘要: // EventSample.cs. // namespace EventSample { using System; using System.ComponentModel; // Class that contains the data for // the alarm event. Derives from System.EventArgs. //... 阅读全文
posted @ 2008-02-02 09:36 J-Pei 阅读(264) 评论(0) 推荐(0) 编辑

2008年2月1日

摘要: private void DecimalToCurrencyString(object sender, ConvertEventArgs cevent) { // The method converts only to string type. Test this using the DesiredType. if(cevent.DesiredType != typeof(string... 阅读全文
posted @ 2008-02-01 15:50 J-Pei 阅读(260) 评论(0) 推荐(0) 编辑

2008年1月2日

摘要: 这些天一直在关注2007总结的话题,分享大家的成长经历,我感到非常高兴。看到高兴处我感觉也应该写点什么,与大家一起分享一起成长。 我不是科班出身,学习开发.net也只有两年的时间,只是一些皮毛的东西,需要学习的东西还有很多。我的2007是不平凡的一年,做的比较辛苦,从年初就开始在做一个.net项目,加班的情况也很多,公司对项目也是很重视的。因为.net项目做的不是很多,我们的开发团队也... 阅读全文
posted @ 2008-01-02 10:44 J-Pei 阅读(237) 评论(1) 推荐(0) 编辑

2007年12月5日

摘要: 其实,微软的企业库中有一个非常不错的数据操作类了.但是,不少公司(起码我遇到的几个...),对一些"封装"了些什么的东西不太敢用,虽然我推荐过微软的企业库框架了...但是还是要"评估"...一评就是几个月...而且,一些公司有的根本就是裸ado.net开发,或者自己封装的数据库操作类非常别扭,很不好用. 这里我给大家共享一个我参照企业库中的数据操作组件编码风格写的数据库操作类,对使用它... 阅读全文
posted @ 2007-12-05 21:27 J-Pei 阅读(716) 评论(4) 推荐(0) 编辑
摘要: C#格式化数值结果表 字符 说明 示例 输出 ... 阅读全文
posted @ 2007-12-05 21:03 J-Pei 阅读(267) 评论(0) 推荐(0) 编辑
摘要: 今天想找一个Class浏览工具,就像VS.NET中的对象浏览器。后来在http://www.dotnettoolbox.com/toolbox/ViewCategory.aspx?ID=5(这个网站也是个不错的地方)发现这个工具:Reflector for .NET 。 网址: http://www.aisto.com/roeder/dotnet/ 下载地址: http://www.aisto... 阅读全文
posted @ 2007-12-05 12:52 J-Pei 阅读(214) 评论(0) 推荐(0) 编辑

2007年12月4日

摘要: using System; using System.Collections; using System.Collections.Specialized; using System.Runtime.Remoting.Messaging; using System.Data; using System.Data.SqlClient; using System.Configuration; names... 阅读全文
posted @ 2007-12-04 12:48 J-Pei 阅读(291) 评论(0) 推荐(0) 编辑
摘要: using System; using System.Data; using System.Data.SqlClient; using System.Configuration; namespace DbBase { public abstract class Base { "Fields of base calss"#region "Fields of base calss... 阅读全文
posted @ 2007-12-04 12:43 J-Pei 阅读(760) 评论(0) 推荐(0) 编辑

2007年11月24日

摘要: 看到网上的读写app.config的代码,说是写的时候不能直接用System.Configuration.ConfigurationSettings.AppSettings.Set(AppKey, AppValue),而要把app.config当作XML文件来写。试了下确实如此,那这个Set()方法提供来是干嘛的?源代码的SelectSingleNode()里写的XPath有问题,就随带看了点XP... 阅读全文
posted @ 2007-11-24 20:09 J-Pei 阅读(1857) 评论(2) 推荐(0) 编辑

2007年11月23日

摘要: http://www.cnblogs.com/A-Z/archive/2007/03/14/675230.html 阅读全文
posted @ 2007-11-23 21:08 J-Pei 阅读(132) 评论(0) 推荐(0) 编辑
摘要: private void tableBindingSource_AddingNew(object sender, AddingNewEventArgs e) { BindingSource bs = (BindingSource)sender; DataView view = (DataView)bs.List; Data... 阅读全文
posted @ 2007-11-23 20:38 J-Pei 阅读(354) 评论(0) 推荐(0) 编辑

导航