摘要: 线程一 class LoginThread extends Thread{ public void StartThread() { Thread a = new Thread(this); a.start(); } @Override public void run() { tr... 阅读全文
posted @ 2014-04-21 15:52 文艺流浪汉 阅读(166) 评论(0) 推荐(0) 编辑
摘要: /**//获取当天日期 返回yyyy-mth-day 的格式* 对日期格式的转换* @param 无--返回当天* '+num' 返回当天的后几天* '-num' 返回当天的前num天* @returns yyyy-mth-day 的格式**/function getDate(){var param = arguments,date = new Date();if(param.length==0){return changeDateType(date);}else if(param.length==1){if(param[0].toString().indexO 阅读全文
posted @ 2014-03-11 15:16 文艺流浪汉 阅读(260) 评论(0) 推荐(0) 编辑
摘要: 多线程简单使用ThreadStart threadStart1 = new ThreadStart(MethodName);方法的名称或者是delegate Thread thread1 = new Thread(threadStart1); thread1.Start(); 阅读全文
posted @ 2013-07-08 17:51 文艺流浪汉 阅读(122) 评论(0) 推荐(0) 编辑
摘要: 2.js获取html页面传参function GetQueryString(name) { var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)","i"); var r = window.location.search.substr(1).match(reg); if (r!=null) return (r[2]); return null;}alert(GetQueryString("参数名1"));alert(GetQueryStri 阅读全文
posted @ 2013-05-08 10:12 文艺流浪汉 阅读(270) 评论(0) 推荐(0) 编辑
摘要: /// <summary> /// 将金额转换为汉字 /// </summary> public class Converter { public static string Convert(double money) { string strMoney = money.ToString(); string[] arraryMoney = strMoney.Split('.'); //整数部分 StringBuilder builerInt = new ... 阅读全文
posted @ 2013-05-03 14:28 文艺流浪汉 阅读(462) 评论(0) 推荐(0) 编辑
摘要: 首先要把 EFCodeFirst类库工程里,添加EntityFramework的引用。/// <summary> /// FileInfo:实体类名要和数据表名的名称一样。 /// </summary> [Serializable] public partial class t_FileInfo { public t_FileInfo() {} #region Model private int _id; private string _fileulr; private DateTime _uploadtime; private int _infotype; priva 阅读全文
posted @ 2013-04-24 10:57 文艺流浪汉 阅读(512) 评论(0) 推荐(0) 编辑
摘要: /// <summary> /// 绑定实体,把控件装在Panel里 /// </summary> /// <param name="spanel"></param> /// <param name="entity"></param> public void BinToEntity(Panel spanel, object entity) { ArrayList al = new ArrayList(); List<PropertyInfo> PI2list = e... 阅读全文
posted @ 2013-04-22 11:38 文艺流浪汉 阅读(290) 评论(0) 推荐(0) 编辑
摘要: public delegate bool EqualsComparer<T>(T x, T y); /// <summary> /// 过滤重复数据 /// </summary> public class Comparint<T> : IEqualityComparer<T> { private EqualsComparer<T> ec; public Comparint() { } public Comparint(EqualsComparer<T> e)... 阅读全文
posted @ 2013-03-22 16:17 文艺流浪汉 阅读(232) 评论(0) 推荐(0) 编辑
摘要: string ReplaceChat(string EE) { string[] dd ={"◎", "■", "●", "№", "↑", "→", "↓" + "!", "@", "#", "$", "%", "^", "&", "*", "(", ")&q 阅读全文
posted @ 2013-03-13 11:02 文艺流浪汉 阅读(3165) 评论(0) 推荐(0) 编辑
摘要: /// 上传文件 /// </summary> /// <param name="path">文件保存位置</param> /// <param name="oFile">文件</param> /// <returns></returns> public string UpLoadFile( System.Web.UI.WebControls.FileUpload fu) { bool Isftp = true; if (Isftp) { ... 阅读全文
posted @ 2013-03-13 10:11 文艺流浪汉 阅读(342) 评论(0) 推荐(0) 编辑