随笔分类 -  代码收藏

平时工作中或业余时编写的一些代码
摘要:HTML的select控件美化CSS:.div-select{ border: solid 1px #999; height: 40px; line-height: 40px; cursor: default;}.div-select-text{ float: left... 阅读全文
posted @ 2015-02-08 22:28 0611163 阅读(3243) 评论(2) 推荐(1) 编辑
摘要:checkbox和radio的美化checkbox: 测试101 ... 阅读全文
posted @ 2015-02-08 14:27 0611163 阅读(501) 评论(3) 推荐(0) 编辑
摘要:最近写C#串口通信程序,系统是B/S架构。SerialPort类有一个DataReceived事件,用来接收串口返回的数据,但这种方式在C/S架构下很好用,但B/S就不好处理了。所以写了一个同步模式接收返回数据的方法,不使用DataReceived事件。经过测试,可以正常使用。 一、Machi... 阅读全文
posted @ 2015-01-16 21:59 0611163 阅读(11178) 评论(0) 推荐(1) 编辑
摘要:生成验证码的类:using System;using System.Collections.Generic;using System.Drawing;using System.Text;namespace Controllers.Core.Util{ /// /// 验证码 //... 阅读全文
posted @ 2014-12-29 21:05 0611163 阅读(1130) 评论(0) 推荐(0) 编辑
摘要:HTML代码:@{ Layout = null;}@using DAL;@using System.Data;@{ AreaDal areaDal = new AreaDal(); string areaId = ViewBag.areaId; DataRow drArea ... 阅读全文
posted @ 2014-12-27 15:19 0611163 阅读(562) 评论(0) 推荐(0) 编辑
摘要:1、引用JS: <script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=87be68605271c5e4cfe712787041be0a"></script> 2、HTML: 东经: <input name= 阅读全文
posted @ 2014-12-25 11:35 0611163 阅读(834) 评论(0) 推荐(0) 编辑
摘要:代码:/// /// Http上传文件/// public static string HttpUploadFile(string url, string path){ // 设置参数 HttpWebRequest request = WebRequest.Create(url) as ... 阅读全文
posted @ 2014-11-03 14:47 0611163 阅读(1779) 评论(1) 推荐(1) 编辑
摘要:代码:/// /// Http下载文件/// public static string HttpDownloadFile(string url, string path){ // 设置参数 HttpWebRequest request = WebRequest.Create(url) a... 阅读全文
posted @ 2014-11-03 14:43 0611163 阅读(735) 评论(1) 推荐(2) 编辑
摘要:首先引用ThoughtWorks.QRCode.dll代码:using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Drawing;using ThoughtWork... 阅读全文
posted @ 2014-10-28 11:37 0611163 阅读(664) 评论(0) 推荐(0) 编辑
摘要:代码:1、AES加密类using System;using System.IO;using System.Security.Cryptography;using System.Text;namespace Utils{ /// /// AES加密解密 /// public... 阅读全文
posted @ 2014-10-17 08:53 0611163 阅读(564) 评论(0) 推荐(2) 编辑
摘要:代码(该AES加密解密代码可以和Java互通): using System; using System.IO; using System.Security.Cryptography; using System.Text; namespace Utils { /// <summary> /// AES 阅读全文
posted @ 2014-10-16 14:36 0611163 阅读(500) 评论(0) 推荐(0) 编辑
摘要:代码:/// /// 分类检索 查询selectname/// public static DataTable GetSelectName_FLJS(string thing_type_id, string men_id, string gang_id, string mu_id, string k... 阅读全文
posted @ 2014-10-13 14:53 0611163 阅读(1820) 评论(0) 推荐(0) 编辑
摘要:代码:using System.Data;using System.IO;using NPOI.HSSF.UserModel;using NPOI.SS.UserModel;namespace ahwildlife.Utils{ /// /// Excel工具类 /// 利用NP... 阅读全文
posted @ 2014-10-13 14:28 0611163 阅读(874) 评论(3) 推荐(0) 编辑
摘要:1、跨线程访问控件委托和类的定义using System;using System.Windows.Forms;namespace ahwildlife.Utils{ /// /// 跨线程访问控件的委托 /// public delegate void InvokeDe... 阅读全文
posted @ 2014-10-13 14:04 0611163 阅读(612) 评论(0) 推荐(0) 编辑
摘要:工具类定义: /** * 日期范围工具类 */ var dateRangeUtil = (function () { /*** * 获得当前时间 */ this.getCurrentDate = function () { return new Date(); }; /*** * 获得本周起止时间 阅读全文
posted @ 2014-06-06 09:19 0611163 阅读(1501) 评论(0) 推荐(1) 编辑
摘要:日期时间对象转字符串 // 对Date的扩展,将 Date 转化为指定格式的String // 月(M)、日(d)、小时(h)、分(m)、秒(s)、季度(q) 可以用 1-2 个占位符, // 年(y)可以用 1-4 个占位符,毫秒(S)只能用 1 个占位符(是 1-3 位的数字) // 例子: / 阅读全文
posted @ 2014-06-06 09:12 0611163 阅读(406) 评论(0) 推荐(0) 编辑
摘要:一、引用CSS和JS二、HTML代码三、JS代码$('#dept').combotree({ url: '#{GetDeptTree}', required: false, onSelect: function (node) { $.ajax({ ... 阅读全文
posted @ 2014-05-24 12:11 0611163 阅读(607) 评论(0) 推荐(0) 编辑
摘要:select distinct stu.*,dbo.GetClassNameByStudentCode(stu.Code) as ClassName,dbo.GetCourseNameByStudentCode(stu.Code) as CourseName,dbo.GetLinkmanByStud... 阅读全文
posted @ 2014-05-23 22:59 0611163 阅读(1685) 评论(0) 推荐(0) 编辑
摘要:USE [FM_Dev]GO/****** 对象: UserDefinedFunction [dbo].[GetClassNameByStudentCode] 脚本日期: 05/23/2014 17:20:43 ******/SET ANSI_NULLS ONGOSET QUOTED_IDE... 阅读全文
posted @ 2014-05-23 22:49 0611163 阅读(1245) 评论(0) 推荐(0) 编辑
摘要:步骤: 一、前台JS取HtmlTable数据,根据设定的分隔符把数据拼接起来 <!--导出Excel--> <script type="text/javascript"> //导出Excel function exportExcel() { var data = ""; $("#divRptTabl 阅读全文
posted @ 2014-04-02 22:06 0611163 阅读(1186) 评论(2) 推荐(1) 编辑