随笔分类 -  winfrom

摘要:CodeSmith连接Access,Sql,Oracle,mysqlACCESS数据库1:CodeSmith选中链接类型是:ADOXSchema2:无密码的Access链接为:Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\hh\db.mdb;3:有密... 阅读全文
posted @ 2015-07-27 15:24 王文姿 阅读(207) 评论(0) 推荐(0)
摘要:namespace WindowsFormsApplication5{ public partial class Form1 : Form { public Form1() { InitializeComponent(); ... 阅读全文
posted @ 2015-06-30 19:47 王文姿 阅读(245) 评论(0) 推荐(0)
摘要:using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;u... 阅读全文
posted @ 2015-06-19 09:38 王文姿 阅读(223) 评论(0) 推荐(0)
摘要:using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;u... 阅读全文
posted @ 2015-06-18 09:30 王文姿 阅读(216) 评论(0) 推荐(1)
摘要:c# 操作txt文件 # 操作txt文件 c#创建文本private const string FILE_NAME = "ErroLog.txt"; public static void WriteFile(string str) ...{ S... 阅读全文
posted @ 2015-06-15 09:23 王文姿 阅读(4015) 评论(0) 推荐(0)
摘要:1)Trim方法string tt=" aaa "; tt=tt.Trim() 去字符串首尾空格的函数tt=tt.TrimEnd() 去掉字符串尾空格tt=tt.TrimStart() 去掉字符串首空格 阅读全文
posted @ 2015-06-15 09:20 王文姿 阅读(372) 评论(0) 推荐(0)
摘要:复制代码1、打开文件路径: OpenFileDialog a= new OpenFileDialog(); //new一个方法a.Filter = "(*.et;*.xls;*.xlsx)|*.et;*.xls;*.xlsx|all|*.*"; //删选、设定文件显示类型a.ShowDialog(... 阅读全文
posted @ 2015-06-15 09:18 王文姿 阅读(1125) 评论(0) 推荐(0)
摘要:private void button1_Click(object sender, EventArgs e) //这里是不用泛型集合的情况,用的是Datatable { SqlConnection conn = new SqlConnection("server=... 阅读全文
posted @ 2015-06-12 15:25 王文姿 阅读(261) 评论(0) 推荐(0)
摘要:private void button3_Click(object sender, EventArgs e) { if(listView1.SelectedItems.Count>0) { string x = listView1.Select... 阅读全文
posted @ 2015-06-08 22:40 王文姿 阅读(185) 评论(0) 推荐(0)
摘要:private void button1_Click(object sender, EventArgs e) //登陆页面的第一栏的文本 要将它传到Main窗体的状态栏 { //... 阅读全文
posted @ 2015-06-08 22:39 王文姿 阅读(355) 评论(0) 推荐(0)
摘要:private void button1_Click(object sender, EventArgs e)//从硬盘打开图片显示在窗体里面 { OpenFileDialog op = new OpenFileDialog();//造一个打开对话框 ... 阅读全文
posted @ 2015-06-08 22:36 王文姿 阅读(354) 评论(0) 推荐(0)
摘要:public class method { //成员变量 private SqlConnection conn; private SqlCommand cmd; public method() //通过构造函数给变量赋值 { ... 阅读全文
posted @ 2015-06-08 21:05 王文姿 阅读(191) 评论(0) 推荐(0)
摘要:namespace 计算器_新{ public partial class Form1 : Form { public Form1() { InitializeComponent(); } private bo... 阅读全文
posted @ 2015-05-30 23:38 王文姿 阅读(290) 评论(0) 推荐(0)
摘要:using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Window... 阅读全文
posted @ 2015-05-30 23:37 王文姿 阅读(288) 评论(0) 推荐(0)