- 博客(32)
- 收藏
- 关注
原创 c# SMTP发送邮件
/ SMTP服务器地址和端口。// 如果服务器支持SSL。Serilog.Log.Warning("邮件发送成功!//// 如果SMTP服务器需要身份验证。string subject = "问题提交";// 创建电子邮件消息对象。// 设置邮件主题和正文。// 创建SMTP客户端。
2024-09-11 10:04:49
584
原创 c#中使用sql防注入方式写入数据
try{ if (this.textBoxTransparent2_3.Text == null || this.textBoxTransparent2_3.Text == "") { MessageBox.Show("MIS项目编号是必填项!"); this.textBoxTransparent2_3.Focus(); return; } else if (textBoxTransparent_path.Text == "" || textBoxTrans
2024-09-11 09:56:08
1031
原创 c#中的版本管理和描述
sb.Append("1、开发框架选型,编程语言选型和开发控件选型,基础框架搭建");sb.Append("2、测试环境数据库中版本表结构和账号表结构设计;
2024-09-11 09:54:17
374
原创 c# class中接口访问的类,使用http方式
MessageBox.Show("这个项目号在金蝶中没有找到对应的规格型号信息,请到ERP中确认,以防ERP/PDM系统中信息不同步");MessageBox.Show("访问ERP受阻,请联系技术中心 Frank Li 确认此问题");/// Cookie,保证登录后,所有访问持有一个Cookie;Parameters.Add("李");/// HTTP访问。
2024-09-11 09:52:49
1035
原创 c# sqlhelper类
/ 可以是CommandType.Text或CommandType.StoredProcedure。// 为每个查询创建SqlCommand对象,并添加参数。// 如果有参数,添加到SqlCommand对象。//// 如果SMTP服务器需要身份验证。// 执行事务性操作的方法,支持参数化查询。// 执行查询并返回DataTable。
2024-09-11 09:43:45
844
原创 c# mainwindows
private void zWCAD二开ToolStripMenuItem_Click(object sender, EventArgs e)////// 指定背景色,这里使用透明色作为示例。// 主窗体大小改变时,子窗体会自动调整大小。//// 指定前景色,这里使用蓝色作为示例。// // 主窗体大小改变时的逻辑。//// 等待一段时间,以便按键被处理。
2024-09-11 09:31:03
1296
原创 sqlserver中二者相除解决方法
round(cast(dbo.PMTC_MII_Scrap.ScrapQty as float)/dbo.PMTC_MII_Scrap.ProducedQty*100,2) as scrapRate
2023-03-09 09:49:00
377
原创 sqlserver 2张表结合
SELECT a.DateTime_1, b.Machines, a.Persons, ROUND(CAST(a.Persons AS float) / b.Machines, 2) AS RateFROM (SELECT COUNT(DISTINCT UserName) AS Persons, CONVERT(varchar(100), UPDATED, 23) AS DateTime_1 FROM dbo.PMTC_IM_MII_Scrap ...
2022-03-21 14:27:52
1178
原创 RPA自主写程序开发
using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Diagnostics;using System.Drawing;using System.Linq;using System.Text;using System.Threading.Tasks;using System.Windows.Forms;using Microsof..
2022-03-09 14:27:56
589
原创 RPA自主开发
using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Runtime.InteropServices;using System.Text;using System.Threading.Tasks;using System.Windows.Forms;n..
2022-03-09 14:23:02
1026
原创 SQL server查询最新的不重复项和c#查询结果批量导入
select distinct top 10 t.Phone,w.Phone,w.CreateTimefrom ( select Phone from test) tOuter Apply ( select top 1 Phone,CreateTime from test w where t.Phone=w.Phone ORDER BY CreateTime DESC ) wORDER BY CreateTime DESCpublic static void DataTableToSQLSer
2022-03-08 13:33:34
211
原创 前端使用for循环展示所有后端数据
@{ this.Layout = null;}<title>IAS - PMTC - Molding</title><script src="~/Scripts/vue.min.js"></script><script src="~/Scripts/ElementUI/element-ui.js"></script><link rel="stylesheet" href="~/Content/ElementUI...
2022-03-03 14:41:53
1213
原创 c# excel
private void button1_Click(object sender, EventArgs e) { string connString = setting; System.Windows.Forms.OpenFileDialog fd = new OpenFileDialog(); if (fd.ShowDialog() == DialogResult.OK) { ...
2022-02-07 09:47:06
176
原创 webservice SMTP
using System;using System.Collections.Generic;using System.IO;using System.Linq;using System.Net;using System.Net.Mail;using System.Text;using System.Web;using System.Web.Services;namespace webserviceTest1{ /// <summary> /// WebSer...
2021-12-31 08:43:49
497
原创 c#使用zxing打印标签
BarCodeClass.csusing System;using System.Collections.Generic;using System.Linq;using System.Text;using ZXing.Common;using ZXing;using System.Windows.Forms;using System.Drawing;using System.Text.RegularExpressions;using ZXing.QrCode;namespa...
2021-12-15 08:57:21
1136
原创 apk存放服务器中供人下载
扩展名中填写“.apk”,MIME类型中填写apk的MIME类型“ application/vnd.android.package-archive ”然后可以让用户直接打开网址:http://xxxxx.com/apk/xxx.apk就可以下载下来了,这时浏览器可以自动识别apk是可以下载的文件的...
2021-09-18 15:46:17
526
原创 2021-05-31
在Windows 2016 server上发布iis应用程序的时候,有的时候会由于用户权限问题报错,解决这个错误的比较官方的方法是,将应用程序对应的根目录文件夹权限设置位iisuser
2021-05-31 08:40:25
87
原创 IIS配置免费的SSL证书,cookie session用法,网站下面挂载其他网站
最近做项目比较开心,几个难题都搞定了:https配置SSL证书,cookie session用法,网站下面挂载其他网站有事请微信:13451765025
2021-04-27 16:13:40
235
原创 VS 2019中引用添加自定义DLL时候重新生成不了的原因
自定义了一个类库,编译成DLL文件后,在项目中引用调用这个DLL文件后,重新生成报错,调试程序报错,搞了半天,终于找到了根本原因,原来是类库的framework版本偏高,项目的framework版本偏低,导致二者不兼容,只要将二者framework版本调整位一样即可。...
2020-07-14 10:31:22
1933
原创 VB.NET 2015 抓取显示屏幕尺寸
Public screenWidth = System.Windows.Forms.Screen.PrimaryScreen.Bounds.WidthPublic screenHeight = System.Windows.Forms.Screen.PrimaryScreen.Bounds.Height以此作为记录!
2018-01-11 14:31:02
1320
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人