随笔分类 - C#
摘要:使用 SAP .NET Connector SAP 提供了一个专门的 .NET Connector,可以直接用于连接 SAP HANA 数据库。 1、下载配置SAP HANA客户端驱动程序 下载地址:https://tools.eu1.hana.ondemand.com/#hanatools 安装
阅读全文
摘要:可以使用SapNwRfc封装包来调用SAP NetWeaver RFC函数 SapNwRfc封装包使用可以参考:https://github.com/huysentruitw/SapNwRfc 注意点:1、SapNwRfc运行有个先决条件 ,需要下载vcredist_x64.exe ,安装依赖的SD
阅读全文
摘要:/// <summary> /// 给单元格设置背景色 /// </summary> /// <returns></returns> public async Task<IActionResult> CollectExport() { #region 表头样式 IWorkbook book = ne
阅读全文
摘要:1、切换为sqlserve数据库:https://mp.weixin.qq.com/s/YSI-24mSGfeoFGvZ1t33cw 2、工作流注入关闭:D:\OA\Admin.NET-master-SqlServer\backend\Admin.NET.Web.Entry\Program.cs 3
阅读全文
摘要:string condition = @"MaterialNum='" + dataTable.Rows[i]["MaterialNum"].ToString() + "'" + @" and SupplierName='" + dataTable.Rows[i]["SupplierName"].T
阅读全文
摘要:1.在List中查询某元素,并返回另一个List List<string> listLoadMouldNo = listAllLoad.Select(m => m.MouldNo).ToList(); //查询出了listAllLoad中MouldNo元素,并放入另一个List. 2.筛选出List
阅读全文
摘要://时间差 TimeSpan span = model.EndtTime.Subtract(model.StartTime); if (Convert.ToInt32(span.TotalSeconds) > 7200) { msgResultModel.Msg = "查询时间跨度不能超过2小时";
阅读全文
摘要:下载地址: 链接:https://pan.baidu.com/s/1xbLyWmst29lIN9ss43PlpA 提取码:0dlf 使用方法:将要守护的.exe文件拖入即可 using FY; using System; using System.Collections.Generic; using
阅读全文
摘要:Task.Factory.StartNew( () => { RBILogs.WriteLog("系统日志", "视频:查询不到录像文件,程序2秒后重启"); Thread.Sleep(2000); Environment.Exit(0); });
阅读全文
摘要:using Newtonsoft.Json; using System; using System.Collections.Generic; using System.Configuration; using System.Threading; using System.Windows.Forms;
阅读全文
摘要:SoundPlayApi.GetInstance().Speak("未识别到体温,请退出重试"); SoundPlayApi.GetInstance().PlayVoice(@"voice\未测到体温.wav"); using System; using System.Media; using Sy
阅读全文
摘要:string path = AppDomain.CurrentDomain.BaseDirectory; List<VideoModel> list = new List<VideoModel>(); List<VideoResultModel> VideoResultList = new List
阅读全文
摘要:/// <summary> /// 根据路径下载图片 /// </summary> /// <param name="url">路径</param> public void ImgSave(string url) { try { int count = 10000; while (true) { /
阅读全文
摘要:string path = "D:\\img\\xiedl\\2020-11-20\\1 (" + (z - 43210) + ").png"; string base64Str = ReadFromFile(path); Bitmap bitmap = Base64StringToImage(ba
阅读全文
摘要:/// <summary> /// 删除文件夹及其子文件夹内过期文件 /// </summary> /// <param name="strFolderPath"></param> public void DelFile(string strFolderPath) { if (System.IO.D
阅读全文
摘要:正则:(13[0-9]|14[579]|15[0-3,5-9]|16[6]|17[0135678]|18[0-9]|19[89])\d{8}
阅读全文
摘要:bool state = false; private void button1_Click(object sender, EventArgs e) { if (state) { 执行事件一 } else { 执行事件二 } state = !state;//切换事件 }
阅读全文
摘要:using System.Management; //CPU ManagementClass mc = new ManagementClass("Win32_Processor"); ManagementObjectCollection moc = mc.GetInstances(); string strID = nu...
阅读全文
摘要:public static string ToCSV( DataTable table) { var result = new StringBuilder(); for (int i = 0; i < table.Columns.Count; i++) { if (table.Columns[i].
阅读全文
摘要:/// /// ffmpeg视频水印 /// /// /// /// public string WaterMark(string inputPath, string pathName) { Process p = new Process(); ...
阅读全文

浙公网安备 33010602011771号