2014年3月14日
摘要: // 一个自用的 SqlHelper 类 利用了刚学习到的 扩展方法 http://technet.microsoft.com/zh-cn/bb383977 /// /// The SqlHelper class is intended to encapsulate high performance, /// scalable best practices for common uses of SqlClient. /// public abstract class SqlHelper { //Database connection st... 阅读全文
posted @ 2014-03-14 10:45 z5337 阅读(368) 评论(0) 推荐(0) 编辑
摘要: //允许增加一个 checkbox 列 public class DgvBase : DataGridViewX { protected override void OnColumnAdded(DataGridViewColumnEventArgs e) { base.OnColumnAdded(e); //if (e.Column.ValueType == typeof(int) || e.Column.ValueType == typeof(long) || e.Column.ValueType == typ... 阅读全文
posted @ 2014-03-14 10:44 z5337 阅读(578) 评论(0) 推荐(0) 编辑
  2013年12月28日
摘要: http://subclipse.tigris.org/servlets/ProjectProcess?pageID=p4wYuA 首先,在这个网址找着最新在线安装链接 就是那个 Links for 1.10.x Release: 下面的几个链接,都是在线安装链接. 然后复制 Eclipse upd 阅读全文
posted @ 2013-12-28 00:46 z5337 阅读(1302) 评论(0) 推荐(0) 编辑
  2013年11月25日
摘要: public partial class Form1 : Form { public Form1() { InitializeComponent(); dataGridView1.DataSourceChanged += new EventHandler(dataGridView1_DataSourceChanged); dataGridView1.CellValueChanged += new DataGridViewCellEventHandler(dataGridView1_CellVa... 阅读全文
posted @ 2013-11-25 11:38 z5337 阅读(413) 评论(0) 推荐(0) 编辑
  2013年11月18日
摘要: public void DataTable2Txt(DataTable dt, string fullFileName) { if (dt == null) return; try { using (FileStream fs = new FileStream(fullFileName, FileMode.Create)) { using (StreamWriter sw = new StreamWriter(fs... 阅读全文
posted @ 2013-11-18 11:06 z5337 阅读(238) 评论(1) 推荐(0) 编辑
  2013年10月16日
摘要: 1 using System; 2 using System.Collections.Generic; 3 using System.ComponentModel; 4 using System.Data; 5 using System.Drawing; 6 using System.Text; 7 using System.Windows.Forms; 8 using System.IO; 9 using System.Diagnostics; 10 11 namespace UpdateDllApplication1 12 { 13 public partia... 阅读全文
posted @ 2013-10-16 17:02 z5337 阅读(1649) 评论(1) 推荐(0) 编辑
  2013年9月29日
摘要: MS SQL 转换数据类型select cast(列A as int) 列Aselect convert(int,列A) 列A--转字符串为intselect len(ltrim(str('数字')))select len(str('数字'))--转数字为字符串时 要加ltrim 来去掉左边空格 阅读全文
posted @ 2013-09-29 16:37 z5337 阅读(243) 评论(0) 推荐(0) 编辑
  2013年9月17日
摘要: 找来找去,在CSDN 里看到高手解答了. 原来 WebService 传递参数时,不能使用 DataTable 如果需要使用DataTable 那就要用 DataSet 包装起来. 如果担心数据太大,可以在 Web.Config 中做以下配置: 阅读全文
posted @ 2013-09-17 16:46 z5337 阅读(891) 评论(0) 推荐(0) 编辑
  2013年9月16日
摘要: http://zhidao.baidu.com/question/537720692.html 阅读全文
posted @ 2013-09-16 21:17 z5337 阅读(212) 评论(0) 推荐(0) 编辑
  2013年9月11日
摘要: Form_Load 事件下绘制的结果会被 paint 刷新掉.也就等于没有绘制一样.Graphics g = this.CreateGraphics();g.DrawRectangle(new Pen(Brushes.Blue, 2), new Rectangle(0, 0, ClientRectangle.Width / 2, ClientRectangle.Height / 2));g.DrawRectangle(new Pen(Color.Red, 2), new Rectangle(0, ClientRectangle.Height / 2, ClientRectangle.Width 阅读全文
posted @ 2013-09-11 18:29 z5337 阅读(895) 评论(0) 推荐(1) 编辑