diff --git a/Controllers/Budget.Controller.cs b/Controllers/Budget.Controller.cs index 064d291..96fcacc 100644 --- a/Controllers/Budget.Controller.cs +++ b/Controllers/Budget.Controller.cs @@ -2110,37 +2110,37 @@ namespace rmutr_report.Controllers int r1 = 1; int r2 = 2; - var sum1 = revenue_estimate.revenue_estimates_details.Where(j=>j.topic_type==3).Sum(d => d.revenue_estimates); - var sum2 = revenue_estimate.revenue_estimates_details.Where(j=>j.topic_type==3).Sum(d => d.less_revenue_estimates); - var sum3 = revenue_estimate.revenue_estimates_details.Where(j=>j.topic_type==3).Sum(d => d.balance_revenue_estimates); - var sum4 = revenue_estimate.revenue_estimates_details.Where(j=>j.topic_type==3).Sum(d => d.less_accumulated_income); - var sum5 = revenue_estimate.revenue_estimates_details.Where(j=>j.topic_type==3).Sum(d => d.balance_before_allocating_according); - var sum6 = revenue_estimate.revenue_estimates_details.Where(j=>j.topic_type==3).Sum(d => d.contribution_utility_bills); - var sum7 = revenue_estimate.revenue_estimates_details.Where(j=>j.topic_type==3).Sum(d => d.contribution_central_budget); - var sum8 = revenue_estimate.revenue_estimates_details.Where(j=>j.topic_type==3).Sum(d => d.contribution_central_expenditure); - var sum9 = revenue_estimate.revenue_estimates_details.Where(j=>j.topic_type==3).Sum(d => d.expenditure_limit); + // var sum1 = revenue_estimate.revenue_estimates_details.Where(j=>j.topic_type==3).Sum(d => d.revenue_estimates); + // var sum2 = revenue_estimate.revenue_estimates_details.Where(j=>j.topic_type==3).Sum(d => d.less_revenue_estimates); + // var sum3 = revenue_estimate.revenue_estimates_details.Where(j=>j.topic_type==3).Sum(d => d.balance_revenue_estimates); + // var sum4 = revenue_estimate.revenue_estimates_details.Where(j=>j.topic_type==3).Sum(d => d.less_accumulated_income); + // var sum5 = revenue_estimate.revenue_estimates_details.Where(j=>j.topic_type==3).Sum(d => d.balance_before_allocating_according); + // var sum6 = revenue_estimate.revenue_estimates_details.Where(j=>j.topic_type==3).Sum(d => d.contribution_utility_bills); + // var sum7 = revenue_estimate.revenue_estimates_details.Where(j=>j.topic_type==3).Sum(d => d.contribution_central_budget); + // var sum8 = revenue_estimate.revenue_estimates_details.Where(j=>j.topic_type==3).Sum(d => d.contribution_central_expenditure); + // var sum9 = revenue_estimate.revenue_estimates_details.Where(j=>j.topic_type==3).Sum(d => d.expenditure_limit); foreach (var detail in revenue_estimate.revenue_estimates_details) { if (detail.topic_type == 1) { ws.Cell(row, 1).Value = detail.topic; - ws.Cell(row, 2).Value = sum1;//data1.Sum(d => d.revenue_estimates); + ws.Cell(row, 2).Value = detail.revenue_estimates; ws.Cell(row, 3).Value = "บาท"; - ws.Cell(row, 4).Value = sum2;//data1.Sum(d => d.less_revenue_estimates); + ws.Cell(row, 4).Value = detail.less_revenue_estimates; ws.Cell(row, 5).Value = "บาท"; - ws.Cell(row, 6).Value = sum3;//data1.Sum(d => d.balance_revenue_estimates); + ws.Cell(row, 6).Value = detail.balance_revenue_estimates; ws.Cell(row, 7).Value = "บาท"; - ws.Cell(row, 8).Value = sum4;//data1.Sum(d => d.less_accumulated_income); + ws.Cell(row, 8).Value = detail.less_accumulated_income; ws.Cell(row, 9).Value = "บาท"; - ws.Cell(row, 10).Value = sum5;//data1.Sum(d => d.balance_before_allocating_according); + ws.Cell(row, 10).Value = detail.balance_before_allocating_according; ws.Cell(row, 11).Value = "บาท"; - ws.Cell(row, 12).Value = sum6;//data1.Sum(d => d.contribution_utility_bills); + ws.Cell(row, 12).Value = detail.contribution_utility_bills; ws.Cell(row, 13).Value = "บาท"; - ws.Cell(row, 14).Value = sum7;//data1.Sum(d => d.contribution_central_budget); + ws.Cell(row, 14).Value = detail.contribution_central_budget; ws.Cell(row, 15).Value = "บาท"; - ws.Cell(row, 16).Value = sum8;//data1.Sum(d => d.contribution_central_expenditure); + ws.Cell(row, 16).Value = detail.contribution_central_expenditure; ws.Cell(row, 17).Value = "บาท"; - ws.Cell(row, 18).Value = sum9;//data1.Sum(d => d.expenditure_limit); + ws.Cell(row, 18).Value = detail.expenditure_limit; ws.Cell(row, 19).Value = "บาท"; ws.Range(ws.Cell(row, 1), ws.Cell(row, 19)).Style.Font.FontName = @@ -2193,23 +2193,23 @@ namespace rmutr_report.Controllers if (detail.topic_type == 2) { ws.Cell(row, 1).Value = detail.topic; - ws.Cell(row, 2).Value = sum1;//data1.Sum(d => d.revenue_estimates); + ws.Cell(row, 2).Value = detail.revenue_estimates; ws.Cell(row, 3).Value = "บาท"; - ws.Cell(row, 4).Value = sum2;//data1.Sum(d => d.less_revenue_estimates); + ws.Cell(row, 4).Value = detail.less_revenue_estimates; ws.Cell(row, 5).Value = "บาท"; - ws.Cell(row, 6).Value = sum3;//data1.Sum(d => d.balance_revenue_estimates); + ws.Cell(row, 6).Value = detail.balance_revenue_estimates; ws.Cell(row, 7).Value = "บาท"; - ws.Cell(row, 8).Value = sum4;//data1.Sum(d => d.less_accumulated_income); + ws.Cell(row, 8).Value = detail.less_accumulated_income; ws.Cell(row, 9).Value = "บาท"; - ws.Cell(row, 10).Value = sum5;//data1.Sum(d => d.balance_before_allocating_according); + ws.Cell(row, 10).Value = detail.balance_before_allocating_according; ws.Cell(row, 11).Value = "บาท"; - ws.Cell(row, 12).Value = sum6;//data1.Sum(d => d.contribution_utility_bills); + ws.Cell(row, 12).Value = detail.contribution_utility_bills; ws.Cell(row, 13).Value = "บาท"; - ws.Cell(row, 14).Value = sum7;//data1.Sum(d => d.contribution_central_budget); + ws.Cell(row, 14).Value = detail.contribution_central_budget; ws.Cell(row, 15).Value = "บาท"; - ws.Cell(row, 16).Value = sum8;//data1.Sum(d => d.contribution_central_expenditure); + ws.Cell(row, 16).Value = detail.contribution_central_expenditure; ws.Cell(row, 17).Value = "บาท"; - ws.Cell(row, 18).Value = sum9;//data1.Sum(d => d.expenditure_limit); + ws.Cell(row, 18).Value = detail.expenditure_limit; ws.Cell(row, 19).Value = "บาท"; ws.Range(ws.Cell(row, 1), ws.Cell(row, 19)).Style.Font.FontName = @@ -2328,23 +2328,23 @@ namespace rmutr_report.Controllers if (detail.topic_type == 4) { ws.Cell(row, 1).Value = "รวม"; - ws.Cell(row, 2).Value = sum1;//data1.Sum(d => d.revenue_estimates); + ws.Cell(row, 2).Value = detail.revenue_estimates; ws.Cell(row, 3).Value = "บาท"; - ws.Cell(row, 4).Value = sum2;//data1.Sum(d => d.less_revenue_estimates); + ws.Cell(row, 4).Value = detail.less_revenue_estimates; ws.Cell(row, 5).Value = "บาท"; - ws.Cell(row, 6).Value = sum3;//data1.Sum(d => d.balance_revenue_estimates); + ws.Cell(row, 6).Value = detail.balance_revenue_estimates; ws.Cell(row, 7).Value = "บาท"; - ws.Cell(row, 8).Value = sum4;//data1.Sum(d => d.less_accumulated_income); + ws.Cell(row, 8).Value = detail.less_accumulated_income; ws.Cell(row, 9).Value = "บาท"; - ws.Cell(row, 10).Value = sum5;//data1.Sum(d => d.balance_before_allocating_according); + ws.Cell(row, 10).Value = detail.balance_before_allocating_according; ws.Cell(row, 11).Value = "บาท"; - ws.Cell(row, 12).Value = sum6;//data1.Sum(d => d.contribution_utility_bills); + ws.Cell(row, 12).Value = detail.contribution_utility_bills; ws.Cell(row, 13).Value = "บาท"; - ws.Cell(row, 14).Value = sum7;//data1.Sum(d => d.contribution_central_budget); + ws.Cell(row, 14).Value = detail.contribution_central_budget; ws.Cell(row, 15).Value = "บาท"; - ws.Cell(row, 16).Value = sum8;//data1.Sum(d => d.contribution_central_expenditure); + ws.Cell(row, 16).Value = detail.contribution_central_expenditure; ws.Cell(row, 17).Value = "บาท"; - ws.Cell(row, 18).Value = sum9;//data1.Sum(d => d.expenditure_limit); + ws.Cell(row, 18).Value = detail.expenditure_limit; ws.Cell(row, 19).Value = "บาท"; ws.Range(ws.Cell(row, 1), ws.Cell(row, 19)).Style.Font.FontName = diff --git a/bin/Debug/net5.0/rmutr_report.dll b/bin/Debug/net5.0/rmutr_report.dll index 70c0fd5..5b45468 100644 Binary files a/bin/Debug/net5.0/rmutr_report.dll and b/bin/Debug/net5.0/rmutr_report.dll differ diff --git a/bin/Debug/net5.0/rmutr_report.pdb b/bin/Debug/net5.0/rmutr_report.pdb index 7aad1c1..07f0bc8 100644 Binary files a/bin/Debug/net5.0/rmutr_report.pdb and b/bin/Debug/net5.0/rmutr_report.pdb differ diff --git a/obj/Debug/net5.0/ref/rmutr_report.dll b/obj/Debug/net5.0/ref/rmutr_report.dll index 0deaddd..6b17bdf 100644 Binary files a/obj/Debug/net5.0/ref/rmutr_report.dll and b/obj/Debug/net5.0/ref/rmutr_report.dll differ diff --git a/obj/Debug/net5.0/refint/rmutr_report.dll b/obj/Debug/net5.0/refint/rmutr_report.dll index 0deaddd..6b17bdf 100644 Binary files a/obj/Debug/net5.0/refint/rmutr_report.dll and b/obj/Debug/net5.0/refint/rmutr_report.dll differ diff --git a/obj/Debug/net5.0/rmutr_report.dll b/obj/Debug/net5.0/rmutr_report.dll index 70c0fd5..5b45468 100644 Binary files a/obj/Debug/net5.0/rmutr_report.dll and b/obj/Debug/net5.0/rmutr_report.dll differ diff --git a/obj/Debug/net5.0/rmutr_report.pdb b/obj/Debug/net5.0/rmutr_report.pdb index 7aad1c1..07f0bc8 100644 Binary files a/obj/Debug/net5.0/rmutr_report.pdb and b/obj/Debug/net5.0/rmutr_report.pdb differ