随笔分类 -  C#

C#相关文档
摘要:.NET使用quartz+topshelf实现定时执行任务调度服务 阅读全文
posted @ 2023-09-13 21:36 CelonY 阅读(10) 评论(0) 推荐(0) 编辑
摘要:#region 【将商品金额小写转换成大写】MoneySmallToBig /// <summary> /// 将商品金额小写转换成大写 /// </summary> /// <param name="par">小写金额</param> /// <returns>处理后的大写金额</returns> 阅读全文
posted @ 2022-10-03 17:34 CelonY 阅读(89) 评论(0) 推荐(0) 编辑
摘要:public static class RequestService { public static string jwttoken = "Api验证权限需要的秘钥"; /// <summary> /// GET请求 /// </summary> /// <param name="url">请求地址 阅读全文
posted @ 2022-05-08 16:07 CelonY 阅读(694) 评论(0) 推荐(1) 编辑
摘要:public static class ObjectToMapServie { #region 对象转成字典 /// <summary> /// 对象转换为字典 /// </summary> /// <param name="obj">待转化的对象</param> /// <returns></re 阅读全文
posted @ 2022-05-08 16:05 CelonY 阅读(116) 评论(0) 推荐(0) 编辑
摘要:来源:https://www.jb51.net/article/148907.htm public class DESEncrypt { private static string DESKey = "Key"; #region 加密 /// <summary> /// 加密 /// </summa 阅读全文
posted @ 2022-05-07 11:05 CelonY 阅读(398) 评论(0) 推荐(0) 编辑
摘要:OpenFileDialog dialog = new OpenFileDialog(); if (dialog.ShowDialog() == DialogResult.OK) { string filename = dialog.FileName; if (filename.Contains(" 阅读全文
posted @ 2021-12-19 17:43 CelonY 阅读(1103) 评论(0) 推荐(0) 编辑
摘要:在业务逻辑代码上,单击提交数据按钮向数据库写数据过程中,用户会不自觉的多次单击提交按钮,为了解决业务数据不重复提交数据库 最好在业务数据提交数据库过程中添加延时时间,这样再次从数据库判断数据是否存在 /// <summary> /// 用于存储上次扫描的组合码 /// </summary> priv 阅读全文
posted @ 2021-11-20 11:34 CelonY 阅读(145) 评论(0) 推荐(0) 编辑
摘要://接收数据 string str = ""; #region 数据接收事件实现 /// <summary> /// 数据接收事件实现 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> priv 阅读全文
posted @ 2021-11-12 14:44 CelonY 阅读(253) 评论(0) 推荐(0) 编辑
摘要:/// <summary> /// 提交Json接口的数据方法 /// </summary> /// <param name="Url"></param> /// <param name="jsonParas"></param> /// <returns></returns> public stri 阅读全文
posted @ 2021-11-11 10:22 CelonY 阅读(331) 评论(0) 推荐(0) 编辑
摘要:1,nuget引入程序集 log4Net 2,nuget引入程序集 Microsoft.Extensions.Logging.Log4Net.AspNetCore 3,配置文件 log4net.Config <?xml version="1.0" encoding="utf-8"?> <log4ne 阅读全文
posted @ 2021-10-19 09:33 CelonY 阅读(49) 评论(0) 推荐(0) 编辑
摘要:using System; using System.Net.Http; using System.Net.Http.Json; using System.Threading.Tasks; namespace ConsoleApp1 { class Program { static async Ta 阅读全文
posted @ 2021-06-17 20:45 CelonY 阅读(26) 评论(0) 推荐(0) 编辑
摘要:一 数据迁移命令 //迁移命令 参数名 参数值 参数名 参数值 Add-Migration -Context FirstDbContext -OutputDir Migrations\FirstDbContextMigrations //迁移命令 参数名 参数值 Update-Database -C 阅读全文
posted @ 2021-06-12 20:26 CelonY 阅读(115) 评论(0) 推荐(0) 编辑
摘要:using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Drawing; using ZXing.Common; using ZXing; using ZXi 阅读全文
posted @ 2021-04-30 11:20 CelonY 阅读(246) 评论(0) 推荐(0) 编辑
摘要:轻量级: 1、 Dapper https://github.com/StackExchange/Dapper 2、PetaPoco https://github.com/CollaboratingPlatypus/PetaPoco 3、Massive https://github.com/Frans 阅读全文
posted @ 2021-03-05 14:16 CelonY 阅读(219) 评论(0) 推荐(0) 编辑
摘要:sql server连接oracle并实现增删改查 需要一个软件ODAC112040Xcopy_64bit 我连接的oracle是11g r2 sqlserver 是 2016 软件下载 https://pan.baidu.com/s/1OpYmpReEJcPg4wNESWy61Q 服务器先安装.n 阅读全文
posted @ 2021-02-26 21:13 CelonY 阅读(272) 评论(0) 推荐(0) 编辑
摘要:1、引用AcReport.dll组件 2、注册组件 /// <summary> /// 注册组件 /// </summary> AcReport.AcRptEngine mac; private void SetAcRegisterInfo() { int ErrCode = 0; string E 阅读全文
posted @ 2021-02-03 21:14 CelonY 阅读(354) 评论(0) 推荐(0) 编辑
摘要:Dapper - .Net下的一个简单的ORM框架 特性 Dapper是一个NuGet库,你可以把它添加到你的项目中,扩展你的IDbConnection接口。 提供了3个方法 查询并映射一个实例集合 public static IEnumerable<T> Query<T>(this IDbConn 阅读全文
posted @ 2021-01-01 15:44 CelonY 阅读(188) 评论(0) 推荐(0) 编辑
摘要:https://www.cnblogs.com/zyx321/p/6491276.html System.Text.StringBuilder res = new System.Text.StringBuilder(); res.Append(" <?xml version='1.0' encodi 阅读全文
posted @ 2020-11-18 17:21 CelonY 阅读(1489) 评论(0) 推荐(0) 编辑
摘要:1、配置Setup public void ConfigureServices(IServiceCollection services) { services.Configure<JwtIssuerOptions>(options => { options.Issuer = "SimpleServe 阅读全文
posted @ 2020-09-23 11:41 CelonY 阅读(172) 评论(1) 推荐(0) 编辑
摘要:一、关键字(不能直接作为标识符使用) 类相关:class base new (其他修饰符) abstract virtual override delegate sealed extern void readonly(定义只读字段)static 在switch语句或泛型代码中使用:default 接 阅读全文
posted @ 2020-05-16 22:52 CelonY 阅读(512) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示