C# winfrom
merryhong
这个作者很懒,什么都没留下…
展开
-
水晶报表dataset与参数传值的设置
string str_select = "select * from xt_depart_kkb where months='" + m_mmonths + "'and xxly like'%" + m_ddepartment + "%'or xxly='各单位' or xxly原创 2011-09-07 08:55:59 · 810 阅读 · 0 评论 -
C#中调用SQL存储过程(带输入参数的例子)
SqlConnection conn = pbvar.getconn();//调味用公共类 conn.Open(); SqlCommand sqlcmd =new SqlCommand("xt_Company_i原创 2011-08-28 15:20:27 · 857 阅读 · 0 评论 -
选择listview数据,传给另外一个窗口
private void toolStripButton2_Click(object sender, EventArgs e)//修改用户信息 { try { if (lvwu原创 2011-08-24 17:07:42 · 1186 阅读 · 0 评论 -
回车时下一个控件获得焦点
private void txtpwd_KeyPress(object sender, KeyPressEventArgs e) { if (e.KeyChar == (char)13) this.bt原创 2011-08-24 10:07:10 · 349 阅读 · 0 评论 -
公用sqlcommand 函数
#region 执行sqlcommand 命令 public SqlCommand getcom(string m_str_sqlstr) { SqlConnection sqlconn=this.getcon()原创 2011-08-24 10:11:24 · 357 阅读 · 0 评论 -
判断输入的字符是否为数字
#region 判断输入的字符是否为数字 public bool IsNum(string txt) { try { int N = Convert.ToIn原创 2011-08-24 10:12:42 · 436 阅读 · 0 评论 -
C# 数据库连接设置并把设置写入到txt文本中
using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq原创 2011-08-24 10:05:23 · 728 阅读 · 0 评论 -
数据库连接函数并读取TXT文本中的数据
#region 数据库连接函数 public SqlConnection getcon() { StreamReader sr = new StreamReader("config.txt");原创 2011-08-24 10:08:55 · 559 阅读 · 0 评论 -
按照listview 的列数来导入数据
#region listview 所有listview导入数据 public void lvwkpi(ListView listview1, string sqlstrlvw) { SqlCommand sqlcmd原创 2011-08-24 10:12:09 · 426 阅读 · 0 评论 -
给combox设置初始值
当combox的DropDownList设为dropdownlist时,给combox设置初始值cbbkpi.Items.Clear();cbbkpi.Items.Add("--请选择--");cbbkpi.SelectedIndex = 0;cbbxxly.It原创 2011-08-30 17:49:11 · 2784 阅读 · 0 评论