C# WIN 桌面开发共12篇
C# WIN 桌面开发
C#---数据库访问通用类、Access数据库操作类、mysql类-BP大马随笔

C#—数据库访问通用类、Access数据库操作类、mysql类

//C# 数据库访问通用类 (ADO.NET) using System; using System.Collections.Generic; using System.Text; using System.Data; using System.Data.SqlClient; using System.Configuration; names...
bpdama的头像-BP大马随笔bpdama2年前
05410
DataSet和DataTable-BP大马随笔

DataSet和DataTable

每一个DataSet都是一个或多个DataTable 对象的集合(DataTable相当于数据库中的表),这些对象由数据行(DataRow)、数据列(DataColumn)、字段名(Column Name)、数据格(Item),以及约束(...
bpdama的头像-BP大马随笔bpdama2年前
010614
DataSet 详细操作和统计数据-BP大马随笔

DataSet 详细操作和统计数据

每一个DataSet都是一个或多个DataTable 对象的集合(DataTable相当于数据库中的表),这些对象由数据行(DataRow)、数据列(DataColumn)、字段名(Column Name)、数据格(Item),以及约束(...
bpdama的头像-BP大马随笔bpdama2年前
0676
c# sql 数据库 多表关联 根据一个表的字段 读取另一个表的内容-BP大马随笔

c# sql 数据库 多表关联 根据一个表的字段 读取另一个表的内容

数据库中有3个表,分别是:1. Person字段为: ID;NAME;JOBID;CLASSID              1    李明&nb...
bpdama的头像-BP大马随笔bpdama2年前
06810
c# file类 文件删除、创建、重名、复制设置文件属性-BP大马随笔

c# file类 文件删除、创建、重名、复制设置文件属性

using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.IO; namespace ConAppFile { class Program { //file类,文件删除、创建、重名、复制设...
bpdama的头像-BP大马随笔bpdama2年前
0736
C# winform中OpenFileDialog的运用还可以多选-BP大马随笔

C# winform中OpenFileDialog的运用还可以多选

using System; using System.Drawing; using System.Collections; using System.ComponentModel; using System.Windows.Forms; using System.Data; using System.Data.OleDb; using System.Runt...
bpdama的头像-BP大马随笔bpdama2年前
0529
c# winform 删除datagridview中的checkbox选定的行-BP大马随笔

c# winform 删除datagridview中的checkbox选定的行

private void indexBtnDelete_Click(object sender, EventArgs e)        {            string strNames = '您选择的是:';    &...
c# 将datagridview某一列设定为不可编辑或可编辑-BP大马随笔

c# 将datagridview某一列设定为不可编辑或可编辑

this.indexDataGridView1.Columns[1].ReadOnly = true; this.indexDataGridView1.Columns[2].ReadOnly = true; this.indexDataGridView1.Columns[3].ReadOnly = true; this.indexDataGridView1....
bpdama的头像-BP大马随笔bpdama2年前
0558
c# 代码更改dataset某单元的内容以及绑定数据到combobox中,并且写入数组-BP大马随笔

c# 代码更改dataset某单元的内容以及绑定数据到combobox中,并且写入数组

private string connstr = 'Provider = Microsoft.Jet.OLEDB.4.0; Data Source = aaa.mdb'; public DataSet getlist(string str, string tableName)        {   ...
bpdama的头像-BP大马随笔bpdama2年前
09210
c# 判断dataset 或data table是否为空-BP大马随笔

c# 判断dataset 或data table是否为空

if(ds != null && ds.Tables.Count>=0 && ds.Tables[0].Rows.Count>0) { ds.Table[0].Row[0]['name'];  }  判断DataSet是否为空//*****************...
bpdama的头像-BP大马随笔bpdama2年前
06815