随笔分类 -  C#

C#
摘要:C# 使用SqlDataAdapter和DataSet来访问数据库 实体 namespace VipSoft.Entity { [Table(Name = "PH_Prescription")] public class Prescription : Web.Core.Orm.Entity { [C 阅读全文
posted @ 2024-07-17 12:45 VipSoft 阅读(152) 评论(0) 推荐(0)
摘要:ASP.NET MVC WebApi 接口返回 JOSN 日期格式化 date format 全局配置 WebApiConfig public static class WebApiConfig { public static void Register(HttpConfiguration conf 阅读全文
posted @ 2024-04-09 10:46 VipSoft 阅读(146) 评论(0) 推荐(0)
摘要:C# Newtonsoft.Json.Formatting DateTime 日期格式化 List<Record> list = new List<Record>(); for (int i = 0; i < 10; i++) { Record item = new Record(); item.N 阅读全文
posted @ 2024-02-27 08:31 VipSoft 阅读(437) 评论(0) 推荐(0)
摘要:Java C# md5 加密值保持一致,一般是编码不一致造成的值不同 JAVA (加密:123456) C#(加密:123456) UTF-8 e10adc3949ba59abbe56e057f20f883e UTF8 e10adc3949ba59abbe56e057f20f883e UTF-16L 阅读全文
posted @ 2023-12-22 15:38 VipSoft 阅读(346) 评论(0) 推荐(0)
摘要:WPF 异步执行 Action<> Func<> https://www.cnblogs.com/vipsoft/p/4535037.html C# 异步 this.BeginInvoke 、Task.Run 或 Thread: https://www.cnblogs.com/vipsoft/p/1 阅读全文
posted @ 2023-10-20 16:11 VipSoft 阅读(64) 评论(0) 推荐(0)
摘要:C# 使用 DbDataReader 来访问数据库 使用SqlDataAdapter和DataSet来访问数据库 报:已有打开的与此 Command 相关联的 DataReader,必须首先将它关闭 解决方法,使用 using 包住 connection using System; using Sy 阅读全文
posted @ 2023-10-13 13:20 VipSoft 阅读(202) 评论(0) 推荐(0)
摘要:/// <summary> /// 当前时间是否是值班时间 /// </summary> private bool IsDutyTime { get { var dutyTime = "23:00-07:00"; if (!string.IsNullOrEmpty(dutyTime)) { var 阅读全文
posted @ 2023-10-12 09:58 VipSoft 阅读(46) 评论(0) 推荐(0)
摘要:.NET Core 在其上下文中,该请求的地址无效。 看了端口,发现没被占用,后来发现是IP地址变了 改成正确的IP就可以了。 阅读全文
posted @ 2023-09-11 13:38 VipSoft 阅读(821) 评论(0) 推荐(1)
摘要:没成功,只是做个记录,后面再研究 希望将第三方的 HandyControl.dll 嵌入到 exe 中,这样不用发多个文件给别人 ![image](https://img2023.cnblogs.com/blog/80824/202308/80824-20230804153348542-538869 阅读全文
posted @ 2023-08-10 08:58 VipSoft 阅读(577) 评论(0) 推荐(0)
摘要:目录说明设置提醒时间,及休息时间久坐提醒倒计时休息提醒倒计时休息到计时代码说明主窗体设置工作到计时休息倒计时安装包&源码高清图 久坐提醒桌面小程序: 干这行职业病比较多,之前用爱丽(即:玻璃酸钠滴眼液),用的时候挺舒服,缓解吧,不过治标不治本。 注意休息,加强锻炼非常有必要,每工作1小时,休息10分 阅读全文
posted @ 2023-08-08 09:01 VipSoft 阅读(5690) 评论(35) 推荐(41)
摘要:[TOC] ![image](https://img2023.cnblogs.com/blog/80824/202302/80824-20230201133344225-1260068838.png) ## 类的表示(Class) 第一层:显示类的名称,如果是抽象类,则就用斜体显示。 第二层:是类的 阅读全文
posted @ 2023-07-27 19:44 VipSoft 阅读(2425) 评论(0) 推荐(3)
摘要:Visual Studio 为多环境配置 Web.config 不同的环境,存在不同的配置,如:数据库连接字符串,通过多配置,方便做环境切换,配置的修改 阅读全文
posted @ 2023-07-11 10:05 VipSoft 阅读(2117) 评论(7) 推荐(19)
摘要:说明: 在处理向该请求提供服务所需的配置文件时出错。请检查下面的特定错误详细信息并适当地修改配置文件。 分析器错误消息: 未能找到 CodeDom 提供程序类型“Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider 阅读全文
posted @ 2023-04-10 14:19 VipSoft 阅读(1973) 评论(0) 推荐(0)
摘要:静态资源( StaticResource )指的是在程序载入内存时对资源的一次性使用,之后就不再访问这个资源了;动态资源(DynamicResource)使用指的是在程序运行过程中然会去访问资源。 简单的可以理解为,如果换皮肤而不重启程序,就需要用 DynamicResource <Window x 阅读全文
posted @ 2022-09-29 14:43 VipSoft 阅读(474) 评论(0) 推荐(0)
摘要:画一个 Border 对边框进行投影 <Window x:Class="WpfApp1.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.micr 阅读全文
posted @ 2022-09-28 12:32 VipSoft 阅读(202) 评论(0) 推荐(0)
摘要:要注意,拖拽的地方,需要加背景色,否则 DrageMove 将无效 MainWindows.xaml <Window x:Class="Report.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentatio 阅读全文
posted @ 2022-09-28 09:46 VipSoft 阅读(753) 评论(0) 推荐(1)
摘要:C# //创建一个长度为10的byte数组,并且其中每个byte的值为0x08. byte[] myByteArray = Enumerable.Repeat((byte)0x08, 10).ToArray(); byte[] res= Enumerable.Range(1, 1000).Selec 阅读全文
posted @ 2022-08-10 11:51 VipSoft 阅读(383) 评论(0) 推荐(0)
摘要:常用方法: public class FileHelper { /// <summary> /// 用得比较多 /// </summary> /// <param name="msg"></param> public static void WriteAppend(string msg) { Sys 阅读全文
posted @ 2022-07-13 14:26 VipSoft 阅读(289) 评论(0) 推荐(0)
摘要:C# 和 java 基本数据类型 C#类型 java类型 描述 默认值 bool boolean 布尔值 False byte byte 8 位无符号整数 0 char char 16 位 Unicode 字符 '\0' decimal BigDecimal(非基本) 128 位精确的十进制值,28 阅读全文
posted @ 2022-07-01 08:58 VipSoft 阅读(350) 评论(0) 推荐(0)
摘要:在DataGrid中实现Button Command绑定 Command="{Binding editCommand}" 会默认查找UserList中对象的属性,而你的UserList中对象应该不包括editCommand属性;可以尝试:Command="{Binding DataContext.e 阅读全文
posted @ 2022-06-01 14:15 VipSoft 阅读(255) 评论(0) 推荐(0)