전자실 자료 입력화면 dialog 방식 해제

This commit is contained in:
chi
2021-02-05 08:29:14 +09:00
parent 8fbee34f90
commit 0e4f3d84d4
12 changed files with 292 additions and 206 deletions

View File

@@ -36,9 +36,10 @@
System.Windows.Forms.Label edateLabel;
System.Windows.Forms.Label odateLabel;
System.Windows.Forms.Label statusLabel;
FarPoint.Win.Spread.CellType.TextCellType textCellType4 = new FarPoint.Win.Spread.CellType.TextCellType();
FarPoint.Win.Spread.CellType.TextCellType textCellType5 = new FarPoint.Win.Spread.CellType.TextCellType();
FarPoint.Win.Spread.CellType.TextCellType textCellType6 = new FarPoint.Win.Spread.CellType.TextCellType();
FarPoint.Win.Spread.CellType.TextCellType textCellType1 = new FarPoint.Win.Spread.CellType.TextCellType();
FarPoint.Win.Spread.CellType.TextCellType textCellType2 = new FarPoint.Win.Spread.CellType.TextCellType();
FarPoint.Win.Spread.CellType.TextCellType textCellType3 = new FarPoint.Win.Spread.CellType.TextCellType();
FarPoint.Win.Spread.CellType.NumberCellType numberCellType1 = new FarPoint.Win.Spread.CellType.NumberCellType();
FarPoint.Win.Spread.CellType.NumberCellType numberCellType2 = new FarPoint.Win.Spread.CellType.NumberCellType();
this.dsPRJ = new FPJ0000.dsPRJ();
this.fpSpread1 = new FarPoint.Win.Spread.FpSpread();
@@ -156,7 +157,7 @@
this.fpSpread1.Name = "fpSpread1";
this.fpSpread1.Sheets.AddRange(new FarPoint.Win.Spread.SheetView[] {
this.fpSpread1_Sheet1});
this.fpSpread1.Size = new System.Drawing.Size(703, 599);
this.fpSpread1.Size = new System.Drawing.Size(915, 599);
this.fpSpread1.StatusBarVisible = true;
this.fpSpread1.TabIndex = 6;
//
@@ -217,7 +218,7 @@
this.panel1.Dock = System.Windows.Forms.DockStyle.Top;
this.panel1.Location = new System.Drawing.Point(0, 0);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(703, 97);
this.panel1.Size = new System.Drawing.Size(915, 97);
this.panel1.TabIndex = 7;
//
// button1
@@ -333,7 +334,7 @@
this.fpSpread1_Sheet1.SheetName = "Sheet1";
// Formulas and custom names must be loaded with R1C1 reference style
this.fpSpread1_Sheet1.ReferenceStyle = FarPoint.Win.Spread.Model.ReferenceStyle.R1C1;
this.fpSpread1_Sheet1.ColumnCount = 4;
this.fpSpread1_Sheet1.ColumnCount = 5;
this.fpSpread1_Sheet1.RowCount = 0;
this.fpSpread1_Sheet1.ActiveColumnIndex = -1;
this.fpSpread1_Sheet1.ActiveRowIndex = -1;
@@ -341,33 +342,44 @@
this.fpSpread1_Sheet1.ColumnHeader.Cells.Get(0, 1).Value = "소분류";
this.fpSpread1_Sheet1.ColumnHeader.Cells.Get(0, 2).Value = "공급처";
this.fpSpread1_Sheet1.ColumnHeader.Cells.Get(0, 3).Value = "금액";
this.fpSpread1_Sheet1.ColumnHeader.Cells.Get(0, 4).Value = "금액(N)";
this.fpSpread1_Sheet1.ColumnHeader.Rows.Get(0).Height = 38F;
this.fpSpread1_Sheet1.Columns.Get(0).CellType = textCellType4;
this.fpSpread1_Sheet1.Columns.Get(0).CellType = textCellType1;
this.fpSpread1_Sheet1.Columns.Get(0).HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Center;
this.fpSpread1_Sheet1.Columns.Get(0).Label = "중분류";
this.fpSpread1_Sheet1.Columns.Get(0).VerticalAlignment = FarPoint.Win.Spread.CellVerticalAlignment.Center;
this.fpSpread1_Sheet1.Columns.Get(0).Width = 151F;
this.fpSpread1_Sheet1.Columns.Get(1).CellType = textCellType5;
this.fpSpread1_Sheet1.Columns.Get(1).CellType = textCellType2;
this.fpSpread1_Sheet1.Columns.Get(1).HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Left;
this.fpSpread1_Sheet1.Columns.Get(1).Label = "소분류";
this.fpSpread1_Sheet1.Columns.Get(1).VerticalAlignment = FarPoint.Win.Spread.CellVerticalAlignment.Center;
this.fpSpread1_Sheet1.Columns.Get(1).Width = 151F;
this.fpSpread1_Sheet1.Columns.Get(2).CellType = textCellType6;
this.fpSpread1_Sheet1.Columns.Get(2).CellType = textCellType3;
this.fpSpread1_Sheet1.Columns.Get(2).HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Center;
this.fpSpread1_Sheet1.Columns.Get(2).Label = "공급처";
this.fpSpread1_Sheet1.Columns.Get(2).VerticalAlignment = FarPoint.Win.Spread.CellVerticalAlignment.Center;
this.fpSpread1_Sheet1.Columns.Get(2).Width = 151F;
numberCellType2.DecimalPlaces = 0;
numberCellType2.MaximumValue = 999999999999999D;
numberCellType2.MinimumValue = -999999999999999D;
numberCellType2.NegativeRed = true;
numberCellType2.Separator = ",";
numberCellType2.ShowSeparator = true;
this.fpSpread1_Sheet1.Columns.Get(3).CellType = numberCellType2;
numberCellType1.DecimalPlaces = 0;
numberCellType1.MaximumValue = 999999999999999D;
numberCellType1.MinimumValue = -999999999999999D;
numberCellType1.NegativeRed = true;
numberCellType1.Separator = ",";
numberCellType1.ShowSeparator = true;
this.fpSpread1_Sheet1.Columns.Get(3).CellType = numberCellType1;
this.fpSpread1_Sheet1.Columns.Get(3).HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Right;
this.fpSpread1_Sheet1.Columns.Get(3).Label = "금액";
this.fpSpread1_Sheet1.Columns.Get(3).VerticalAlignment = FarPoint.Win.Spread.CellVerticalAlignment.Center;
this.fpSpread1_Sheet1.Columns.Get(3).Width = 171F;
this.fpSpread1_Sheet1.Columns.Get(3).Width = 143F;
numberCellType2.DecimalPlaces = 0;
numberCellType2.MaximumValue = 10000000D;
numberCellType2.MinimumValue = -10000000D;
numberCellType2.NegativeRed = true;
numberCellType2.ShowSeparator = true;
this.fpSpread1_Sheet1.Columns.Get(4).CellType = numberCellType2;
this.fpSpread1_Sheet1.Columns.Get(4).HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Right;
this.fpSpread1_Sheet1.Columns.Get(4).Label = "금액(N)";
this.fpSpread1_Sheet1.Columns.Get(4).VerticalAlignment = FarPoint.Win.Spread.CellVerticalAlignment.Center;
this.fpSpread1_Sheet1.Columns.Get(4).Width = 140F;
this.fpSpread1_Sheet1.DataAutoSizeColumns = false;
this.fpSpread1_Sheet1.RowHeader.Columns.Default.Resizable = false;
this.fpSpread1_Sheet1.ReferenceStyle = FarPoint.Win.Spread.Model.ReferenceStyle.A1;
@@ -376,7 +388,7 @@
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(703, 696);
this.ClientSize = new System.Drawing.Size(915, 696);
this.Controls.Add(this.fpSpread1);
this.Controls.Add(this.panel1);
this.Name = "rPartList";

View File

@@ -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();