摘要: int index = Grid.GetRow(label);//删除按钮所在的行号 List list = new List();//存取同一行中的控件 foreach (FrameworkElement item in grid... 阅读全文
posted @ 2014-04-17 16:55 wongley 阅读(636) 评论(1) 推荐(0) 编辑
摘要: NHHelper.Instance.Save( entity1 ); NHHelper.Instance.Get( entity.GetType(), id ); //获得一个对象实例 NHHelper.Instance.BeginTransaction(); //启动事务 NHHelper.Instance.Add( entity ); //增加一个对象 NHHelper.Instance.Update( entity, entity.ID ); //更新一个对... 阅读全文
posted @ 2014-01-03 10:30 wongley 阅读(258) 评论(0) 推荐(0) 编辑
摘要: public static void IsExcel(DataTable dsBZDM) { //读取临时文件 //GYYW.DA.Common.Base_SqlDataBase daBZDM = new GYYW.DA.Common.Bas... 阅读全文
posted @ 2013-03-07 09:34 wongley 阅读(161) 评论(0) 推荐(0) 编辑
摘要: PHP 符号大全注解符号: // 单行注解 /* */ 多行注解引号的使用 ’ ’ 单引号,没有任何意义,不经任何处理直接拿过来; " "双引号,php动态处理然后输出,一般用于变量.变量形态: 一种是True 即 真的; 另一种是False 即假的常见变量形态: string 字串(数字\汉字\等等) integer 整数(1、2、3、4、5、0、-1、-2、等等) dou... 阅读全文
posted @ 2012-07-30 10:34 wongley 阅读(169) 评论(0) 推荐(0) 编辑
摘要: SQL split 分割字符串ALTER FUNCTION [dbo].[fSplit](@strSplitString varchar(8000), --待分拆的字符串@strSplitUnit varchar(10) --数据分隔符)RETURNS @result TABLE(col varchar(8000))ASBEGIN DECLARE @splitlen int SET @splitlen=LEN(@strSplitUnit)-1 WHILE CHARINDEX(@strSplitUnit,@strSplitString)>0 BEGIN INSERT ... 阅读全文
posted @ 2012-07-06 11:01 wongley 阅读(511) 评论(0) 推荐(0) 编辑
摘要: js 弹出DIV层function Pop_Msg(id) { var msgw, msgh, bordercolor; var str = document.getElementById(id); str.style.display = "block"; var sWidth, sHeight; var w = str.offsetWidth; var h = str.offsetHeight; sWidth = document.body.offsetWidth; sHeight = document.body.offsetHeight + ... 阅读全文
posted @ 2012-07-06 10:55 wongley 阅读(770) 评论(0) 推荐(0) 编辑
摘要: JS 弹出页面//弹出页面function Pop_Layer(url, w, h) { var msgw, msgh, bordercolor; var str = '<iframe src=' + url + ' width=' + w + ' marginwidth=0 height=' + h + ' marginheight=0 scrolling=no frameborder=0 id=rightframe01 name=rightframe01 ></iframe>' var sWidth, 阅读全文
posted @ 2012-07-06 10:52 wongley 阅读(176) 评论(0) 推荐(0) 编辑
摘要: 读取xls\xlsx格式的Excel ///<summary> ///读取xls\xlsx格式的Excel文件的方法 ///</ummary> ///<param name="path">待读取Excel的全路径</param> ///<returns></returns> private DataTable ReadExcelToTable(string path) { //连接字符串 string connstring = "Provider=M... 阅读全文
posted @ 2012-07-06 10:38 wongley 阅读(714) 评论(0) 推荐(0) 编辑
摘要: asp.net 文件流 文件下载 #region 文件下载 public void downloadfile(int id) { try { chr_Action_Apply apply = db.chr_Action_Apply.Find(id); string s_fileName = Request["FileName"];//文件名 Response.ContentType = "application/ms-d... 阅读全文
posted @ 2012-02-09 11:25 wongley 阅读(235) 评论(0) 推荐(0) 编辑
摘要: 根据原图片生成等比缩略图#region 根据原图片生成等比缩略图 /// <summary> /// 根据源图片生成缩略图 /// </summary> /// <param name="imgPath_old">源图(大图)物理路径</param> /// <param name="imgPath_new">缩略图物理路径(生成的缩略图将保存到该物理位置)</param> /// <param name="width">缩略图宽度</param 阅读全文
posted @ 2012-02-09 10:40 wongley 阅读(778) 评论(0) 推荐(0) 编辑