摘要:
/*******清空缓存******************/ Response.Buffer = true; Response.ExpiresAbsolute = System.DateTime.Now.AddSeconds(-1); Response.Expires = 0; Response.CacheControl = "no-cache"; 阅读全文
posted @ 2013-05-20 23:46
Trilyn
阅读(101)
评论(0)
推荐(0)
摘要:
if (null != ds && ds.Tables.Count > 0) { sb.Append("<?xml version=\"1.0\" encoding=\"gb2312\" ?><ROOT>"); DataTable dt = ds.Tables[0]; if (null != dt && dt.Rows.Count > 0) { foreach (DataRow item in dt.Rows) { sb.Append("<NC> 阅读全文
posted @ 2013-05-20 23:45
Trilyn
阅读(294)
评论(0)
推荐(0)
摘要:
#region 通用查询:管理页面 public DataSet GetInfo(int pageno, int pagesize, string condition, string tablename, string fields,string showFields) { string strSQL = string.Format("select count(*) from {4} where 1=1 {0};select top {1} * from (select row_number() over(order by {3}) as rowNumber,{5} from {4} 阅读全文
posted @ 2013-05-20 23:44
Trilyn
阅读(197)
评论(0)
推荐(0)
摘要:
首先,添加两个DLL的引用,分别是:System.Runtime.Serialization.dll、System.ServiceModel.Web.dll。然后写ToJson方法:/// /// 格式化成Json字符串 /// /// 需要格式化的对象 /// Json字符串 public static string ToJson(object obj) { // 首先,当然是JSON序列化 DataContractJsonSerializer serializer = new DataContractJsonSerializer(obj.GetType()); // 定义一个strea.. 阅读全文
posted @ 2013-05-20 23:43
Trilyn
阅读(543)
评论(0)
推荐(1)
摘要:
var elems = $("input[title]"); var nochecknums = 0; for (var x = 0; x < elems.length; x++) { if (elems[x].type == "radio" && elems[x].checked == true && elems[x].title == nodeid) { if (elems[x].value == 1) { ++nochecknums; } } } if (nochecknums == 0) { $(" 阅读全文
posted @ 2013-05-20 23:42
Trilyn
阅读(418)
评论(0)
推荐(0)
摘要:
将b中的数据导入a中第一种情况:存在a b两表create table a(id int,times varchar(20))create table b(id int,times varchar(20))insert into a values(11,'12:20')insert into a values(11,'12:30')insert into a values(12,'12:20')insert into b values(11,'12:20')将b中的数据导入a中 insert into a select * fro 阅读全文
posted @ 2013-05-20 23:42
Trilyn
阅读(130)
评论(0)
推荐(0)
摘要:
#region 导出Excel private void ExportToXls(DataTable dt) { if (dt != null) { IReport p = new Report(); ExcelPage ep = new ExcelPage(); ep.name = "export.xls"; ExcelRow er = new ExcelRow(); foreach (DataColumn c in dt.Columns) { ExcelColumn ec = new ExcelColumn(); ec.value = c.ColumnName; er. 阅读全文
posted @ 2013-05-20 23:41
Trilyn
阅读(135)
评论(0)
推荐(0)
摘要:
protected void btnExport_ServerClick(object sender, EventArgs e) { string strFileName = Server.MapPath(@"SalaryModel.xlsx"); string strSaveFileName = DateTime.Now.ToString("yyyyMMddHHmmss") + @".xls"; Excel.Application ThisApplication = new Excel.Application(); Excel.Wo 阅读全文
posted @ 2013-05-20 23:41
Trilyn
阅读(512)
评论(0)
推荐(0)
摘要:
#region 导出表结构 private void Export(string TypeId) { string strXML = ""; strXML = CreateXML(TypeId); string path = this.txtPath.Value; string name = "表结构" + "_" + string.Format("{0}", Session["UserName"]) + "_" + DateTime.Now.ToString("y 阅读全文
posted @ 2013-05-20 23:40
Trilyn
阅读(142)
评论(0)
推荐(0)
摘要:
//设置网页打印的页眉页脚为空 function PageSetup_Null() { try { var Wsh = new ActiveXObject("WScript.Shell"); HKEY_Key = "header"; Wsh.RegWrite(HKEY_Root + HKEY_Path + HKEY_Key, ""); HKEY_Key = "footer"; Wsh.RegWrite(HKEY_Root + HKEY_Path + HKEY_Key, ""); } catch 阅读全文
posted @ 2013-05-20 23:39
Trilyn
阅读(171)
评论(0)
推荐(0)