전자실 자료 입력화면 dialog 방식 해제
This commit is contained in:
@@ -40,7 +40,7 @@ namespace FPJ0000
|
||||
|
||||
|
||||
//order by 절은 다시 생성한다.
|
||||
var SSQl = " select ItemGroup,option1,ItemSupply,sum(amt) as amt " +
|
||||
var SSQl = " select ItemGroup,option1,ItemSupply,sum(amt) as amt ,sum(amtn) as amtn " +
|
||||
" from projectspart" +
|
||||
" where Project = " + this.ProjectIndex.ToString() +
|
||||
" group by ItemGroup,option1,ItemSupply" +
|
||||
@@ -59,6 +59,12 @@ namespace FPJ0000
|
||||
decimal sum = 0;
|
||||
decimal sum2 = 0;
|
||||
decimal sum3 = 0;
|
||||
|
||||
decimal sumn = 0;
|
||||
decimal sumn2 = 0;
|
||||
decimal sumn3 = 0;
|
||||
|
||||
|
||||
Boolean first = true;
|
||||
int grp2cnt = 0;
|
||||
int spanStart = 0;
|
||||
@@ -70,6 +76,7 @@ namespace FPJ0000
|
||||
foreach (dsReport.PartSummaryRow dr in dsReport1.PartSummary.Rows)
|
||||
{
|
||||
sum3 += dr.amt;
|
||||
sumn3 += dr.amtn;
|
||||
if (first)
|
||||
{
|
||||
grp1 = dr.ItemGroup.Trim();
|
||||
@@ -81,9 +88,14 @@ namespace FPJ0000
|
||||
this.fpSpread1_Sheet1.Cells[this.fpSpread1_Sheet1.RowCount - 1, 1].Value = grp2;
|
||||
this.fpSpread1_Sheet1.Cells[this.fpSpread1_Sheet1.RowCount - 1, 2].Value = dr.ItemSupply;
|
||||
this.fpSpread1_Sheet1.Cells[this.fpSpread1_Sheet1.RowCount - 1, 3].Value = dr.amt;
|
||||
this.fpSpread1_Sheet1.Cells[this.fpSpread1_Sheet1.RowCount - 1, 4].Value = dr.amtn;
|
||||
this.fpSpread1_Sheet1.Cells[this.fpSpread1_Sheet1.RowCount - 1, 1].HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Center;
|
||||
sum = dr.amt;
|
||||
sum2 = dr.amt;
|
||||
|
||||
sumn = dr.amtn;
|
||||
sumn2 = dr.amtn;
|
||||
|
||||
first = false;
|
||||
grp2cnt = 0;
|
||||
}
|
||||
@@ -100,6 +112,9 @@ namespace FPJ0000
|
||||
this.fpSpread1_Sheet1.Cells[this.fpSpread1_Sheet1.RowCount - 1, 1].Value = "소계(" + grp2 + ")";
|
||||
this.fpSpread1_Sheet1.Cells[this.fpSpread1_Sheet1.RowCount - 1, 2].Value = "";
|
||||
this.fpSpread1_Sheet1.Cells[this.fpSpread1_Sheet1.RowCount - 1, 3].Value = sum2;
|
||||
this.fpSpread1_Sheet1.Cells[this.fpSpread1_Sheet1.RowCount - 1, 4].Value = sumn2;
|
||||
|
||||
|
||||
this.fpSpread1_Sheet1.Cells[this.fpSpread1_Sheet1.RowCount - 1, 1].BackColor = Color.FromArgb(240, 240, 240);
|
||||
this.fpSpread1_Sheet1.Cells[this.fpSpread1_Sheet1.RowCount - 1, 2].BackColor = Color.FromArgb(240, 240, 240);
|
||||
this.fpSpread1_Sheet1.Cells[this.fpSpread1_Sheet1.RowCount - 1, 3].BackColor = Color.FromArgb(240, 240, 240);
|
||||
@@ -126,6 +141,7 @@ namespace FPJ0000
|
||||
this.fpSpread1_Sheet1.Cells[this.fpSpread1_Sheet1.RowCount - 1, 1].Value = "";
|
||||
this.fpSpread1_Sheet1.Cells[this.fpSpread1_Sheet1.RowCount - 1, 2].Value = "";
|
||||
this.fpSpread1_Sheet1.Cells[this.fpSpread1_Sheet1.RowCount - 1, 3].Value = sum;
|
||||
this.fpSpread1_Sheet1.Cells[this.fpSpread1_Sheet1.RowCount - 1, 4].Value = sumn;
|
||||
this.fpSpread1_Sheet1.Rows[this.fpSpread1_Sheet1.RowCount - 1].BackColor = Color.FromArgb(220, 220, 220);
|
||||
|
||||
//중분류가 변경되었으므로 처음 줄부터 지금 줄까지 스팬을 건다
|
||||
@@ -140,6 +156,10 @@ namespace FPJ0000
|
||||
spanStart2 = this.fpSpread1_Sheet1.RowCount;
|
||||
sum = 0;
|
||||
sum2 = 0;
|
||||
|
||||
sumn = 0;
|
||||
sumn2 = 0;
|
||||
|
||||
grp1 = dr.ItemGroup.Trim();
|
||||
grp2 = dr.option1.Trim();
|
||||
grp2cnt = 0;
|
||||
@@ -156,6 +176,8 @@ namespace FPJ0000
|
||||
this.fpSpread1_Sheet1.Cells[this.fpSpread1_Sheet1.RowCount - 1, 1].Value = "소계(" + grp2 + ")";// ;
|
||||
this.fpSpread1_Sheet1.Cells[this.fpSpread1_Sheet1.RowCount - 1, 2].Value = "";
|
||||
this.fpSpread1_Sheet1.Cells[this.fpSpread1_Sheet1.RowCount - 1, 3].Value = sum2;
|
||||
this.fpSpread1_Sheet1.Cells[this.fpSpread1_Sheet1.RowCount - 1, 4].Value = sumn2;
|
||||
|
||||
this.fpSpread1_Sheet1.Cells[this.fpSpread1_Sheet1.RowCount - 1, 1].BackColor = Color.FromArgb(240, 240, 240);
|
||||
this.fpSpread1_Sheet1.Cells[this.fpSpread1_Sheet1.RowCount - 1, 2].BackColor = Color.FromArgb(240, 240, 240);
|
||||
this.fpSpread1_Sheet1.Cells[this.fpSpread1_Sheet1.RowCount - 1, 3].BackColor = Color.FromArgb(240, 240, 240);
|
||||
@@ -176,6 +198,7 @@ namespace FPJ0000
|
||||
grp2cnt = 1;
|
||||
spanStart2 = this.fpSpread1_Sheet1.RowCount;
|
||||
sum2 = 0;
|
||||
sumn2 = 0;
|
||||
grp2 = dr.option1.Trim();
|
||||
|
||||
}
|
||||
@@ -186,11 +209,17 @@ namespace FPJ0000
|
||||
this.fpSpread1_Sheet1.Cells[this.fpSpread1_Sheet1.RowCount - 1, 1].Value = grp2;
|
||||
this.fpSpread1_Sheet1.Cells[this.fpSpread1_Sheet1.RowCount - 1, 2].Value = dr.ItemSupply;
|
||||
this.fpSpread1_Sheet1.Cells[this.fpSpread1_Sheet1.RowCount - 1, 3].Value = dr.amt;
|
||||
this.fpSpread1_Sheet1.Cells[this.fpSpread1_Sheet1.RowCount - 1, 4].Value = dr.amtn;
|
||||
|
||||
this.fpSpread1_Sheet1.Cells[this.fpSpread1_Sheet1.RowCount - 1, 1].HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Center;
|
||||
cnt++;
|
||||
|
||||
sum += dr.amt;
|
||||
sum2 += dr.amt;
|
||||
|
||||
sumn += dr.amtn;
|
||||
sumn2 += dr.amtn;
|
||||
|
||||
//grp2cnt += 1;
|
||||
}
|
||||
}
|
||||
@@ -204,6 +233,8 @@ namespace FPJ0000
|
||||
this.fpSpread1_Sheet1.Cells[this.fpSpread1_Sheet1.RowCount - 1, 1].Value = "소계(" + grp2 + ")";
|
||||
this.fpSpread1_Sheet1.Cells[this.fpSpread1_Sheet1.RowCount - 1, 2].Value = "";
|
||||
this.fpSpread1_Sheet1.Cells[this.fpSpread1_Sheet1.RowCount - 1, 3].Value = sum2;
|
||||
this.fpSpread1_Sheet1.Cells[this.fpSpread1_Sheet1.RowCount - 1, 4].Value = sumn2;
|
||||
|
||||
this.fpSpread1_Sheet1.Cells[this.fpSpread1_Sheet1.RowCount - 1, 1].BackColor = Color.FromArgb(240, 240, 240);
|
||||
this.fpSpread1_Sheet1.Cells[this.fpSpread1_Sheet1.RowCount - 1, 2].BackColor = Color.FromArgb(240, 240, 240);
|
||||
this.fpSpread1_Sheet1.Cells[this.fpSpread1_Sheet1.RowCount - 1, 3].BackColor = Color.FromArgb(240, 240, 240);
|
||||
@@ -231,6 +262,8 @@ namespace FPJ0000
|
||||
this.fpSpread1_Sheet1.Cells[this.fpSpread1_Sheet1.RowCount - 1, 1].Value = "";
|
||||
this.fpSpread1_Sheet1.Cells[this.fpSpread1_Sheet1.RowCount - 1, 2].Value = "";
|
||||
this.fpSpread1_Sheet1.Cells[this.fpSpread1_Sheet1.RowCount - 1, 3].Value = sum;
|
||||
this.fpSpread1_Sheet1.Cells[this.fpSpread1_Sheet1.RowCount - 1, 4].Value = sumn;
|
||||
|
||||
this.fpSpread1_Sheet1.Rows[this.fpSpread1_Sheet1.RowCount - 1].BackColor = Color.FromArgb(220, 220, 220);
|
||||
|
||||
var spanRows2 = (this.fpSpread1_Sheet1.RowCount - spanStart - 1);
|
||||
@@ -242,6 +275,8 @@ namespace FPJ0000
|
||||
this.fpSpread1_Sheet1.Cells[this.fpSpread1_Sheet1.RowCount - 1, 1].Value = "";
|
||||
this.fpSpread1_Sheet1.Cells[this.fpSpread1_Sheet1.RowCount - 1, 2].Value = "";
|
||||
this.fpSpread1_Sheet1.Cells[this.fpSpread1_Sheet1.RowCount - 1, 3].Value = sum3;
|
||||
this.fpSpread1_Sheet1.Cells[this.fpSpread1_Sheet1.RowCount - 1, 4].Value = sumn3;
|
||||
|
||||
this.fpSpread1_Sheet1.Rows[this.fpSpread1_Sheet1.RowCount - 1].BackColor = Color.LightSkyBlue;
|
||||
|
||||
this.fpSpread1.ResumeLayout();
|
||||
|
||||
Reference in New Issue
Block a user