上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 44 下一页
摘要: BindingSource bindingSource = new BindingSource(); bindingSource.DataSource = products1; this.dataGridView1.DataSource = bindingSource; 然后: 你该怎么操作怎么操作 阅读全文
posted @ 2024-06-17 09:22 龙卷风吹毁停车场 阅读(102) 评论(0) 推荐(0)
摘要: 1. 将 EnableHeadersVisualStyles 设置为 false, 自定义的样式才会显示2. 将ColumnHeadersDefaultCellStyle 样式按照你自己的需求设置(可以设置表头背景颜色,表头字体样式,等)3, 设置 表头单元格边框样式 ColumnHeadersBo 阅读全文
posted @ 2024-06-16 11:25 龙卷风吹毁停车场 阅读(144) 评论(0) 推荐(0)
摘要: 1. 安装两个 nuget 包 2. 创建 log4net.config 文件 ,选中 文件鼠标右键,选择属性->复制到输出目录 修改为 始终复制 <?xml version="1.0" encoding="utf-8" ?> <configuration> <!--只保留创建日期是最近1天的--> 阅读全文
posted @ 2024-06-15 10:03 龙卷风吹毁停车场 阅读(370) 评论(0) 推荐(0)
摘要: using System; using System.Collections.Generic; using System.Data.SqlClient; using System.Linq; using System.Text; using System.Threading.Tasks; using 阅读全文
posted @ 2024-06-14 19:28 龙卷风吹毁停车场 阅读(16) 评论(0) 推荐(0)
摘要: 1. 将从数据库拿到的DataSet数据集转为DataTable类型 DataTable dt = SqlHelper.GetData() 使用: RowFilter来实现筛选功能 赛选出ClassId为我指定 ClassId的数据 dt.DefaultView.RowFilter = "Class 阅读全文
posted @ 2024-06-14 12:35 龙卷风吹毁停车场 阅读(21) 评论(0) 推荐(0)
摘要: 语法: public static DataTable ExecuteTable(string sql) { using (SqlConnection conn = new SqlConnection(connStr)) { conn.Open(); SqlCommand cmd = new Sql 阅读全文
posted @ 2024-06-14 09:34 龙卷风吹毁停车场 阅读(26) 评论(0) 推荐(0)
摘要: this.nian.Text = DateTime.Now.Year.ToString(); //获取年 this.yue.Text = DateTime.Now.Month.ToString(); //获取月 this.ri.Text = DateTime.Now.Day.ToString(); 阅读全文
posted @ 2024-06-13 23:13 龙卷风吹毁停车场 阅读(74) 评论(0) 推荐(0)
摘要: 1. 给Timer控件的name取一个名字2. 将 Enabled 设置为true3.双击Tick事件 /// <summary> /// 每个一秒获取一次时间 /// </summary> /// <param name="sender"></param> /// <param name="e"> 阅读全文
posted @ 2024-06-13 23:05 龙卷风吹毁停车场 阅读(71) 评论(0) 推荐(0)
摘要: 1. 查询平均值语法 select avg(要计算的值) as 别名 from 表名 select 别名=avg(要计算的值) from 表名 2.获取数据总条数 select count(*) as 别名 from 表名 select 别名=count(*) from 表名 以下是举例: publ 阅读全文
posted @ 2024-06-13 17:56 龙卷风吹毁停车场 阅读(500) 评论(0) 推荐(0)
摘要: 转化之前: 转换之后 1. 官方文档有详细讲解 https://learn.microsoft.com/zh-cn/dotnet/core/install/localized-intellisense 2. 汉化包下载: https://dotnet.microsoft.com/zh-cn/down 阅读全文
posted @ 2024-06-13 14:12 龙卷风吹毁停车场 阅读(320) 评论(0) 推荐(0)
上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 44 下一页