摘要:
///<summary>///根据DataTable生成Json树结构調用GetTreeJsonByTable(datatable,"MENUID","MENUNAME","PARENTID","0");///</summary>///<paramname="tabel">数据源</param>///<paramname="idCol">ID列</param>///<paramname=" 阅读全文
摘要:
publicstaticstringDataTable2Json(System.Data.DataTabledt){System.Text.StringBuilderjsonBuilder=newSystem.Text.StringBuilder();jsonBuilder.Append("{");jsonBuilder.AppendFormat("\"total\":{0},",dt.Rows.Count);jsonBuilder.Append("\"rows\":[");for(inti=0 阅读全文
摘要:
protectedvoidExportExcel(DataTabledt){if(dt==null||dt.Rows.Count==0){return;}Microsoft.Office.Interop.Excel.ApplicationxlApp=newMicrosoft.Office.Interop.Excel.Application(); if(xlApp==null){return;}System.Globalization.CultureInfoCurrentCI=System.Threading.Thread.CurrentThread.CurrentCulture;System. 阅读全文