移交管理
This commit is contained in:
@@ -11,6 +11,7 @@ using System.Reflection;
|
||||
using System.Text;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using static FineUIPro.Web.CQMS.Performance.Performance;
|
||||
using AspNet = System.Web.UI.WebControls;
|
||||
|
||||
namespace FineUIPro.Web
|
||||
@@ -1012,7 +1013,7 @@ namespace FineUIPro.Web
|
||||
{
|
||||
html = (row.FindControl("lbCheckManNames") as AspNet.Label).Text;
|
||||
}
|
||||
if (column.ColumnID== "tfCM")
|
||||
if (column.ColumnID == "tfCM")
|
||||
{
|
||||
html = (row.FindControl("lblCM") as AspNet.Label).Text;
|
||||
}
|
||||
@@ -1195,6 +1196,80 @@ namespace FineUIPro.Web
|
||||
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 多表头导出方法
|
||||
/// </summary>
|
||||
/// <param name="grid"></param>
|
||||
/// <returns></returns>
|
||||
public string GetGridMultiHeaderTableHtml(Grid grid)
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.Append("<meta http-equiv=\"content-type\" content=\"application/excel; charset=UTF-8\"/>");
|
||||
sb.Append("<table cellspacing=\"0\" rules=\"all\" border=\"1\" style=\"border-collapse:collapse;\">");
|
||||
//sb.Append("<tr>");
|
||||
//foreach (GridColumn column in grid.Columns)
|
||||
//{
|
||||
// if (column.ColumnID != "ckbIsSelected" && column.ColumnID != "Punish" && column.ColumnID != "Del")
|
||||
// {
|
||||
// sb.AppendFormat("<td>{0}</td>", column.HeaderText);
|
||||
// }
|
||||
//}
|
||||
//sb.Append("</tr>");
|
||||
MultiHeaderTable mht = new MultiHeaderTable();
|
||||
mht.ResolveMultiHeaderTable(grid.Columns);
|
||||
|
||||
foreach (List<object[]> rows in mht.MultiTable)
|
||||
{
|
||||
sb.Append("<tr>");
|
||||
foreach (object[] cell in rows)
|
||||
{
|
||||
int rowspan = Convert.ToInt32(cell[0]);
|
||||
int colspan = Convert.ToInt32(cell[1]);
|
||||
GridColumn column = cell[2] as GridColumn;
|
||||
if (column.Hidden == false)
|
||||
{
|
||||
sb.AppendFormat("<th{0}{1}{2}>{3}</th>",
|
||||
rowspan != 1 ? " rowspan=\"" + rowspan + "\"" : "",
|
||||
colspan != 1 ? " colspan=\"" + colspan + "\"" : "",
|
||||
colspan != 1 ? " style=\"text-align:center;\"" : "",
|
||||
column.HeaderText);
|
||||
}
|
||||
}
|
||||
sb.Append("</tr>");
|
||||
}
|
||||
foreach (GridRow row in grid.Rows)
|
||||
{
|
||||
sb.Append("<tr>");
|
||||
//if (row.Grid.gr.Hidden == false) {
|
||||
foreach (GridColumn column in mht.Columns)
|
||||
{
|
||||
if (column.ColumnID != "ckbIsSelected" && column.ColumnID != "Punish" && column.ColumnID != "Del")
|
||||
{
|
||||
string html = row.Values[column.ColumnIndex].ToString();
|
||||
|
||||
if (column.ColumnID == "tfPageIndex")
|
||||
{
|
||||
html = (row.FindControl("lblPageIndex") as AspNet.Label).Text;
|
||||
}
|
||||
|
||||
else if (column.ColumnID == "Count4")
|
||||
{
|
||||
html = (row.FindControl("Label5") as AspNet.Label).Text;
|
||||
}
|
||||
|
||||
sb.AppendFormat("<td>{0}</td>", html);
|
||||
}
|
||||
}
|
||||
//}
|
||||
sb.Append("</tr>");
|
||||
}
|
||||
|
||||
sb.Append("</table>");
|
||||
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region 根据身份证号码获取年龄
|
||||
|
||||
Reference in New Issue
Block a user