924 lines
53 KiB
C#
924 lines
53 KiB
C#
using BLL;
|
|
using NPOI.XSSF.UserModel;
|
|
using NPOI.SS.UserModel;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Data;
|
|
using System.Data.SqlClient;
|
|
using System.IO;
|
|
using System.Linq;
|
|
using System.Web.UI.WebControls;
|
|
|
|
namespace FineUIPro.Web.Report
|
|
{
|
|
public partial class JobListReport : PageBase
|
|
{
|
|
#region 加载
|
|
/// <summary>
|
|
/// 加载页面
|
|
/// </summary>
|
|
/// <param name="sender"></param>
|
|
/// <param name="e"></param>
|
|
protected void Page_Load(object sender, EventArgs e)
|
|
{
|
|
if (!IsPostBack)
|
|
{
|
|
GetButtonPower();//权限设置
|
|
ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
|
|
// 绑定表格
|
|
BindGrid();
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// 绑定数据
|
|
/// </summary>
|
|
private void BindGrid()
|
|
{
|
|
string strSql = @"SELECT * FROM dbo.View_Job_List
|
|
WHERE 1=1 ";
|
|
List<SqlParameter> listStr = new List<SqlParameter>();
|
|
if (!string.IsNullOrEmpty(this.txtJobNo.Text.Trim()))
|
|
{
|
|
strSql += " AND ProjectControl_JobNo LIKE @JobNO ";
|
|
listStr.Add(new SqlParameter("@JobNO", this.txtJobNo.Text.Trim() + "%"));
|
|
}
|
|
|
|
strSql += " ORDER BY ProjectControl_JobNo DESC";
|
|
SqlParameter[] parameter = listStr.ToArray();
|
|
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
|
// 2.获取当前分页数据
|
|
//var table = this.GetPagedDataTable(Grid1, tb1);
|
|
Grid1.RecordCount = tb.Rows.Count;
|
|
var table = this.GetPagedDataTable(Grid1, tb);
|
|
Grid1.DataSource = table;
|
|
Grid1.DataBind();
|
|
}
|
|
#endregion
|
|
|
|
#region 查询
|
|
/// <summary>
|
|
/// 下拉框选择事件
|
|
/// </summary>
|
|
/// <param name="sender"></param>
|
|
/// <param name="e"></param>
|
|
protected void btnSearch_Click(object sender, EventArgs e)
|
|
{
|
|
BindGrid();
|
|
}
|
|
#endregion
|
|
|
|
#region 分页、排序
|
|
/// <summary>
|
|
/// 分页
|
|
/// </summary>
|
|
/// <param name="sender"></param>
|
|
/// <param name="e"></param>
|
|
protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e)
|
|
{
|
|
Grid1.PageIndex = e.NewPageIndex;
|
|
BindGrid();
|
|
}
|
|
|
|
/// <summary>
|
|
/// 分页显示条数下拉框
|
|
/// </summary>
|
|
/// <param name="sender"></param>
|
|
/// <param name="e"></param>
|
|
protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e)
|
|
{
|
|
Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue);
|
|
BindGrid();
|
|
}
|
|
|
|
/// <summary>
|
|
/// 排序
|
|
/// </summary>
|
|
/// <param name="sender"></param>
|
|
/// <param name="e"></param>
|
|
protected void Grid1_Sort(object sender, FineUIPro.GridSortEventArgs e)
|
|
{
|
|
Grid1.SortDirection = e.SortDirection;
|
|
Grid1.SortField = e.SortField;
|
|
BindGrid();
|
|
}
|
|
#endregion
|
|
|
|
#region 导出
|
|
/// <summary>
|
|
/// 导出按钮
|
|
/// </summary>
|
|
/// <param name="sender"></param>
|
|
/// <param name="e"></param>
|
|
protected void btnExport_Click(object sender, EventArgs e)
|
|
{
|
|
string rootPath = Server.MapPath("~/") + Const.ExcelUrl;
|
|
//模板文件
|
|
string TempletFileName = rootPath + "P15_CTEM_Job_List.xlsx";
|
|
//导出文件
|
|
string filePath = rootPath + DateTime.Now.ToString("yyyyMMddhhmmss") + "\\";
|
|
if (!Directory.Exists(filePath))
|
|
{
|
|
Directory.CreateDirectory(filePath);
|
|
}
|
|
string ReportFileName = filePath + "out.xlsx";
|
|
|
|
FileStream file = new FileStream(TempletFileName, FileMode.Open, FileAccess.Read);
|
|
XSSFWorkbook hssfworkbook = new XSSFWorkbook(file);
|
|
|
|
#region FCR_Report
|
|
XSSFSheet reportModel = (XSSFSheet)hssfworkbook.GetSheet("Light Sheet");
|
|
|
|
XSSFFont cs_content_Font = (XSSFFont)hssfworkbook.CreateFont(); //创建字体
|
|
cs_content_Font.FontName = "sans-serif";//字体
|
|
cs_content_Font.FontHeightInPoints = 10; //字体大小
|
|
|
|
XSSFFont cs_content_Font_8 = (XSSFFont)hssfworkbook.CreateFont(); //创建字体
|
|
cs_content_Font_8.FontName = "sans-serif";//字体
|
|
cs_content_Font_8.FontHeightInPoints = 8; //字体大小
|
|
|
|
IDataFormat dataformat = hssfworkbook.CreateDataFormat();
|
|
ICellStyle styleDate = hssfworkbook.CreateCellStyle();
|
|
styleDate.VerticalAlignment = VerticalAlignment.Center;
|
|
styleDate.Alignment = HorizontalAlignment.Center;
|
|
styleDate.SetFont(cs_content_Font_8);
|
|
styleDate.DataFormat = dataformat.GetFormat("yyyy/m/d");
|
|
|
|
var list = (from x in Funs.DB.View_Job_List orderby x.ProjectControl_JobNo descending select x).ToList();
|
|
if (!string.IsNullOrEmpty(this.txtJobNo.Text.Trim()))
|
|
{
|
|
list = list.Where(x => x.ProjectControl_JobNo.StartsWith(this.txtJobNo.Text.Trim())).ToList();
|
|
}
|
|
if (list.Count > 0)
|
|
{
|
|
var rowIndex = 2;
|
|
foreach (var itemOver in list)
|
|
{
|
|
if (reportModel.GetRow(rowIndex) == null) reportModel.CreateRow(rowIndex);
|
|
|
|
#region 列赋值
|
|
//BU.Code
|
|
if (reportModel.GetRow(rowIndex).GetCell(0) == null) reportModel.GetRow(rowIndex).CreateCell(0);
|
|
reportModel.GetRow(rowIndex).GetCell(0).SetCellValue(itemOver.ProjectControl_BUCode);
|
|
reportModel.GetRow(rowIndex).GetCell(0).CellStyle.SetFont(cs_content_Font);//将字体绑定到样式
|
|
//JobNo
|
|
if (reportModel.GetRow(rowIndex).GetCell(1) == null) reportModel.GetRow(rowIndex).CreateCell(1);
|
|
reportModel.GetRow(rowIndex).GetCell(1).SetCellValue(itemOver.ProjectControl_JobNo);
|
|
// JobType
|
|
if (reportModel.GetRow(rowIndex).GetCell(2) == null) reportModel.GetRow(rowIndex).CreateCell(2);
|
|
reportModel.GetRow(rowIndex).GetCell(2).SetCellValue(itemOver.ProjectControl_JobType);
|
|
// Lead By
|
|
if (reportModel.GetRow(rowIndex).GetCell(3) == null) reportModel.GetRow(rowIndex).CreateCell(3);
|
|
reportModel.GetRow(rowIndex).GetCell(3).SetCellValue(itemOver.ProjectControl_LeadByName);
|
|
// JobTitle
|
|
if (reportModel.GetRow(rowIndex).GetCell(4) == null) reportModel.GetRow(rowIndex).CreateCell(4);
|
|
reportModel.GetRow(rowIndex).GetCell(4).SetCellValue(itemOver.ProjectControl_JobTitle);
|
|
//Org.Budget
|
|
if (reportModel.GetRow(rowIndex).GetCell(5) == null) reportModel.GetRow(rowIndex).CreateCell(5);
|
|
reportModel.GetRow(rowIndex).GetCell(5).SetCellValue(itemOver.ProjectControl_OrginalBudget != null ? (double)itemOver.ProjectControl_OrginalBudget.Value : 0);
|
|
// ProjectManager
|
|
if (reportModel.GetRow(rowIndex).GetCell(6) == null) reportModel.GetRow(rowIndex).CreateCell(6);
|
|
reportModel.GetRow(rowIndex).GetCell(6).SetCellValue(itemOver.ProjectControl_ProjectManager);
|
|
// Priority
|
|
if (reportModel.GetRow(rowIndex).GetCell(7) == null) reportModel.GetRow(rowIndex).CreateCell(7);
|
|
reportModel.GetRow(rowIndex).GetCell(7).SetCellValue(itemOver.PM_General_Priority);
|
|
// Job Status
|
|
if (reportModel.GetRow(rowIndex).GetCell(8) == null) reportModel.GetRow(rowIndex).CreateCell(8);
|
|
reportModel.GetRow(rowIndex).GetCell(8).SetCellValue(itemOver.ProjectControl_JobStatus);
|
|
//Job Reveive
|
|
if (reportModel.GetRow(rowIndex).GetCell(9) == null) reportModel.GetRow(rowIndex).CreateCell(9);
|
|
if (!string.IsNullOrEmpty(itemOver.PM_MA_JobReveive))
|
|
{
|
|
reportModel.GetRow(rowIndex).GetCell(9).SetCellValue((DateTime)Convert.ToDateTime(itemOver.PM_MA_JobReveive.ToString()));
|
|
reportModel.GetRow(rowIndex).GetCell(9).CellStyle = styleDate;
|
|
}
|
|
// Date_Resource_Plan
|
|
if (reportModel.GetRow(rowIndex).GetCell(10) == null) reportModel.GetRow(rowIndex).CreateCell(10);
|
|
if (!string.IsNullOrEmpty(itemOver.Date_Resource_Plan))
|
|
{
|
|
reportModel.GetRow(rowIndex).GetCell(10).SetCellValue((DateTime)Convert.ToDateTime(itemOver.Date_Resource_Plan.ToString()));
|
|
reportModel.GetRow(rowIndex).GetCell(10).CellStyle = styleDate;
|
|
}
|
|
// Light_Resource Plan
|
|
if (reportModel.GetRow(rowIndex).GetCell(11) == null) reportModel.GetRow(rowIndex).CreateCell(11);
|
|
if (itemOver.Duration_Resource_Plan != null)
|
|
{
|
|
reportModel.GetRow(rowIndex).GetCell(11).SetCellValue((int)itemOver.Duration_Resource_Plan.Value);
|
|
}
|
|
else
|
|
{
|
|
reportModel.GetRow(rowIndex).GetCell(11).SetCellValue("");
|
|
}
|
|
// Duration_Resource Plan
|
|
//if (reportModel.GetRow(rowIndex).GetCell(12) == null) reportModel.GetRow(rowIndex).CreateCell(12);
|
|
//if (itemOver.Duration_Resource_Plan != null)
|
|
//{
|
|
// reportModel.GetRow(rowIndex).GetCell(12).SetCellValue((int)itemOver.Duration_Resource_Plan.Value);
|
|
//}
|
|
//else
|
|
//{
|
|
// reportModel.GetRow(rowIndex).GetCell(12).SetCellValue("");
|
|
//}
|
|
|
|
// Date_Plan_EHS_Review_Files
|
|
if (reportModel.GetRow(rowIndex).GetCell(12) == null) reportModel.GetRow(rowIndex).CreateCell(12);
|
|
if (!string.IsNullOrEmpty(itemOver.Date_Plan_EHS_Review_Files))
|
|
{
|
|
reportModel.GetRow(rowIndex).GetCell(12).SetCellValue((DateTime)Convert.ToDateTime(itemOver.Date_Plan_EHS_Review_Files.ToString()));
|
|
reportModel.GetRow(rowIndex).GetCell(12).CellStyle = styleDate;
|
|
}
|
|
// Date_EHS_Review_Files
|
|
if (reportModel.GetRow(rowIndex).GetCell(13) == null) reportModel.GetRow(rowIndex).CreateCell(13);
|
|
if (!string.IsNullOrEmpty(itemOver.Date_EHS_Review_Files))
|
|
{
|
|
reportModel.GetRow(rowIndex).GetCell(13).SetCellValue((DateTime)Convert.ToDateTime(itemOver.Date_EHS_Review_Files.ToString()));
|
|
reportModel.GetRow(rowIndex).GetCell(13).CellStyle = styleDate;
|
|
}
|
|
// Light_EHS_Review_Files
|
|
if (reportModel.GetRow(rowIndex).GetCell(14) == null) reportModel.GetRow(rowIndex).CreateCell(14);
|
|
if (itemOver.Duration_EHS_Review_Files != null)
|
|
{
|
|
reportModel.GetRow(rowIndex).GetCell(14).SetCellValue((int)itemOver.Duration_EHS_Review_Files.Value);
|
|
}
|
|
else
|
|
{
|
|
reportModel.GetRow(rowIndex).GetCell(14).SetCellValue("");
|
|
}
|
|
|
|
// Date_EHS_Review_Meeting
|
|
if (reportModel.GetRow(rowIndex).GetCell(15) == null) reportModel.GetRow(rowIndex).CreateCell(15);
|
|
if (!string.IsNullOrEmpty(itemOver.Date_EHS_Review_Meeting))
|
|
{
|
|
reportModel.GetRow(rowIndex).GetCell(15).SetCellValue((DateTime)Convert.ToDateTime(itemOver.Date_EHS_Review_Meeting.ToString()));
|
|
reportModel.GetRow(rowIndex).GetCell(15).CellStyle = styleDate;
|
|
}
|
|
// Light_EHS_Review_Meeting
|
|
if (reportModel.GetRow(rowIndex).GetCell(16) == null) reportModel.GetRow(rowIndex).CreateCell(16);
|
|
if (itemOver.Duration_EHS_Review_Meeting != null)
|
|
{
|
|
reportModel.GetRow(rowIndex).GetCell(16).SetCellValue((int)itemOver.Duration_EHS_Review_Meeting.Value);
|
|
}
|
|
else
|
|
{
|
|
reportModel.GetRow(rowIndex).GetCell(16).SetCellValue("");
|
|
}
|
|
|
|
// Date_Estimate_Worksheet
|
|
if (reportModel.GetRow(rowIndex).GetCell(17) == null) reportModel.GetRow(rowIndex).CreateCell(17);
|
|
if (!string.IsNullOrEmpty(itemOver.Date_Estimate_Worksheet))
|
|
{
|
|
reportModel.GetRow(rowIndex).GetCell(17).SetCellValue((DateTime)Convert.ToDateTime(itemOver.Date_Estimate_Worksheet.ToString()));
|
|
reportModel.GetRow(rowIndex).GetCell(17).CellStyle = styleDate;
|
|
}
|
|
// Light_Estimate_Worksheet
|
|
if (reportModel.GetRow(rowIndex).GetCell(18) == null) reportModel.GetRow(rowIndex).CreateCell(18);
|
|
if (itemOver.Duration_Estimate_Worksheet != null)
|
|
{
|
|
reportModel.GetRow(rowIndex).GetCell(18).SetCellValue((int)itemOver.Duration_Estimate_Worksheet.Value);
|
|
}
|
|
else
|
|
{
|
|
reportModel.GetRow(rowIndex).GetCell(18).SetCellValue("");
|
|
}
|
|
|
|
// Date_Budget
|
|
if (reportModel.GetRow(rowIndex).GetCell(19) == null) reportModel.GetRow(rowIndex).CreateCell(19);
|
|
if (!string.IsNullOrEmpty(itemOver.Date_Budget))
|
|
{
|
|
reportModel.GetRow(rowIndex).GetCell(19).SetCellValue((DateTime)Convert.ToDateTime(itemOver.Date_Budget.ToString()));
|
|
reportModel.GetRow(rowIndex).GetCell(19).CellStyle = styleDate;
|
|
}
|
|
|
|
// Light_Budget
|
|
if (reportModel.GetRow(rowIndex).GetCell(20) == null) reportModel.GetRow(rowIndex).CreateCell(20);
|
|
if (itemOver.Duration_Budget != null)
|
|
{
|
|
reportModel.GetRow(rowIndex).GetCell(20).SetCellValue((int)itemOver.Duration_Budget.Value);
|
|
}
|
|
else
|
|
{
|
|
reportModel.GetRow(rowIndex).GetCell(20).SetCellValue("");
|
|
}
|
|
|
|
// Date_Approval
|
|
if (reportModel.GetRow(rowIndex).GetCell(21) == null) reportModel.GetRow(rowIndex).CreateCell(21);
|
|
if (!string.IsNullOrEmpty(itemOver.Date_Approval))
|
|
{
|
|
reportModel.GetRow(rowIndex).GetCell(21).SetCellValue((DateTime)Convert.ToDateTime(itemOver.Date_Approval.ToString()));
|
|
reportModel.GetRow(rowIndex).GetCell(21).CellStyle = styleDate;
|
|
}
|
|
|
|
// Light_Approval
|
|
if (reportModel.GetRow(rowIndex).GetCell(22) == null) reportModel.GetRow(rowIndex).CreateCell(22);
|
|
if (itemOver.Duration_Approval != null)
|
|
{
|
|
reportModel.GetRow(rowIndex).GetCell(22).SetCellValue((int)itemOver.Duration_Approval.Value);
|
|
}
|
|
else
|
|
{
|
|
reportModel.GetRow(rowIndex).GetCell(22).SetCellValue("");
|
|
}
|
|
|
|
// Date_Teco_Alarm_Study
|
|
if (reportModel.GetRow(rowIndex).GetCell(23) == null) reportModel.GetRow(rowIndex).CreateCell(23);
|
|
if (!string.IsNullOrEmpty(itemOver.Date_Teco_Alarm_Study))
|
|
{
|
|
reportModel.GetRow(rowIndex).GetCell(23).SetCellValue((DateTime)Convert.ToDateTime(itemOver.Date_Teco_Alarm_Study.ToString()));
|
|
reportModel.GetRow(rowIndex).GetCell(23).CellStyle = styleDate;
|
|
}
|
|
// Light_Teco_Alarm_Study
|
|
if (reportModel.GetRow(rowIndex).GetCell(24) == null) reportModel.GetRow(rowIndex).CreateCell(24);
|
|
if (itemOver.Duration_Teco_Alarm_Study != null)
|
|
{
|
|
reportModel.GetRow(rowIndex).GetCell(24).SetCellValue((int)itemOver.Duration_Teco_Alarm_Study.Value);
|
|
}
|
|
else
|
|
{
|
|
reportModel.GetRow(rowIndex).GetCell(24).SetCellValue("");
|
|
}
|
|
// Duration_Teco_Alarm_Study
|
|
//if (reportModel.GetRow(rowIndex).GetCell(30) == null) reportModel.GetRow(rowIndex).CreateCell(30);
|
|
//if (itemOver.Duration_Teco_Alarm_Study != null)
|
|
//{
|
|
// reportModel.GetRow(rowIndex).GetCell(30).SetCellValue((int)itemOver.Duration_Teco_Alarm_Study.Value);
|
|
//}
|
|
//else
|
|
//{
|
|
// reportModel.GetRow(rowIndex).GetCell(30).SetCellValue("");
|
|
//}
|
|
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
if (reportModel.GetRow(rowIndex).GetCell(25) == null) reportModel.GetRow(rowIndex).CreateCell(25);
|
|
if (!string.IsNullOrEmpty(itemOver.IFC_Start_Process))
|
|
{
|
|
reportModel.GetRow(rowIndex).GetCell(25).SetCellValue((DateTime)Convert.ToDateTime(itemOver.IFC_Start_Process.ToString()));
|
|
reportModel.GetRow(rowIndex).GetCell(25).CellStyle = styleDate;
|
|
}
|
|
if (reportModel.GetRow(rowIndex).GetCell(26) == null) reportModel.GetRow(rowIndex).CreateCell(26);
|
|
if (!string.IsNullOrEmpty(itemOver.IFC_End_Process))
|
|
{
|
|
reportModel.GetRow(rowIndex).GetCell(26).SetCellValue((DateTime)Convert.ToDateTime(itemOver.IFC_End_Process.ToString()));
|
|
reportModel.GetRow(rowIndex).GetCell(26).CellStyle = styleDate;
|
|
}
|
|
if (reportModel.GetRow(rowIndex).GetCell(27) == null) reportModel.GetRow(rowIndex).CreateCell(27);
|
|
if (!string.IsNullOrEmpty(itemOver.IFC_Act_Process))
|
|
{
|
|
reportModel.GetRow(rowIndex).GetCell(27).SetCellValue((DateTime)Convert.ToDateTime(itemOver.IFC_Act_Process.ToString()));
|
|
reportModel.GetRow(rowIndex).GetCell(27).CellStyle = styleDate;
|
|
}
|
|
// Light_IFC_Process
|
|
if (reportModel.GetRow(rowIndex).GetCell(28) == null) reportModel.GetRow(rowIndex).CreateCell(28);
|
|
if (itemOver.Light_IFC_Process != null)
|
|
{
|
|
reportModel.GetRow(rowIndex).GetCell(28).SetCellValue((int)itemOver.Light_IFC_Process.Value);
|
|
}
|
|
else
|
|
{
|
|
reportModel.GetRow(rowIndex).GetCell(28).SetCellValue("");
|
|
}
|
|
|
|
if (reportModel.GetRow(rowIndex).GetCell(29) == null) reportModel.GetRow(rowIndex).CreateCell(29);
|
|
if (!string.IsNullOrEmpty(itemOver.IFC_Start_MasterPlanning))
|
|
{
|
|
reportModel.GetRow(rowIndex).GetCell(29).SetCellValue((DateTime)Convert.ToDateTime(itemOver.IFC_Start_MasterPlanning.ToString()));
|
|
reportModel.GetRow(rowIndex).GetCell(29).CellStyle = styleDate;
|
|
}
|
|
if (reportModel.GetRow(rowIndex).GetCell(30) == null) reportModel.GetRow(rowIndex).CreateCell(30);
|
|
if (!string.IsNullOrEmpty(itemOver.IFC_End_MasterPlanning))
|
|
{
|
|
reportModel.GetRow(rowIndex).GetCell(30).SetCellValue((DateTime)Convert.ToDateTime(itemOver.IFC_End_MasterPlanning.ToString()));
|
|
reportModel.GetRow(rowIndex).GetCell(30).CellStyle = styleDate;
|
|
}
|
|
if (reportModel.GetRow(rowIndex).GetCell(31) == null) reportModel.GetRow(rowIndex).CreateCell(31);
|
|
if (!string.IsNullOrEmpty(itemOver.IFC_Act_MasterPlanning))
|
|
{
|
|
reportModel.GetRow(rowIndex).GetCell(31).SetCellValue((DateTime)Convert.ToDateTime(itemOver.IFC_Act_MasterPlanning.ToString()));
|
|
reportModel.GetRow(rowIndex).GetCell(31).CellStyle = styleDate;
|
|
}
|
|
// Light_IFC_MasterPlanning
|
|
if (reportModel.GetRow(rowIndex).GetCell(32) == null) reportModel.GetRow(rowIndex).CreateCell(32);
|
|
if (itemOver.Light_IFC_MasterPlanning != null)
|
|
{
|
|
reportModel.GetRow(rowIndex).GetCell(32).SetCellValue((int)itemOver.Light_IFC_MasterPlanning.Value);
|
|
}
|
|
else
|
|
{
|
|
reportModel.GetRow(rowIndex).GetCell(32).SetCellValue("");
|
|
}
|
|
|
|
if (reportModel.GetRow(rowIndex).GetCell(33) == null) reportModel.GetRow(rowIndex).CreateCell(33);
|
|
if (!string.IsNullOrEmpty(itemOver.IFC_Start_Civil))
|
|
{
|
|
reportModel.GetRow(rowIndex).GetCell(33).SetCellValue((DateTime)Convert.ToDateTime(itemOver.IFC_Start_Civil.ToString()));
|
|
reportModel.GetRow(rowIndex).GetCell(33).CellStyle = styleDate;
|
|
}
|
|
if (reportModel.GetRow(rowIndex).GetCell(34) == null) reportModel.GetRow(rowIndex).CreateCell(34);
|
|
if (!string.IsNullOrEmpty(itemOver.IFC_End_Civil))
|
|
{
|
|
reportModel.GetRow(rowIndex).GetCell(34).SetCellValue((DateTime)Convert.ToDateTime(itemOver.IFC_End_Civil.ToString()));
|
|
reportModel.GetRow(rowIndex).GetCell(34).CellStyle = styleDate;
|
|
}
|
|
if (reportModel.GetRow(rowIndex).GetCell(35) == null) reportModel.GetRow(rowIndex).CreateCell(35);
|
|
if (!string.IsNullOrEmpty(itemOver.IFC_Act_Civil))
|
|
{
|
|
reportModel.GetRow(rowIndex).GetCell(35).SetCellValue((DateTime)Convert.ToDateTime(itemOver.IFC_Act_Civil.ToString()));
|
|
reportModel.GetRow(rowIndex).GetCell(35).CellStyle = styleDate;
|
|
}
|
|
// Light_IFC_Civil
|
|
if (reportModel.GetRow(rowIndex).GetCell(36) == null) reportModel.GetRow(rowIndex).CreateCell(36);
|
|
if (itemOver.Light_IFC_Civil != null)
|
|
{
|
|
reportModel.GetRow(rowIndex).GetCell(36).SetCellValue((int)itemOver.Light_IFC_Civil.Value);
|
|
}
|
|
else
|
|
{
|
|
reportModel.GetRow(rowIndex).GetCell(36).SetCellValue("");
|
|
}
|
|
|
|
if (reportModel.GetRow(rowIndex).GetCell(37) == null) reportModel.GetRow(rowIndex).CreateCell(37);
|
|
if (!string.IsNullOrEmpty(itemOver.IFC_Start_Architectral))
|
|
{
|
|
reportModel.GetRow(rowIndex).GetCell(37).SetCellValue((DateTime)Convert.ToDateTime(itemOver.IFC_Start_Architectral.ToString()));
|
|
reportModel.GetRow(rowIndex).GetCell(37).CellStyle = styleDate;
|
|
}
|
|
if (reportModel.GetRow(rowIndex).GetCell(38) == null) reportModel.GetRow(rowIndex).CreateCell(38);
|
|
if (!string.IsNullOrEmpty(itemOver.IFC_End_Architectral))
|
|
{
|
|
reportModel.GetRow(rowIndex).GetCell(38).SetCellValue((DateTime)Convert.ToDateTime(itemOver.IFC_End_Architectral.ToString()));
|
|
reportModel.GetRow(rowIndex).GetCell(38).CellStyle = styleDate;
|
|
}
|
|
if (reportModel.GetRow(rowIndex).GetCell(39) == null) reportModel.GetRow(rowIndex).CreateCell(39);
|
|
if (!string.IsNullOrEmpty(itemOver.IFC_Act_Architectral))
|
|
{
|
|
reportModel.GetRow(rowIndex).GetCell(39).SetCellValue((DateTime)Convert.ToDateTime(itemOver.IFC_Act_Architectral.ToString()));
|
|
reportModel.GetRow(rowIndex).GetCell(39).CellStyle = styleDate;
|
|
}
|
|
// Light_IFC_Architectral
|
|
if (reportModel.GetRow(rowIndex).GetCell(40) == null) reportModel.GetRow(rowIndex).CreateCell(40);
|
|
if (itemOver.Light_IFC_Architectral != null)
|
|
{
|
|
reportModel.GetRow(rowIndex).GetCell(40).SetCellValue((int)itemOver.Light_IFC_Architectral.Value);
|
|
}
|
|
else
|
|
{
|
|
reportModel.GetRow(rowIndex).GetCell(40).SetCellValue("");
|
|
}
|
|
|
|
if (reportModel.GetRow(rowIndex).GetCell(41) == null) reportModel.GetRow(rowIndex).CreateCell(41);
|
|
if (!string.IsNullOrEmpty(itemOver.IFC_Start_HVAC))
|
|
{
|
|
reportModel.GetRow(rowIndex).GetCell(41).SetCellValue((DateTime)Convert.ToDateTime(itemOver.IFC_Start_HVAC.ToString()));
|
|
reportModel.GetRow(rowIndex).GetCell(41).CellStyle = styleDate;
|
|
}
|
|
if (reportModel.GetRow(rowIndex).GetCell(42) == null) reportModel.GetRow(rowIndex).CreateCell(42);
|
|
if (!string.IsNullOrEmpty(itemOver.IFC_End_HVAC))
|
|
{
|
|
reportModel.GetRow(rowIndex).GetCell(42).SetCellValue((DateTime)Convert.ToDateTime(itemOver.IFC_End_HVAC.ToString()));
|
|
reportModel.GetRow(rowIndex).GetCell(42).CellStyle = styleDate;
|
|
}
|
|
if (reportModel.GetRow(rowIndex).GetCell(43) == null) reportModel.GetRow(rowIndex).CreateCell(43);
|
|
if (!string.IsNullOrEmpty(itemOver.IFC_Act_HVAC))
|
|
{
|
|
reportModel.GetRow(rowIndex).GetCell(43).SetCellValue((DateTime)Convert.ToDateTime(itemOver.IFC_Act_HVAC.ToString()));
|
|
reportModel.GetRow(rowIndex).GetCell(43).CellStyle = styleDate;
|
|
}
|
|
// Light_IFC_HVAC
|
|
if (reportModel.GetRow(rowIndex).GetCell(44) == null) reportModel.GetRow(rowIndex).CreateCell(44);
|
|
if (itemOver.Light_IFC_HVAC != null)
|
|
{
|
|
reportModel.GetRow(rowIndex).GetCell(44).SetCellValue((int)itemOver.Light_IFC_HVAC.Value);
|
|
}
|
|
else
|
|
{
|
|
reportModel.GetRow(rowIndex).GetCell(44).SetCellValue("");
|
|
}
|
|
|
|
if (reportModel.GetRow(rowIndex).GetCell(45) == null) reportModel.GetRow(rowIndex).CreateCell(45);
|
|
if (!string.IsNullOrEmpty(itemOver.IFC_Start_Plumbing))
|
|
{
|
|
reportModel.GetRow(rowIndex).GetCell(45).SetCellValue((DateTime)Convert.ToDateTime(itemOver.IFC_Start_Plumbing.ToString()));
|
|
reportModel.GetRow(rowIndex).GetCell(45).CellStyle = styleDate;
|
|
}
|
|
if (reportModel.GetRow(rowIndex).GetCell(46) == null) reportModel.GetRow(rowIndex).CreateCell(46);
|
|
if (!string.IsNullOrEmpty(itemOver.IFC_End_Plumbing))
|
|
{
|
|
reportModel.GetRow(rowIndex).GetCell(46).SetCellValue((DateTime)Convert.ToDateTime(itemOver.IFC_End_Plumbing.ToString()));
|
|
reportModel.GetRow(rowIndex).GetCell(46).CellStyle = styleDate;
|
|
}
|
|
if (reportModel.GetRow(rowIndex).GetCell(47) == null) reportModel.GetRow(rowIndex).CreateCell(47);
|
|
if (!string.IsNullOrEmpty(itemOver.IFC_Act_Plumbing))
|
|
{
|
|
reportModel.GetRow(rowIndex).GetCell(47).SetCellValue((DateTime)Convert.ToDateTime(itemOver.IFC_Act_Plumbing.ToString()));
|
|
reportModel.GetRow(rowIndex).GetCell(47).CellStyle = styleDate;
|
|
}
|
|
// Light_IFC_Plumbing
|
|
if (reportModel.GetRow(rowIndex).GetCell(48) == null) reportModel.GetRow(rowIndex).CreateCell(48);
|
|
if (itemOver.Light_IFC_Plumbing != null)
|
|
{
|
|
reportModel.GetRow(rowIndex).GetCell(48).SetCellValue((int)itemOver.Light_IFC_Plumbing.Value);
|
|
}
|
|
else
|
|
{
|
|
reportModel.GetRow(rowIndex).GetCell(48).SetCellValue("");
|
|
}
|
|
|
|
if (reportModel.GetRow(rowIndex).GetCell(49) == null) reportModel.GetRow(rowIndex).CreateCell(49);
|
|
if (!string.IsNullOrEmpty(itemOver.IFC_Start_Mech_Equi))
|
|
{
|
|
reportModel.GetRow(rowIndex).GetCell(49).SetCellValue((DateTime)Convert.ToDateTime(itemOver.IFC_Start_Mech_Equi.ToString()));
|
|
reportModel.GetRow(rowIndex).GetCell(49).CellStyle = styleDate;
|
|
}
|
|
if (reportModel.GetRow(rowIndex).GetCell(50) == null) reportModel.GetRow(rowIndex).CreateCell(50);
|
|
if (!string.IsNullOrEmpty(itemOver.IFC_End_Mech_Equi))
|
|
{
|
|
reportModel.GetRow(rowIndex).GetCell(50).SetCellValue((DateTime)Convert.ToDateTime(itemOver.IFC_End_Mech_Equi.ToString()));
|
|
reportModel.GetRow(rowIndex).GetCell(50).CellStyle = styleDate;
|
|
}
|
|
if (reportModel.GetRow(rowIndex).GetCell(51) == null) reportModel.GetRow(rowIndex).CreateCell(51);
|
|
if (!string.IsNullOrEmpty(itemOver.IFC_Act_Mech_Equi))
|
|
{
|
|
reportModel.GetRow(rowIndex).GetCell(51).SetCellValue((DateTime)Convert.ToDateTime(itemOver.IFC_Act_Mech_Equi.ToString()));
|
|
reportModel.GetRow(rowIndex).GetCell(51).CellStyle = styleDate;
|
|
}
|
|
// Light_IFC_Mech_Equi
|
|
if (reportModel.GetRow(rowIndex).GetCell(52) == null) reportModel.GetRow(rowIndex).CreateCell(52);
|
|
if (itemOver.Light_IFC_Mech_Equi != null)
|
|
{
|
|
reportModel.GetRow(rowIndex).GetCell(52).SetCellValue((int)itemOver.Light_IFC_Mech_Equi.Value);
|
|
}
|
|
else
|
|
{
|
|
reportModel.GetRow(rowIndex).GetCell(52).SetCellValue("");
|
|
}
|
|
|
|
if (reportModel.GetRow(rowIndex).GetCell(53) == null) reportModel.GetRow(rowIndex).CreateCell(53);
|
|
if (!string.IsNullOrEmpty(itemOver.IFC_Start_Piping))
|
|
{
|
|
reportModel.GetRow(rowIndex).GetCell(53).SetCellValue((DateTime)Convert.ToDateTime(itemOver.IFC_Start_Piping.ToString()));
|
|
reportModel.GetRow(rowIndex).GetCell(53).CellStyle = styleDate;
|
|
}
|
|
if (reportModel.GetRow(rowIndex).GetCell(54) == null) reportModel.GetRow(rowIndex).CreateCell(54);
|
|
if (!string.IsNullOrEmpty(itemOver.IFC_End_Piping))
|
|
{
|
|
reportModel.GetRow(rowIndex).GetCell(54).SetCellValue((DateTime)Convert.ToDateTime(itemOver.IFC_End_Piping.ToString()));
|
|
reportModel.GetRow(rowIndex).GetCell(54).CellStyle = styleDate;
|
|
}
|
|
if (reportModel.GetRow(rowIndex).GetCell(55) == null) reportModel.GetRow(rowIndex).CreateCell(55);
|
|
if (!string.IsNullOrEmpty(itemOver.IFC_Act_Piping))
|
|
{
|
|
reportModel.GetRow(rowIndex).GetCell(55).SetCellValue((DateTime)Convert.ToDateTime(itemOver.IFC_Act_Piping.ToString()));
|
|
reportModel.GetRow(rowIndex).GetCell(55).CellStyle = styleDate;
|
|
}
|
|
// Light_IFC_Piping
|
|
if (reportModel.GetRow(rowIndex).GetCell(56) == null) reportModel.GetRow(rowIndex).CreateCell(56);
|
|
if (itemOver.Light_IFC_Piping != null)
|
|
{
|
|
reportModel.GetRow(rowIndex).GetCell(56).SetCellValue((int)itemOver.Light_IFC_Piping.Value);
|
|
}
|
|
else
|
|
{
|
|
reportModel.GetRow(rowIndex).GetCell(56).SetCellValue("");
|
|
}
|
|
|
|
if (reportModel.GetRow(rowIndex).GetCell(57) == null) reportModel.GetRow(rowIndex).CreateCell(57);
|
|
if (!string.IsNullOrEmpty(itemOver.IFC_Start_Electrical))
|
|
{
|
|
reportModel.GetRow(rowIndex).GetCell(57).SetCellValue((DateTime)Convert.ToDateTime(itemOver.IFC_Start_Electrical.ToString()));
|
|
reportModel.GetRow(rowIndex).GetCell(57).CellStyle = styleDate;
|
|
}
|
|
if (reportModel.GetRow(rowIndex).GetCell(58) == null) reportModel.GetRow(rowIndex).CreateCell(58);
|
|
if (!string.IsNullOrEmpty(itemOver.IFC_End_Electrical))
|
|
{
|
|
reportModel.GetRow(rowIndex).GetCell(58).SetCellValue((DateTime)Convert.ToDateTime(itemOver.IFC_End_Electrical.ToString()));
|
|
reportModel.GetRow(rowIndex).GetCell(58).CellStyle = styleDate;
|
|
}
|
|
if (reportModel.GetRow(rowIndex).GetCell(59) == null) reportModel.GetRow(rowIndex).CreateCell(59);
|
|
if (!string.IsNullOrEmpty(itemOver.IFC_Act_Electrical))
|
|
{
|
|
reportModel.GetRow(rowIndex).GetCell(59).SetCellValue((DateTime)Convert.ToDateTime(itemOver.IFC_Act_Electrical.ToString()));
|
|
reportModel.GetRow(rowIndex).GetCell(59).CellStyle = styleDate;
|
|
}
|
|
// Light_IFC_Mech_Equi
|
|
if (reportModel.GetRow(rowIndex).GetCell(60) == null) reportModel.GetRow(rowIndex).CreateCell(60);
|
|
if (itemOver.Light_IFC_Electrical != null)
|
|
{
|
|
reportModel.GetRow(rowIndex).GetCell(60).SetCellValue((int)itemOver.Light_IFC_Electrical.Value);
|
|
}
|
|
else
|
|
{
|
|
reportModel.GetRow(rowIndex).GetCell(60).SetCellValue("");
|
|
}
|
|
|
|
if (reportModel.GetRow(rowIndex).GetCell(61) == null) reportModel.GetRow(rowIndex).CreateCell(61);
|
|
if (!string.IsNullOrEmpty(itemOver.IFC_Start_Telecommunication))
|
|
{
|
|
reportModel.GetRow(rowIndex).GetCell(61).SetCellValue((DateTime)Convert.ToDateTime(itemOver.IFC_Start_Telecommunication.ToString()));
|
|
reportModel.GetRow(rowIndex).GetCell(61).CellStyle = styleDate;
|
|
}
|
|
if (reportModel.GetRow(rowIndex).GetCell(62) == null) reportModel.GetRow(rowIndex).CreateCell(62);
|
|
if (!string.IsNullOrEmpty(itemOver.IFC_End_Telecommunication))
|
|
{
|
|
reportModel.GetRow(rowIndex).GetCell(62).SetCellValue((DateTime)Convert.ToDateTime(itemOver.IFC_End_Telecommunication.ToString()));
|
|
reportModel.GetRow(rowIndex).GetCell(62).CellStyle = styleDate;
|
|
}
|
|
if (reportModel.GetRow(rowIndex).GetCell(63) == null) reportModel.GetRow(rowIndex).CreateCell(63);
|
|
if (!string.IsNullOrEmpty(itemOver.IFC_Act_Telecommunication))
|
|
{
|
|
reportModel.GetRow(rowIndex).GetCell(63).SetCellValue((DateTime)Convert.ToDateTime(itemOver.IFC_Act_Telecommunication.ToString()));
|
|
reportModel.GetRow(rowIndex).GetCell(63).CellStyle = styleDate;
|
|
}
|
|
// Light_IFC_Telecommunication
|
|
if (reportModel.GetRow(rowIndex).GetCell(64) == null) reportModel.GetRow(rowIndex).CreateCell(64);
|
|
if (itemOver.Light_IFC_Telecommunication != null)
|
|
{
|
|
reportModel.GetRow(rowIndex).GetCell(64).SetCellValue((int)itemOver.Light_IFC_Telecommunication.Value);
|
|
}
|
|
else
|
|
{
|
|
reportModel.GetRow(rowIndex).GetCell(64).SetCellValue("");
|
|
}
|
|
|
|
if (reportModel.GetRow(rowIndex).GetCell(65) == null) reportModel.GetRow(rowIndex).CreateCell(65);
|
|
if (!string.IsNullOrEmpty(itemOver.IFC_Start_Instrument))
|
|
{
|
|
reportModel.GetRow(rowIndex).GetCell(65).SetCellValue((DateTime)Convert.ToDateTime(itemOver.IFC_Start_Instrument.ToString()));
|
|
reportModel.GetRow(rowIndex).GetCell(65).CellStyle = styleDate;
|
|
}
|
|
if (reportModel.GetRow(rowIndex).GetCell(66) == null) reportModel.GetRow(rowIndex).CreateCell(66);
|
|
if (!string.IsNullOrEmpty(itemOver.IFC_End_Instrument))
|
|
{
|
|
reportModel.GetRow(rowIndex).GetCell(66).SetCellValue((DateTime)Convert.ToDateTime(itemOver.IFC_End_Instrument.ToString()));
|
|
reportModel.GetRow(rowIndex).GetCell(66).CellStyle = styleDate;
|
|
}
|
|
if (reportModel.GetRow(rowIndex).GetCell(67) == null) reportModel.GetRow(rowIndex).CreateCell(67);
|
|
if (!string.IsNullOrEmpty(itemOver.IFC_Act_Instrument))
|
|
{
|
|
reportModel.GetRow(rowIndex).GetCell(67).SetCellValue((DateTime)Convert.ToDateTime(itemOver.IFC_Act_Instrument.ToString()));
|
|
reportModel.GetRow(rowIndex).GetCell(67).CellStyle = styleDate;
|
|
}
|
|
// Light_IFC_Instrument
|
|
if (reportModel.GetRow(rowIndex).GetCell(68) == null) reportModel.GetRow(rowIndex).CreateCell(68);
|
|
if (itemOver.Light_IFC_Instrument != null)
|
|
{
|
|
reportModel.GetRow(rowIndex).GetCell(68).SetCellValue((int)itemOver.Light_IFC_Instrument.Value);
|
|
}
|
|
else
|
|
{
|
|
reportModel.GetRow(rowIndex).GetCell(68).SetCellValue("");
|
|
}
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Date_Plan_IFC
|
|
if (reportModel.GetRow(rowIndex).GetCell(69) == null) reportModel.GetRow(rowIndex).CreateCell(69);
|
|
if (!string.IsNullOrEmpty(itemOver.Date_Plan_IFC))
|
|
{
|
|
reportModel.GetRow(rowIndex).GetCell(69).SetCellValue((DateTime)Convert.ToDateTime(itemOver.Date_Plan_IFC.ToString()));
|
|
reportModel.GetRow(rowIndex).GetCell(69).CellStyle = styleDate;
|
|
}
|
|
// Date_Act_IFC
|
|
if (reportModel.GetRow(rowIndex).GetCell(70) == null) reportModel.GetRow(rowIndex).CreateCell(70);
|
|
if (!string.IsNullOrEmpty(itemOver.Date_Act_IFC))
|
|
{
|
|
reportModel.GetRow(rowIndex).GetCell(70).SetCellValue((DateTime)Convert.ToDateTime(itemOver.Date_Act_IFC.ToString()));
|
|
reportModel.GetRow(rowIndex).GetCell(70).CellStyle = styleDate;
|
|
}
|
|
// Light_IFC
|
|
if (reportModel.GetRow(rowIndex).GetCell(71) == null) reportModel.GetRow(rowIndex).CreateCell(71);
|
|
if (itemOver.Act_Plan_IFC != null)
|
|
{
|
|
reportModel.GetRow(rowIndex).GetCell(71).SetCellValue((int)itemOver.Act_Plan_IFC.Value);
|
|
}
|
|
else
|
|
{
|
|
reportModel.GetRow(rowIndex).GetCell(71).SetCellValue("");
|
|
}
|
|
// Act_Plan_IFC
|
|
//if (reportModel.GetRow(rowIndex).GetCell(34) == null) reportModel.GetRow(rowIndex).CreateCell(34);
|
|
//if (itemOver.Act_Plan_IFC != null)
|
|
//{
|
|
// reportModel.GetRow(rowIndex).GetCell(34).SetCellValue((int)itemOver.Act_Plan_IFC.Value);
|
|
//}
|
|
//else
|
|
//{
|
|
// reportModel.GetRow(rowIndex).GetCell(34).SetCellValue("");
|
|
//}
|
|
|
|
// Date_Plan_MC
|
|
if (reportModel.GetRow(rowIndex).GetCell(72) == null) reportModel.GetRow(rowIndex).CreateCell(72);
|
|
if (!string.IsNullOrEmpty(itemOver.Date_Plan_MC))
|
|
{
|
|
reportModel.GetRow(rowIndex).GetCell(72).SetCellValue((DateTime)Convert.ToDateTime(itemOver.Date_Plan_MC.ToString()));
|
|
reportModel.GetRow(rowIndex).GetCell(72).CellStyle = styleDate;
|
|
}
|
|
// Date_Act_MC
|
|
if (reportModel.GetRow(rowIndex).GetCell(73) == null) reportModel.GetRow(rowIndex).CreateCell(73);
|
|
if (!string.IsNullOrEmpty(itemOver.Date_Act_MC))
|
|
{
|
|
reportModel.GetRow(rowIndex).GetCell(73).SetCellValue((DateTime)Convert.ToDateTime(itemOver.Date_Act_MC.ToString()));
|
|
reportModel.GetRow(rowIndex).GetCell(73).CellStyle = styleDate;
|
|
}
|
|
// Light_MC
|
|
if (reportModel.GetRow(rowIndex).GetCell(74) == null) reportModel.GetRow(rowIndex).CreateCell(74);
|
|
if (itemOver.Act_Plan_MC != null)
|
|
{
|
|
reportModel.GetRow(rowIndex).GetCell(74).SetCellValue((int)itemOver.Act_Plan_MC.Value);
|
|
}
|
|
else
|
|
{
|
|
reportModel.GetRow(rowIndex).GetCell(74).SetCellValue("");
|
|
}
|
|
// Act_Plan_MC
|
|
//if (reportModel.GetRow(rowIndex).GetCell(38) == null) reportModel.GetRow(rowIndex).CreateCell(38);
|
|
//if (itemOver.Act_Plan_MC != null)
|
|
//{
|
|
// reportModel.GetRow(rowIndex).GetCell(38).SetCellValue((int)itemOver.Act_Plan_MC.Value);
|
|
//}
|
|
//else
|
|
//{
|
|
// reportModel.GetRow(rowIndex).GetCell(38).SetCellValue("");
|
|
//}
|
|
|
|
// Date_Act_Teco_Execution
|
|
if (reportModel.GetRow(rowIndex).GetCell(75) == null) reportModel.GetRow(rowIndex).CreateCell(75);
|
|
if (!string.IsNullOrEmpty(itemOver.Date_Act_Teco_Execution))
|
|
{
|
|
reportModel.GetRow(rowIndex).GetCell(75).SetCellValue((DateTime)Convert.ToDateTime(itemOver.Date_Act_Teco_Execution.ToString()));
|
|
reportModel.GetRow(rowIndex).GetCell(75).CellStyle = styleDate;
|
|
}
|
|
// Light_Act_Teco_Execution
|
|
if (reportModel.GetRow(rowIndex).GetCell(76) == null) reportModel.GetRow(rowIndex).CreateCell(76);
|
|
if (itemOver.Duration_Act_Teco_Execution != null)
|
|
{
|
|
reportModel.GetRow(rowIndex).GetCell(76).SetCellValue((int)itemOver.Duration_Act_Teco_Execution.Value);
|
|
}
|
|
else
|
|
{
|
|
reportModel.GetRow(rowIndex).GetCell(76).SetCellValue("");
|
|
}
|
|
// Duration_Act_Teco_Execution
|
|
//if (reportModel.GetRow(rowIndex).GetCell(41) == null) reportModel.GetRow(rowIndex).CreateCell(41);
|
|
//if (itemOver.Duration_Act_Teco_Execution != null)
|
|
//{
|
|
// reportModel.GetRow(rowIndex).GetCell(41).SetCellValue((int)itemOver.Duration_Act_Teco_Execution.Value);
|
|
//}
|
|
//else
|
|
//{
|
|
// reportModel.GetRow(rowIndex).GetCell(41).SetCellValue("");
|
|
//}
|
|
|
|
|
|
// Date_As_Built
|
|
if (reportModel.GetRow(rowIndex).GetCell(77) == null) reportModel.GetRow(rowIndex).CreateCell(77);
|
|
if (!string.IsNullOrEmpty(itemOver.Date_As_Built))
|
|
{
|
|
reportModel.GetRow(rowIndex).GetCell(77).SetCellValue((DateTime)Convert.ToDateTime(itemOver.Date_As_Built.ToString()));
|
|
reportModel.GetRow(rowIndex).GetCell(77).CellStyle = styleDate;
|
|
}
|
|
// Light_As_Built
|
|
if (reportModel.GetRow(rowIndex).GetCell(78) == null) reportModel.GetRow(rowIndex).CreateCell(78);
|
|
if (itemOver.Duration_As_Built != null)
|
|
{
|
|
reportModel.GetRow(rowIndex).GetCell(78).SetCellValue((int)itemOver.Duration_As_Built.Value);
|
|
}
|
|
else
|
|
{
|
|
reportModel.GetRow(rowIndex).GetCell(78).SetCellValue("");
|
|
}
|
|
// Duration_As_Built
|
|
//if (reportModel.GetRow(rowIndex).GetCell(45) == null) reportModel.GetRow(rowIndex).CreateCell(45);
|
|
//if (itemOver.Duration_As_Built != null)
|
|
//{
|
|
// reportModel.GetRow(rowIndex).GetCell(45).SetCellValue((int)itemOver.Duration_As_Built.Value);
|
|
//}
|
|
//else
|
|
//{
|
|
// reportModel.GetRow(rowIndex).GetCell(45).SetCellValue("");
|
|
//}
|
|
|
|
// Date_FC
|
|
if (reportModel.GetRow(rowIndex).GetCell(79) == null) reportModel.GetRow(rowIndex).CreateCell(79);
|
|
if (!string.IsNullOrEmpty(itemOver.Date_FC))
|
|
{
|
|
reportModel.GetRow(rowIndex).GetCell(79).SetCellValue((DateTime)Convert.ToDateTime(itemOver.Date_FC.ToString()));
|
|
reportModel.GetRow(rowIndex).GetCell(79).CellStyle = styleDate;
|
|
}
|
|
// IsNeedFC
|
|
if (reportModel.GetRow(rowIndex).GetCell(80) == null) reportModel.GetRow(rowIndex).CreateCell(80);
|
|
reportModel.GetRow(rowIndex).GetCell(80).SetCellValue(itemOver.IsNeedFC);
|
|
// Light_FC
|
|
if (reportModel.GetRow(rowIndex).GetCell(81) == null) reportModel.GetRow(rowIndex).CreateCell(81);
|
|
if (itemOver.Duration_FC != null)
|
|
{
|
|
reportModel.GetRow(rowIndex).GetCell(81).SetCellValue((int)itemOver.Duration_FC.Value);
|
|
}
|
|
else
|
|
{
|
|
reportModel.GetRow(rowIndex).GetCell(81).SetCellValue("");
|
|
}
|
|
// Duration_FC
|
|
//if (reportModel.GetRow(rowIndex).GetCell(49) == null) reportModel.GetRow(rowIndex).CreateCell(49);
|
|
//if (itemOver.Duration_FC != null)
|
|
//{
|
|
// reportModel.GetRow(rowIndex).GetCell(49).SetCellValue((int)itemOver.Duration_FC.Value);
|
|
//}
|
|
//else
|
|
//{
|
|
// reportModel.GetRow(rowIndex).GetCell(49).SetCellValue("");
|
|
//}
|
|
|
|
// Hold_Date
|
|
if (reportModel.GetRow(rowIndex).GetCell(82) == null) reportModel.GetRow(rowIndex).CreateCell(82);
|
|
if (!string.IsNullOrEmpty(itemOver.Hold_Date))
|
|
{
|
|
reportModel.GetRow(rowIndex).GetCell(82).SetCellValue((DateTime)Convert.ToDateTime(itemOver.Hold_Date.ToString()));
|
|
reportModel.GetRow(rowIndex).GetCell(82).CellStyle = styleDate;
|
|
}
|
|
|
|
// Cancel_Date
|
|
if (reportModel.GetRow(rowIndex).GetCell(83) == null) reportModel.GetRow(rowIndex).CreateCell(83);
|
|
if (!string.IsNullOrEmpty(itemOver.Cancel_Date))
|
|
{
|
|
reportModel.GetRow(rowIndex).GetCell(83).SetCellValue((DateTime)Convert.ToDateTime(itemOver.Cancel_Date.ToString()));
|
|
reportModel.GetRow(rowIndex).GetCell(83).CellStyle = styleDate;
|
|
}
|
|
|
|
// Delay by team1
|
|
if (reportModel.GetRow(rowIndex).GetCell(84) == null) reportModel.GetRow(rowIndex).CreateCell(84);
|
|
reportModel.GetRow(rowIndex).GetCell(84).SetCellValue(itemOver.Job_Delaybyteam1);
|
|
// Delay by personel1
|
|
if (reportModel.GetRow(rowIndex).GetCell(85) == null) reportModel.GetRow(rowIndex).CreateCell(85);
|
|
reportModel.GetRow(rowIndex).GetCell(85).SetCellValue(itemOver.Job_Delaybypersonel1);
|
|
// Remark1
|
|
if (reportModel.GetRow(rowIndex).GetCell(86) == null) reportModel.GetRow(rowIndex).CreateCell(86);
|
|
reportModel.GetRow(rowIndex).GetCell(86).SetCellValue(itemOver.Job_Remark1);
|
|
|
|
// Delay by team2
|
|
if (reportModel.GetRow(rowIndex).GetCell(87) == null) reportModel.GetRow(rowIndex).CreateCell(87);
|
|
reportModel.GetRow(rowIndex).GetCell(87).SetCellValue(itemOver.Job_Delaybyteam2);
|
|
// Delay by personel2
|
|
if (reportModel.GetRow(rowIndex).GetCell(88) == null) reportModel.GetRow(rowIndex).CreateCell(88);
|
|
reportModel.GetRow(rowIndex).GetCell(88).SetCellValue(itemOver.Job_Delaybypersonel2);
|
|
// Remark2
|
|
if (reportModel.GetRow(rowIndex).GetCell(89) == null) reportModel.GetRow(rowIndex).CreateCell(89);
|
|
reportModel.GetRow(rowIndex).GetCell(89).SetCellValue(itemOver.Job_Remark2);
|
|
|
|
// Delay by team3
|
|
if (reportModel.GetRow(rowIndex).GetCell(90) == null) reportModel.GetRow(rowIndex).CreateCell(90);
|
|
reportModel.GetRow(rowIndex).GetCell(90).SetCellValue(itemOver.Job_Delaybyteam3);
|
|
// Delay by personel3
|
|
if (reportModel.GetRow(rowIndex).GetCell(91) == null) reportModel.GetRow(rowIndex).CreateCell(91);
|
|
reportModel.GetRow(rowIndex).GetCell(91).SetCellValue(itemOver.Job_Delaybypersonel3);
|
|
// Remark3
|
|
if (reportModel.GetRow(rowIndex).GetCell(92) == null) reportModel.GetRow(rowIndex).CreateCell(92);
|
|
reportModel.GetRow(rowIndex).GetCell(92).SetCellValue(itemOver.Job_Remark3);
|
|
|
|
// Equivalent_Qty
|
|
if (reportModel.GetRow(rowIndex).GetCell(93) == null) reportModel.GetRow(rowIndex).CreateCell(93);
|
|
reportModel.GetRow(rowIndex).GetCell(93).SetCellValue(itemOver.Equivalent_Qty);
|
|
|
|
#endregion
|
|
rowIndex++;
|
|
}
|
|
}
|
|
#endregion
|
|
reportModel.ForceFormulaRecalculation = true;
|
|
|
|
using (FileStream filess = File.OpenWrite(ReportFileName))
|
|
{
|
|
hssfworkbook.Write(filess);
|
|
}
|
|
FileInfo filet = new FileInfo(ReportFileName);
|
|
Response.Clear();
|
|
Response.Charset = "GB2312";
|
|
Response.ContentEncoding = System.Text.Encoding.UTF8;
|
|
// 添加头信息,为"文件下载/另存为"对话框指定默认文件名
|
|
Response.AddHeader("Content-Disposition", "attachment; filename=CTEM_Job_List_" + Server.UrlEncode(DateTime.Now.ToString("yyyyMMddhhmmss") + ".xlsx"));
|
|
// 添加头信息,指定文件大小,让浏览器能够显示下载进度
|
|
Response.AddHeader("Content-Length", filet.Length.ToString());
|
|
// 指定返回的是一个不能被客户端读取的流,必须被下载
|
|
Response.ContentType = "application/ms-excel";
|
|
// 把文件流发送到客户端
|
|
Response.WriteFile(filet.FullName);
|
|
// 停止页面的执行
|
|
Response.End();
|
|
}
|
|
#endregion
|
|
|
|
#region 权限设置
|
|
/// <summary>
|
|
/// 菜单按钮权限
|
|
/// </summary>
|
|
private void GetButtonPower()
|
|
{
|
|
var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.UserId, BLL.Const.JobListReportMenuId);
|
|
if (buttonList.Count() > 0)
|
|
{
|
|
if (buttonList.Contains(BLL.Const.BtnOut))
|
|
{
|
|
this.btnExport.Hidden = false;
|
|
}
|
|
}
|
|
}
|
|
#endregion
|
|
}
|
|
} |