随笔分类 - 开发技术
摘要:public Booking_ProductCount GetProductCountByBookingNo(string BookingNo, string CompanyNo, string BookingID) { Booking_ProductCount bookCountInfo = new Booking_ProductCount(); try { using (T2BookingEntities context = new T2BookingEntities()) ...
阅读全文
摘要:Jquery如期控件功能:1.选择日期不能超过当天:From//datetime定义当前日期后的日期不能选择To//required定义必填项2.选择时间的相互约束(To时间不能早于From时间,From时间不能大于To时间):From//datepicker定义了样式以及输入文本框默认格式To//此方式与样式datepicker会产生冲突$(function () { $("#txtDateFrom").datepicker({ dateFormat: DATE_FORMAT, numberOfMonths: ...
阅读全文
摘要:首先,参考博客:http://jamcode.iteye.com/blog/1397824http://orzfly.com/html/regex-match-url.html其次,总结出适合多样化的Url正则表达式:e.g var re=/^((http|https|ftp):\/\/)?(\w(\:\w)?@)?([0-9a-z_-]+\.)*?([a-z]{2,6}(\.[a-z]{2})?(\:[0-9]{2,6})?)((\/[^?#\/\\*":]*)+(\?[^#]*)?(#.*)?)?$/i; assert(re.test("index.im"))
阅读全文
摘要:1、添加处理方法:/******************************************** Description:* 禁止输入危险字符,如"'"、"/"、"\"和"&"。** Author:* Creator Liu*******************************************/$.fn.replaceOther = function () { this.bind("keypress", function (e) { var keyCo
阅读全文
摘要:/// <summary> /// 通过正则表达式获取字符串中html<input>标签指定value值 /// </summary> /// <param name="FileString">包含html的字符串</param> /// <param name="inputName">指定<input>控件的名称</param> /// <returns></returns> public string GetInput(string
阅读全文
摘要:DataSet ds = dbSys.ExecuteDataSet(QueryString()); DataTable dt = ds.Tables[0]; //添加统计行 DataRow newRow = dt.NewRow(); newRow[dt.Columns[1].ColumnName] = "Grand Total"; double total = 0; string totalName = strin...
阅读全文
摘要:1.页面插入:<script language="javascript" type="text/javascript"> function preview() { bdhtml = window.document.body.innerHTML; sprnstr = "<!--startprint-->"; eprnstr = "<!--endprint-->"; prnhtml = bdhtml.substr(bdhtml.ind...
阅读全文
摘要:目录:1.javascript弹出提示窗口(不改变原页面样式);2..net之EMail正则表达式验证;3.Gridview中绑定数据常用的有两种方式;4.获取Gridview控件中添加的Label控件或者Button控件实例有以下几种方法(不同情况时用);5.返回"按钮"事件(返回到原页面);6.GridView的DataBound事件中判断行的类型;7.OnClientClick带参数事件;8.GridView中添加统计列;9.GridView中添加统计行;10.FileUpload控件上传图片;11.ImageButton控件显示图片;12.SQL添加序号;13.SQ
阅读全文
摘要:做了一个简单的VB6.0的小工具,其中用到UTF-8格式转换,总结如下:View Code '所用到的API引入Private Declare Function WideCharToMultiByte Lib "kernel32" ( _ ByVal CodePage As Long, _ ByVal dwFlags As Long, _ ByVal lpWideCharStr As Long, _ ByVal cchWideChar As Long, _ ByRef lpMultiByteStr As Any, _ ...
阅读全文
摘要:关于C# Timer类 在C#里关于定时器类就有3个C# Timer使用的方法1.定义在System.Windows.Forms里C# Timer使用的方法2.定义在System.Threading.Timer类里 "C# Timer使用的方法3.定义在System.Timers.Timer类里下面我们来具体看看这3种C# Timer用法的解释:◆System.Windows.Forms.Timer应用于WinForm中的,它是通过Windows消息机制实现的,类似于VB或Delphi中的Timer控件,内部使用API SetTimer实现的。它的主要缺点是计时不精确,而且必须有消息
阅读全文
摘要:一个简单的Timer计时器,设置到达时间隔时启动一次Timer(每次只执行一次),更加节省资源...1.首先新建一个控制台应用程序;2.在Program.cs里面添加如下代码:Program Code using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading;namespace Timer_TEST{ class Program { private System.Timers.Timer _timer; ...
阅读全文
摘要:适合初学者的操作数据库类:SqlDbHelper Code using System;using System.Collections.Generic;using System.Text;using System.Data;using System.Linq;using System.Web;using System.Data.SqlClient;using System.Configuration;namespace Web_TEST.Common{ public class SqlDbHelper { private string connectionString...
阅读全文

浙公网安备 33010602011771号