..
This commit is contained in:
@@ -23,7 +23,7 @@ namespace FEQ0000
|
||||
{
|
||||
//기본엑셀파일을 가져온다
|
||||
this.Show();
|
||||
this.bs1.Sort = "sc desc,requestname,sid,pumname";
|
||||
this.bs1.Sort = "sc,sid,pumname";
|
||||
this.bs1.Filter = "sc <> ''";
|
||||
Application.DoEvents();
|
||||
|
||||
@@ -31,11 +31,19 @@ namespace FEQ0000
|
||||
LoadExcel();
|
||||
|
||||
//순번맥기기
|
||||
var sumamt = ds1.Purchase.Where(t=>t.sc != "").Sum(t => t.pumamt);
|
||||
for (int r = 0; r < this.fpSpread1.ActiveSheet.RowCount; r++)
|
||||
{
|
||||
fpSpread1.ActiveSheet.Cells[r, 0].Value = r+1;
|
||||
fpSpread1.ActiveSheet.Cells[r, 0].Value = r + 1;
|
||||
|
||||
}
|
||||
|
||||
//마지막 한줄 추가하고 합계
|
||||
fpSpread1.ActiveSheet.AddUnboundRows(fpSpread1.ActiveSheet.RowCount, 1);
|
||||
fpSpread1.ActiveSheet.Cells[$"J{fpSpread1.ActiveSheet.RowCount}"].Value = sumamt;
|
||||
fpSpread1.ActiveSheet.Cells[$"B{fpSpread1.ActiveSheet.RowCount}"].Value = "Total";
|
||||
fpSpread1.ActiveSheet.Cells[$"A{fpSpread1.ActiveSheet.RowCount}:L{fpSpread1.ActiveSheet.RowCount}"].BackColor = Color.FromArgb(220, 220, 220);
|
||||
|
||||
}
|
||||
|
||||
void LoadExcel()
|
||||
|
||||
Reference in New Issue
Block a user