摘要: /// <summary> /// 扩展方法 /// </summary> public static class Extensions { static Extensions() { } /// <summary> /// 将对象序列化成json字符串 /// </summary> /// <pa 阅读全文
posted @ 2021-01-12 10:08 cclon 阅读(573) 评论(0) 推荐(0) 编辑
摘要: public partial class WeighRecord : Form { WeighRecordSet headsSet = null; public WeighRecord() { InitializeComponent(); this.RecordTimepx.Format = Dat 阅读全文
posted @ 2020-09-30 15:17 cclon 阅读(1729) 评论(0) 推荐(0) 编辑
摘要: //方法一 表头调换, 后台调用 this.dataGridView1.Columns["ProductName"].DisplayIndex = 0; //方法二 表头调换,属性设置, 页面上拖拽 this.dataGridView1.AllowUserToOrderColumns = true; 阅读全文
posted @ 2020-09-30 10:17 cclon 阅读(1684) 评论(0) 推荐(1) 编辑
摘要: vs2019 .netcode3.1 using Bps.DTO; using ICSharpCode.SharpZipLib.Zip; using Microsoft.AspNetCore.Mvc; using Swashbuckle.AspNetCore.Annotations; using S 阅读全文
posted @ 2020-09-10 18:09 cclon 阅读(290) 评论(0) 推荐(0) 编辑
摘要: C#位数不足补零:int i=10;方法1:Console.WriteLine(i.ToString("D5"));方法2:Console.WriteLine(i.ToString().PadLeft(5,'0'));//推荐方法3:Console.WriteLine(i.ToString("000 阅读全文
posted @ 2020-09-04 11:41 cclon 阅读(3568) 评论(0) 推荐(0) 编辑
摘要: 设置->设置->右上角转换成JSON里加以下代码,作用是自动格式化代码 { // 控制编辑器是否应在键入后自动设置行的格式 "editor.formatOnType": true, // #值设置为true时,每次保存的时候自动格式化;值设置为false时,代码格式化请按shift+alt+F "e 阅读全文
posted @ 2020-08-21 14:10 cclon 阅读(2637) 评论(0) 推荐(0) 编辑
摘要: 用css让div高度自动撑满屏幕 从事前端工作近五年了,说来惭愧,对css一直很头疼,今天又碰到了一个让元素自动撑满高度的问题,以此来适应不同的屏幕尺寸,查阅了一些资料,发现解决方法竟然如此简单,我也来简单地记录一下吧。 需求描述:页面有一个公共的头部,下面是正文的div,为了适应不同尺寸的屏幕,要 阅读全文
posted @ 2020-07-31 11:33 cclon 阅读(4902) 评论(0) 推荐(0) 编辑
摘要: 运行环境 .net code 2.2 IFormFileCollection files; var singlefile = files.FirstOrDefault(); //得到流文件,文件名称 singlefile.OpenReadStream(), singlefile.FileName 阅读全文
posted @ 2020-07-29 11:53 cclon 阅读(4627) 评论(0) 推荐(0) 编辑
摘要: 官网 地址参考 https://docs.microsoft.com/zh-cn/dotnet/core/tools/dotnet-build 项目根目录下 执行命令 dotnet build --runtime win-x64 位置 阅读全文
posted @ 2020-01-07 11:42 cclon 阅读(368) 评论(0) 推荐(0) 编辑
摘要: using System; using System.Collections.Generic; using System.Linq; using System.Net; using System.Net.Sockets; using System.Text; using System.Threading; using System.Threading.Tasks; namespace UDPTes 阅读全文
posted @ 2019-12-20 13:55 cclon 阅读(29466) 评论(0) 推荐(1) 编辑