摘要: 在处理流水号时,一般需要把对应的整数转换为相应位数的字符串。 /// <summary> /// 把整数转换为指定位数的字符串 /// </summary> /// <param name="slen">位数(这里允许最大32位)</param> /// <param name="maxSN">整数 阅读全文
posted @ 2021-10-10 10:55 tiger_yj 阅读(53) 评论(0) 推荐(0) 编辑
摘要: 根据传入的日期,年份(整数),循环数(整数),及字符串数组等参数,返回三位数的“年月日"字符串; 比如,定义字符串数组string[] a=new string[31] { "1","2","3","4","5","6","7","8","9", "A","B","C","D","E","F&quo 阅读全文
posted @ 2021-10-10 10:51 tiger_yj 阅读(34) 评论(0) 推荐(0) 编辑
摘要: public Form1() { InitializeComponent(); InitPrinter(comboBox1); Init(); textBox1.Focus(); } Connection SATOPrinter = new Connection(); PrinterDriver S 阅读全文
posted @ 2021-10-09 21:05 tiger_yj 阅读(244) 评论(0) 推荐(0) 编辑
摘要: 恢复内容开始 1. 表值函数:f_SplitStr CREATE FUNCTION [dbo].[f_SplitStr] ( @str NVARCHAR(MAX), @split NVARCHAR(50)='/' ) RETURNS @table table(COL NVARCHAR(50)) AS 阅读全文
posted @ 2021-04-05 17:03 tiger_yj 阅读(40) 评论(0) 推荐(0) 编辑
摘要: 当在应用程序中对某个表添加记录时,为验证某些列录入的合法性,可利用触发器在当前操作的表加以触发器控制。比如某一界面有三个录入文本控件,且这三个录入信息必须都符合,否则直接抛出高级别的报警信息并终止用户继续作业。实例如下: 1 CREATE TRIGGER [dbo].[tri_tblA] 2 ON 阅读全文
posted @ 2020-11-14 15:48 tiger_yj 阅读(95) 评论(0) 推荐(0) 编辑
摘要: --自动分组方案--1. 原始表,需处理的数据 1 CREATE TABLE tbl_Z_Original 2 ( 3 nID bigint identity(1,1) primary key, 4 sPro nvarchar(20), 5 sProBarcode nvarchar(20), 6 d 阅读全文
posted @ 2020-11-14 15:26 tiger_yj 阅读(167) 评论(0) 推荐(0) 编辑
摘要: 1、背景,测试Demo如下图所示 1.1、单击网格,文本框获取选中的二维码; 1.2、点击【OK】按钮根据条件解析字符串,呈现于列表框中; 2、测试数据类 using System; using System.Collections.Generic; using System.Linq; using 阅读全文
posted @ 2020-09-26 10:38 tiger_yj 阅读(1575) 评论(0) 推荐(0) 编辑
摘要: 背景: 有表[tblA]记录产品条码信息如: tid sno 1 00011P2112 2 00021P2112 3 00031P2112 4 00041P2112 5 00081P2112 6 00101P2112 7 00111P2112 8 00151P2112 ... ... 有表[tblB 阅读全文
posted @ 2020-09-19 20:43 tiger_yj 阅读(204) 评论(0) 推荐(0) 编辑
摘要: -- *********************************************** -- Author : -- Create Date : -- Description : 由秒返回时间格式字符串 -- ************************************** 阅读全文
posted @ 2020-09-12 19:32 tiger_yj 阅读(210) 评论(0) 推荐(0) 编辑
摘要: /// <summary> /// 正则表达式验证 /// </summary> public class ValidateHelper { /// <summary> /// 检查是否是数字 /// </summary> /// <param name="str">检查的字符串</param> / 阅读全文
posted @ 2020-09-07 23:02 tiger_yj 阅读(124) 评论(0) 推荐(0) 编辑