摘要: /// <summary> /// 导出excel文件 /// </summary> /// <param name="dt">Table表数据</param> /// <param name="path">存放路径 ( string path = System.Environment.Curren 阅读全文
posted @ 2021-11-18 14:12 fulllove 阅读(512) 评论(0) 推荐(0) 编辑
摘要: #region 监听url #region 监听url路径请求 static HttpListener httpobj; private void listeningUrl() { //提供一个简单的、可通过编程方式控制的 HTTP 协议侦听器。此类不能被继承。 httpobj = new Http 阅读全文
posted @ 2021-11-08 10:19 fulllove 阅读(559) 评论(0) 推荐(0) 编辑
摘要: #region Base64加密方法 /// <summary> /// Base64加密,采用utf8编码方式加密 /// </summary> /// <param name="source">待加密的明文</param> /// <returns>加密后的字符串</returns> publi 阅读全文
posted @ 2021-11-08 10:13 fulllove 阅读(929) 评论(0) 推荐(0) 编辑
摘要: 1、单个字符分隔用split截取 string str = "GT123_1"; string[] strArray = str.Split('_'); //输出:sArray[0]="GT123" // sArray[1]="1" 2、利用多个字符来分隔字符串 string str = "GTAZ 阅读全文
posted @ 2021-10-18 15:07 fulllove 阅读(657) 评论(0) 推荐(0) 编辑
摘要: 校验数字的表达式 //数字 Regex reg = new Regex(@"^[0-9]*$"); //n位的数字 Regex reg = new Regex(@"^\d{n}$"); //至少n位的数字 Regex reg = new Regex(@"^\d{n,}$"); //m-n位的数字 R 阅读全文
posted @ 2021-10-18 14:33 fulllove 阅读(52) 评论(0) 推荐(0) 编辑
摘要: public static string DataTable2Json(DataTable dt) { StringBuilder jsonBuilder = new StringBuilder(); jsonBuilder.Append("{\""); jsonBuilder.Append(dt. 阅读全文
posted @ 2021-10-15 14:53 fulllove 阅读(82) 评论(0) 推荐(0) 编辑
摘要: connection 连接对象 command 命令对象,指示要执行的命令和存储过程! datareader是一个向前的只读的数据流。 dataadapter是功能强大的适陪器,支持增删改查的功能 dataset是一个数据级对象,相当与内存中的一张表或多张表!(asp中是recordset) 阅读全文
posted @ 2020-06-23 10:59 fulllove 阅读(2) 评论(0) 推荐(0) 编辑
摘要: 1.表数据显示语法: //1 var ss = from r in db.Am_recProScheme select r; //2 var ss1 = db.Am_recProScheme; //3 string sssql = "select * from Am_recProScheme";2. 阅读全文
posted @ 2020-06-23 10:50 fulllove 阅读(2) 评论(0) 推荐(0) 编辑