1.获取数据源(select * from table名称) 2.动态绑定数据源 private void GetTableInfo(DataTable dt) { listBh = new List<BH_DICTInfo>(); foreach (DataRow dr in dt.Rows) { BH_DICTInfo model = new BH_DICTInfo(); model.DictId = dr["DICT_ID"].ToString(); model.Di
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; using System.Collections; namespace TechnologyProject.项目管理.加计扣除.ERP导入 { public partia
最近用dataGridView比较多,先把代码备份在这里,有时间系统总结一下 using FindId.DAL; using FindId.Model; using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Thre
效果: 代码: using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; namespace DataGridViewDownComboBoxDemo { public partial class Form1 : Form {
先查看txt是每条信息之间是通过什么分割,我是通过换行符(\n)分割的, 然后再看每一条信息中字段是通过什么分割,我的字段是通过 tab键(\t)分割. 第一步 先获取到txt文件的路径: //获取绝对路径 var path = "C:/Users/Ljk/Desktop/asdasd/1238191.txt"; var con = System.IO.File.ReadAllText(path, Encoding.Default); //获取相对路径 var con = System
create DATABASE stu ON ( name='stu.mdf', filename='F:\胡浴东\数据库\stu数据库\stu.mdf', size=, filegrowth= ) log ON ( name='stu_log.ldf', filename='F:\胡浴东\数据库\stu数据库\stu_log.ldf', size=, filegrowth= ) go USE [stu] GO /****** Object: Table [dbo].[classinfo] Sc