随笔分类 -  知识共享

摘要:/******************************************** Description:* 自定义jqGrid编辑列中的控件** 可格式化的类型:* 1)PopupDialog 弹出框.可选择数据并返回值到编辑列* 2)DateTime 日历控件** DateTime调用方法:* 在编辑列中加属性 formatter: JqGridFormatCell.ToDateTime* PopupDialog调用方法:* 1.给编辑列加属性* formatter: JqGridFormatCell.ToPopupDialog ,* ... 阅读全文
posted @ 2013-09-27 14:42 刀叨 阅读(3343) 评论(0) 推荐(0)
摘要:/******************************************** Description:* 自定义jqGrid编辑功能,当行获取焦点时编辑,失去焦点时保存** 调用方法:* 在jGrid的(opts参数中)"editurl"属性的上面或下面添加属性 customEdit: true** Author:*******************************************/var JqGridCustomEdit = { _cacheName: "editGrid_PrevRowKey", _saveBtnNam 阅读全文
posted @ 2013-09-27 14:41 刀叨 阅读(9062) 评论(0) 推荐(0)
摘要:关键代码:(如插入按钮插入行以前判断gird是否为编辑状态)$('#btnIns').click(function (event) { if ($("#tbPaymentTerm_iledit").hasClass("ui-state-disabled")) { //tbPaymentTerm为Grid绑定ID;tbPaymentTerm_iledit为Grid编辑行编辑按钮的ID;ui-state-disabled为编辑行编辑按钮样式 $.jAlert("please save the record."); ... 阅读全文
posted @ 2013-09-26 11:52 刀叨 阅读(1035) 评论(0) 推荐(0)
摘要:基础类:public delegate string strSQL();public static DataSet ExcelImport(string xlsPath, strSQL sql){ try { // 连接字符串 string connStr = "Provider=Microsoft.Jet.OLEDB.4.0;Extended Properties='Excel 8.0;HDR=Yes;IMEX =1';" + "data source=" + xlsPath; DataSet ds = new DataSet();.. 阅读全文
posted @ 2013-09-11 16:45 刀叨 阅读(210) 评论(0) 推荐(0)
摘要:当通过一下方式打开pdf页面时,由于各浏览器的兼容性问题,关闭窗口时无法同时关闭pdf文件:window.top.$.fn.popupDialogSecondary("Preview", url, height, width)因此可以通过此方法的回调函数,通过关闭此iframe来达到关闭的目的,参考如下:window.top.$.fn.popupDialogSecondary("Preview", url, height, width, function () { window.top.$("#iframeDialogSecondary&quo 阅读全文
posted @ 2013-09-06 16:13 刀叨 阅读(780) 评论(0) 推荐(0)
摘要:IE浏览器:对于“‘”单引号的处理直接是“’”单引号出现在url中;Firefox浏览器:对于“‘”单引号的处理是转换成“%27”出现在url中;因此为了达到url一致可以将url做如下处理:var url = location.search.replace(/'/g, "%27"); //把单引号统一转换成“%27” 阅读全文
posted @ 2013-09-06 16:01 刀叨 阅读(252) 评论(0) 推荐(0)
摘要:这几天遇到一个简单又纠结的异常:通过循环报表生成pdf文件的时候,循环时出现了一个错误:“An unexpected error occurred in Report Processing”发生在行:“byte[] bytes = reportViewMain.LocalReport.Render(fileFormat, null, out strMimeType, out strEncoding, out strFileNameExtension, out strStreamIds, out warnings);”这个问题主要是循环同一个rdlc模板的时候出现的,第一个报表生成pdf文件成功 阅读全文
posted @ 2013-09-05 10:15 刀叨 阅读(1984) 评论(0) 推荐(0)
摘要:页面布局参考关键代码参考关键代码: English Conditions Chinese Conditions General Fare Refund / Fare Lists Remark ... 阅读全文
posted @ 2013-08-08 10:18 刀叨 阅读(2124) 评论(0) 推荐(0)
摘要:/// <summary> /// 取得HTML中所有图片的 URL。 /// </summary> /// <param name="sHtmlText">HTML代码</param> /// <returns>图片的URL列表</returns> public static string[] GetHtmlImageUrlList(string sHtmlText) { // 定义正则表达式用来匹配 img 标签 Regex regIm... 阅读全文
posted @ 2012-12-06 15:53 刀叨 阅读(430) 评论(0) 推荐(0)
摘要:// 得到RadioButtonList控件选择的值// radioListObj是RadioButtonList控件对象哦function GetRadioButtonListSelectValue(radioListObj){ for(var i=0;i<radioListObj.cells.length;i++) { var objRadioId = radioListObj.id + '_' + i; var objRadio = document.getElementById(objRadioId); if(objRadio.ch... 阅读全文
posted @ 2012-09-26 09:34 刀叨 阅读(415) 评论(0) 推荐(0)
摘要: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... 阅读全文
posted @ 2012-08-17 16:21 刀叨 阅读(665) 评论(0) 推荐(0)
摘要:USE [Princess]GO/****** Object: StoredProcedure [dbo].[p_PaymentTransactions_Insert] Script Date: 08/10/2012 10:33:12 ******/SET ANSI_NULLS ONGOSET QUOTED_IDENTIFIER ONGOALTER PROCEDURE [dbo].[p_PaymentTransactions_Insert] @PaymentID integer, @InvoiceNo varchar(10), @BalanceAmount decimal(14,... 阅读全文
posted @ 2012-08-10 13:06 刀叨 阅读(286) 评论(0) 推荐(0)
摘要:ExportData类:View Code /// <summary> /// xxx /// 导出报表数据存入word或excel文件 /// 2012-03-21 /// </summary> public class ExportData { #region 构造函数 public ExportData() { // // TODO: 在此处添加构造函数逻辑 // } #endregion ... 阅读全文
posted @ 2012-07-26 15:43 刀叨 阅读(259) 评论(0) 推荐(0)
摘要:View Code using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Web.UI.WebControls;using System.Web.UI.HtmlControls;namespace xxxx{ public class RepeaterSetting { /// <summary> /// 合并Repeater中某行相同信息的行(单元格) /// </summary> /// ... 阅读全文
posted @ 2012-07-05 16:38 刀叨 阅读(450) 评论(0) 推荐(0)
摘要:首先,首先将AjaxPro.2.dll引用到项目中并在webconfig里面添加配置:<httpHandlers> <add verb="POST,GET" path="ajaxpro/*.ashx" type="AjaxPro.AjaxHandlerFactory, AjaxPro.2"/></httpHandlers>其次,编写前台页面代码:<tr> <td width="15%" height="28" class="cont 阅读全文
posted @ 2012-06-07 15:28 刀叨 阅读(233) 评论(0) 推荐(0)
摘要:本文列出将文字和图片上传到数据库的方法。包括Access数据库和SQL Server数据库。Access数据库代码ASPX 代码<%@ Page Language="C#" EnableViewState="true" %> <%@ Import Namespace="System.Data.OleDb" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/T 阅读全文
posted @ 2012-01-10 12:16 刀叨 阅读(167) 评论(0) 推荐(0)