Compare commits

..

No commits in common. "05e9432c5b900df687e4f558079f07274dfca994" and "2d5e6785f107d1b96c2e18d85fe2faf3656a6c55" have entirely different histories.

1 changed files with 16 additions and 25 deletions

View File

@ -535,31 +535,22 @@ namespace FineUIPro.Web.PZHGL.GJSX
cell.CellStyle = cellStyle; cell.CellStyle = cellStyle;
cell.SetCellValue(tb.Rows[j]["GJSXTypeName"].ToString()); cell.SetCellValue(tb.Rows[j]["GJSXTypeName"].ToString());
cell = row.CreateCell(6); cell = row.CreateCell(6);
var stateCellStyle = cellStyle;
NPOI.SS.UserModel.ICellStyle stateCellStyle = workbook.CreateCellStyle(); //if (state == "0")
stateCellStyle.BorderTop = NPOI.SS.UserModel.BorderStyle.Thin; //{
stateCellStyle.BorderRight = NPOI.SS.UserModel.BorderStyle.Thin; // stateCellStyle.FillForegroundColor = IndexedColors.Green.Index;
stateCellStyle.BorderBottom = NPOI.SS.UserModel.BorderStyle.Thin; // //stateCellStyle.FillBackgroundColor = IndexedColors.Green.Index;
stateCellStyle.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin; //}
stateCellStyle.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center; //else if (state == "2" || state == "3")
stateCellStyle.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center; //{
stateCellStyle.WrapText = true; // //stateCellStyle.FillForegroundColor = IndexedColors.Blue.Index;
stateCellStyle.SetFont(font); // stateCellStyle.FillBackgroundColor = IndexedColors.Blue.Index;
if (state == "0") //}
{ //else if (state == "4")
stateCellStyle.FillForegroundColor = IndexedColors.Green.Index; //{
stateCellStyle.FillPattern = FillPattern.SolidForeground; // 填充方式 // //stateCellStyle.FillForegroundColor = IndexedColors.Red.Index;
} // stateCellStyle.FillBackgroundColor = IndexedColors.Red.Index;
else if (state == "2" || state == "3") //}
{
stateCellStyle.FillForegroundColor = IndexedColors.SkyBlue.Index;
stateCellStyle.FillPattern = FillPattern.SolidForeground; // 填充方式
}
else if (state == "4")
{
stateCellStyle.FillForegroundColor = IndexedColors.Red.Index;
stateCellStyle.FillPattern = FillPattern.SolidForeground; // 填充方式
}
cell.CellStyle = stateCellStyle; cell.CellStyle = stateCellStyle;
cell.SetCellValue(tb.Rows[j]["StateStr"].ToString()); cell.SetCellValue(tb.Rows[j]["StateStr"].ToString());
cell = row.CreateCell(7); cell = row.CreateCell(7);