随笔分类 - VisualStudio_C#
摘要:using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.IO; using System.Li
阅读全文
posted @ 2025-03-27 09:05
techNote
摘要:应用程序配置文件,对于asp.net是 web.config对于WINFORM程序是 App.Config(ExeName.exe.config)。 配置文件,对于程序本身来说,就是基础和依据,其本质是一个xml文件,对于配置文件的操作,从.NET 2.0 开始,就非常方便了,提供了 System
阅读全文
posted @ 2024-09-24 09:56
techNote
摘要:SqlHelper.cs using System; using System.Configuration;//这个一定要从项目的引用右键把其添加进来 using System.Data; using System.Data.SqlClient; namespace MySelfClassLibra
阅读全文
posted @ 2024-09-15 20:25
techNote
摘要:新建字典 保存字典到dictionary.frd文件中,是一个文本文件,记事本打开,主要目的是为报表设计时为拖字段,否则一个空表啥也没有,当然也可以楞写,但会痛苦,提供数据源,即提供向空报表中拖字段的来源 内容如下: 有字段 name,sex,age 一句话: 建立--保存--打开 字典的作用是为设
阅读全文
posted @ 2024-09-13 17:06
techNote
摘要:private void btnGenDT_Click(object sender, EventArgs e) { //创建表对象 DataTable dt = new DataTable(); //设置表列 dt.Columns.Add("姓名"); dt.Columns.Add("性别"); d
阅读全文
posted @ 2024-09-12 17:18
techNote
摘要:数据库 C#程序int int32text stringbigint int64binary System.Byte[]bit Booleanchar stringdatetime System.DateTimedecimal System.Decimalfloat System.Doubleima
阅读全文
posted @ 2024-09-03 14:17
techNote
摘要:////取消转义 //string str = @"a/b/c123"; //bool b=str.StartsWith("a"); //MessageBox.Show(b.ToString()); //str = str.TrimStart('a'); //str = str.TrimEnd('3
阅读全文
posted @ 2024-08-31 21:24
techNote
摘要:项目-引用-找到或用NuGet找到-确定 项目代码中通过using ...引用上面的命名空间 然后就可以使用该命名空间下的类及类下的字段/属性/方法等了 如system.configuration等
阅读全文
posted @ 2024-08-31 19:20
techNote
摘要:
阅读全文
posted @ 2024-08-31 09:03
techNote
摘要:public static bool ExportToExcelByNPOI(DataGridView dgv, string fileName) { bool b = false; try { IWorkbook workbook = new XSSFWorkbook(); ISheet shee
阅读全文
posted @ 2024-08-30 21:15
techNote
摘要:private void Form1_Load(object sender, EventArgs e) { statusStrip1.Items.Insert(1, new ToolStripSeparator());//1是索引,数控件位置从0开始 statusStrip1.Items.Inser
阅读全文
posted @ 2024-08-30 16:48
techNote
摘要:
阅读全文
posted @ 2024-08-29 16:02
techNote
摘要:三个步骤: 第一步:声明数据库连接对象: Sqlconnection connection=new Sqlconnection(ConnectionString); 第二步:声明数据库操作对象: 两种途径: 直接以字符串拼接的方式形成sql语句,比如: sqlstr="insert into use
阅读全文
posted @ 2024-08-23 18:44
techNote
摘要:using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;u
阅读全文
posted @ 2024-07-30 19:32
techNote
摘要:VS工具 VS2015 开发人员命令提示 执行以下命令:C:\Windows\System32>aspnet_regiis -i 或 C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC>aspnet_regiis -i 进入IIS命令: 开始
阅读全文
posted @ 2022-12-31 17:16
techNote
摘要:只引用FastReport.DLL即可: 代码中引用 命名空间 完整的实验代码 用不到数据库 如果用到数据库 读取库 再读取表 再生成 datatable 再添加到dataset中就OK啦 using System;using System.Collections.Generic;using Sys
阅读全文
posted @ 2022-06-22 20:15
techNote
摘要:FastReport设置DataSet数据源和传值的方式主要分两部分 1、FastReport 模板数据源设置 2、C# 调用FastReport模板并赋值 一、模板设置 1、新建或打开现有模板,在右边Data区域点击Action下拉框,选择Save Dictionary 选择保存路径。 2、用记事
阅读全文
posted @ 2022-06-22 19:55
techNote

浙公网安备 33010602011771号