1
0
Fork 0
master
嘉祥 詹 2024-10-14 17:54:17 +08:00
parent e64e1727b5
commit 3a8252c3a2
3 changed files with 16 additions and 3 deletions

View File

@ -139,13 +139,25 @@ namespace QuotationMaker.Controllers
XSSFCellStyle copyTempCellStyle = (XSSFCellStyle)workbook.CreateCellStyle(); XSSFCellStyle copyTempCellStyle = (XSSFCellStyle)workbook.CreateCellStyle();
// Copy style from old cell and apply to new cell // Copy style from old cell and apply to new cell
XSSFCellStyle copyTempCellFloatStyle = (XSSFCellStyle)workbook.CreateCellStyle(); XSSFCellStyle copyTempCellFloatStyle = (XSSFCellStyle)workbook.CreateCellStyle();
//估價單總價項目 //估價單總價項目
row = (XSSFRow)sheet.GetRow(11); row = (XSSFRow)sheet.GetRow(11);
copyTempCellStyle.CloneStyleFrom(row.Cells[6].CellStyle); copyTempCellStyle.CloneStyleFrom(row.Cells[6].CellStyle);
copyTempCellFloatStyle.CloneStyleFrom(row.Cells[6].CellStyle); copyTempCellFloatStyle.CloneStyleFrom(row.Cells[6].CellStyle);
copyTempCellStyle.DataFormat = workbook.CreateDataFormat().GetFormat("\"NTD \"#,##0"); copyTempCellStyle.DataFormat = workbook.CreateDataFormat().GetFormat("#,##0");
copyTempCellFloatStyle.DataFormat = workbook.CreateDataFormat().GetFormat("\"NTD \"#,##0.#"); copyTempCellFloatStyle.DataFormat = workbook.CreateDataFormat().GetFormat("#,##0.#");
copyTempCellStyle.BorderTop = BorderStyle.Thin;
copyTempCellStyle.BorderRight = BorderStyle.Thin;
copyTempCellStyle.BorderBottom = BorderStyle.Thin;
copyTempCellStyle.BorderLeft = BorderStyle.Thin;
copyTempCellFloatStyle.BorderTop = BorderStyle.Thin;
copyTempCellFloatStyle.BorderRight = BorderStyle.Thin;
copyTempCellFloatStyle.BorderBottom = BorderStyle.Thin;
copyTempCellFloatStyle.BorderLeft = BorderStyle.Thin;
//copyTempCellFloatStyle.BorderDiagonalLineStyle= BorderStyle.None;
row.Cells[6].SetCellType(CellType.Numeric); row.Cells[6].SetCellType(CellType.Numeric);
row.Cells[6].SetCellValue(objDetail.quotation_noTaxTotal); row.Cells[6].SetCellValue(objDetail.quotation_noTaxTotal);
@ -468,6 +480,7 @@ namespace QuotationMaker.Controllers
row.Cells[6].SetCellType(CellType.Numeric); row.Cells[6].SetCellType(CellType.Numeric);
row.Cells[6].SetCellValue(objMain.quotationMainItem_subTotal); row.Cells[6].SetCellValue(objMain.quotationMainItem_subTotal);
row.Cells[6].CellStyle = copyTempCellStyle; row.Cells[6].CellStyle = copyTempCellStyle;
row.ZeroHeight = true;
rowCount++; rowCount++;
editRowIndex++; editRowIndex++;
//break; //break;
@ -1916,7 +1929,7 @@ namespace QuotationMaker.Controllers
if (token.user_id != GlobalClass.appsettings("Admin:id")) if (token.user_id != GlobalClass.appsettings("Admin:id"))
{ {
ret.quotationViews = conn.Query<quotationView>("select * from quotationView where quotationView_isdel = 'N' and quotationView_revoke = 'N' and project_uid = @project_uid and quotation_create_uid in (@user_list) order by quotation_modifydate desc", new { project_uid = project_uid, user_list = user_uid_list }).ToList(); ret.quotationViews = conn.Query<quotationView>("select * from quotationView where quotation_isdel = 'N' and quotation_revoke = 'N' and project_uid = @project_uid and quotation_create_uid in (@user_list) order by quotation_modifydate desc", new { project_uid = project_uid, user_list = user_uid_list }).ToList();
} }
else { else {

Binary file not shown.

Binary file not shown.