98 lines
4.1 KiB
C#
98 lines
4.1 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
|
|
namespace FineUIPro.Web.HJGL.WeldingReport
|
|
{
|
|
public partial class InspectionBatchSelectExportColumn : PageBase
|
|
{
|
|
#region 加载
|
|
protected void Page_Load(object sender, EventArgs e)
|
|
{
|
|
if (!IsPostBack)
|
|
{
|
|
#region 默认勾选选择显示的列
|
|
ListItem[] list = new ListItem[32];
|
|
list[0] = new ListItem("施工号", "1");
|
|
list[1] = new ListItem("对应检测比例", "2");
|
|
list[2] = new ListItem("材质", "3");
|
|
list[3] = new ListItem("单线号", "4");
|
|
list[4] = new ListItem("管道编号", "5");
|
|
list[5] = new ListItem("焊缝编号", "6");
|
|
list[6] = new ListItem("管线直径", "7");
|
|
list[7] = new ListItem("管线壁厚", "8");
|
|
list[8] = new ListItem("焊工号", "9");
|
|
list[9] = new ListItem("焊接位置", "10");
|
|
list[10] = new ListItem("焊接方法", "11");
|
|
list[11] = new ListItem("焊接日期", "12");
|
|
|
|
list[12] = new ListItem("扩拍号", "13");
|
|
list[13] = new ListItem("检测类型", "14");
|
|
list[14] = new ListItem("检测状态", "15");
|
|
list[15] = new ListItem("确认时间", "16");
|
|
list[16] = new ListItem("委托日期", "17");
|
|
list[17] = new ListItem("检验时间", "18");
|
|
list[18] = new ListItem("外观检验", "19");
|
|
list[19] = new ListItem("批次", "20");
|
|
list[20] = new ListItem("热处理合格", "21");
|
|
list[21] = new ListItem("硬度合格", "22");
|
|
list[22] = new ListItem("检验员", "23");
|
|
|
|
list[23] = new ListItem("热处理类型", "24");
|
|
list[24] = new ListItem("热处理委托", "25");
|
|
list[25] = new ListItem("热处理报告号", "26");
|
|
list[26] = new ListItem("硬度委托", "27");
|
|
list[27] = new ListItem("硬度报告号", "28");
|
|
list[28] = new ListItem("扩拍对应返修管线号", "29");
|
|
list[29] = new ListItem("扩拍对应返修焊口", "30");
|
|
list[30] = new ListItem("无损检测报告号", "31");
|
|
list[31] = new ListItem("试压包", "32");
|
|
|
|
List<string> listNames = new List<string>();
|
|
|
|
Model.Sys_UserShowColumns c = BLL.Sys_UserShowColumnsService.GetColumnsByUserId(this.CurrUser.UserId, "3");
|
|
if (c != null)
|
|
{
|
|
if (!string.IsNullOrEmpty(c.Columns))
|
|
{
|
|
List<string> columns = c.Columns.Split(',').ToList();
|
|
foreach (var column in columns)
|
|
{
|
|
foreach (var i in list)
|
|
{
|
|
if (i.Value == column)
|
|
{
|
|
listNames.Add(i.Text);
|
|
}
|
|
}
|
|
}
|
|
foreach (var item in listNames)
|
|
{
|
|
foreach (var i in this.cblColumn.Items)
|
|
{
|
|
if (i.Value == item)
|
|
{
|
|
i.Selected = true;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
#endregion
|
|
}
|
|
}
|
|
#endregion
|
|
|
|
#region 导出
|
|
/// <summary>
|
|
/// 导出按钮
|
|
/// </summary>
|
|
/// <param name="sender"></param>
|
|
/// <param name="e"></param>
|
|
protected void btnExport_Click(object sender, EventArgs e)
|
|
{
|
|
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference(String.Join("#", cblColumn.SelectedValueArray)));
|
|
}
|
|
#endregion
|
|
}
|
|
} |