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