上一页 1 ··· 3 4 5 6 7 8 9 10 11 下一页
  2020年5月23日
摘要: 如下: public class Export { public void dataGridViewToCSV(DataGridView dataGridView) { if (dataGridView.Rows.Count == 0) { MessageBox.Show("没有数据可导出!", " 阅读全文
posted @ 2020-05-23 11:38 RookieBoy666 阅读(752) 评论(0) 推荐(0) 编辑
  2020年5月22日
摘要: 解决方法: 添加如下: 代码: Thread t = new Thread((ThreadStart)(() => { SaveFileDialog saveqrimg = new SaveFileDialog(); saveqrimg.Title = "二维码图片保存"; saveqrimg.Fi 阅读全文
posted @ 2020-05-22 15:28 RookieBoy666 阅读(3753) 评论(0) 推荐(1) 编辑
  2020年5月13日
摘要: 1.先创建一个类: public static class MyServiceProvider { public static IServiceProvider ServiceProvider { get; set; } } 2.Startup.cs中Configure方法中添加 MyService 阅读全文
posted @ 2020-05-13 17:35 RookieBoy666 阅读(5962) 评论(5) 推荐(2) 编辑
  2020年5月8日
摘要: 1.连接SQL server (最好是视图、存储过程) 2.录制宏(可录制刷新,点击按钮刷新) 开发工具 录制宏、停止录制 指定宏: 保存文件时最好保存为.xslm 阅读全文
posted @ 2020-05-08 13:52 RookieBoy666 阅读(155) 评论(0) 推荐(0) 编辑
  2020年4月26日
摘要: 尝试一个小项目,实现的功能实现PC的常用功能,比如定时关机、清除缓存、网络重置啥的,不用用户直接去CMD窗口执行,实现便捷的目的 初步规划 1.功能实现 2.版本打包 3.版本更新 4.测试(环境测试) 5.使用 如下: GitHub地址: https://github.com/RookieBoy6 阅读全文
posted @ 2020-04-26 13:15 RookieBoy666 阅读(332) 评论(0) 推荐(0) 编辑
  2020年4月21日
摘要: 在bat文件中开头加入以下内容: @echo off >nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system" if '%errorlevel%' NEQ '0' ( echo Request 阅读全文
posted @ 2020-04-21 17:16 RookieBoy666 阅读(352) 评论(0) 推荐(0) 编辑
  2020年4月18日
摘要: 如下: DataTable dt = (DataTable)this.dataGridView1.DataSource; //数据集转化为DataTable dataGridView1.Rows.Count //数量统计 int ccc = dataGridView1.CurrentCell.Row 阅读全文
posted @ 2020-04-18 08:46 RookieBoy666 阅读(176) 评论(0) 推荐(0) 编辑
  2020年4月17日
摘要: 1.日志记录Log.cs public class Log { private string Event { get; set; } private DateTime Time { get; set; } /// <summary> /// 日志记录,写入文件 /// </summary> /// 阅读全文
posted @ 2020-04-17 14:56 RookieBoy666 阅读(144) 评论(0) 推荐(0) 编辑
摘要: 如下: if (!File.Exists(@"D:\MyFile.txt")) { FileStream fs = new FileStream(@"D:\MyFile.txt", FileMode.Create, FileAccess.Write); } else { using (FileStr 阅读全文
posted @ 2020-04-17 14:25 RookieBoy666 阅读(775) 评论(0) 推荐(0) 编辑
摘要: App.config中: <appSettings> <add key="connectionstring" value="Data Source=127.0.0.1;Initial Catalog=DatabaseName;Persist Security Info=True; User ID=s 阅读全文
posted @ 2020-04-17 13:27 RookieBoy666 阅读(485) 评论(0) 推荐(0) 编辑
上一页 1 ··· 3 4 5 6 7 8 9 10 11 下一页