nr구매입력창에 프로젝트 제한조건 해제.

This commit is contained in:
chi
2021-02-03 11:23:36 +09:00
parent 0da91d90a9
commit 6f2de421f4
21 changed files with 1194 additions and 379 deletions

View File

@@ -35,11 +35,11 @@
FarPoint.Win.Spread.CellType.TextCellType textCellType3 = new FarPoint.Win.Spread.CellType.TextCellType();
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.NumberCellType numberCellType1 = new FarPoint.Win.Spread.CellType.NumberCellType();
FarPoint.Win.Spread.CellType.NumberCellType numberCellType2 = new FarPoint.Win.Spread.CellType.NumberCellType();
FarPoint.Win.Spread.CellType.NumberCellType numberCellType3 = new FarPoint.Win.Spread.CellType.NumberCellType();
FarPoint.Win.Spread.CellType.NumberCellType numberCellType4 = new FarPoint.Win.Spread.CellType.NumberCellType();
FarPoint.Win.Spread.CellType.TextCellType textCellType6 = new FarPoint.Win.Spread.CellType.TextCellType();
FarPoint.Win.Spread.CellType.TextCellType textCellType7 = new FarPoint.Win.Spread.CellType.TextCellType();
FarPoint.Win.Spread.CellType.TextCellType textCellType8 = new FarPoint.Win.Spread.CellType.TextCellType();
FarPoint.Win.Spread.CellType.TextCellType textCellType9 = new FarPoint.Win.Spread.CellType.TextCellType();
@@ -47,7 +47,6 @@
FarPoint.Win.Spread.CellType.TextCellType textCellType11 = new FarPoint.Win.Spread.CellType.TextCellType();
FarPoint.Win.Spread.CellType.TextCellType textCellType12 = new FarPoint.Win.Spread.CellType.TextCellType();
FarPoint.Win.Spread.CellType.TextCellType textCellType13 = new FarPoint.Win.Spread.CellType.TextCellType();
FarPoint.Win.Spread.CellType.TextCellType textCellType14 = new FarPoint.Win.Spread.CellType.TextCellType();
FarPoint.Win.Spread.CellType.CheckBoxCellType checkBoxCellType1 = new FarPoint.Win.Spread.CellType.CheckBoxCellType();
FarPoint.Win.Spread.CellType.CheckBoxCellType checkBoxCellType2 = new FarPoint.Win.Spread.CellType.CheckBoxCellType();
this.bn = new System.Windows.Forms.BindingNavigator(this.components);
@@ -62,6 +61,7 @@
this.bindingNavigatorMoveNextItem = new System.Windows.Forms.ToolStripButton();
this.bindingNavigatorMoveLastItem = new System.Windows.Forms.ToolStripButton();
this.bindingNavigatorSeparator2 = new System.Windows.Forms.ToolStripSeparator();
this.toolStripButton2 = new System.Windows.Forms.ToolStripButton();
this.btAdd = new System.Windows.Forms.ToolStripButton();
this.btEdit = new System.Windows.Forms.ToolStripButton();
this.btDel = new System.Windows.Forms.ToolStripButton();
@@ -71,7 +71,7 @@
this.tbFind = new System.Windows.Forms.ToolStripTextBox();
this.btFind = new System.Windows.Forms.ToolStripButton();
this.toolStripSeparator6 = new System.Windows.Forms.ToolStripSeparator();
this.sbCount = new System.Windows.Forms.ToolStripLabel();
this.toolStripButton1 = new System.Windows.Forms.ToolStripButton();
this.cm = new System.Windows.Forms.ContextMenuStrip(this.components);
this.columnSizeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.autoToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
@@ -146,6 +146,7 @@
this.bindingNavigatorMoveNextItem,
this.bindingNavigatorMoveLastItem,
this.bindingNavigatorSeparator2,
this.toolStripButton2,
this.btAdd,
this.btEdit,
this.btDel,
@@ -155,7 +156,7 @@
this.tbFind,
this.btFind,
this.toolStripSeparator6,
this.sbCount});
this.toolStripButton1});
this.bn.Location = new System.Drawing.Point(0, 642);
this.bn.MoveFirstItem = this.bindingNavigatorMoveFirstItem;
this.bn.MoveLastItem = this.bindingNavigatorMoveLastItem;
@@ -246,6 +247,15 @@
this.bindingNavigatorSeparator2.Name = "bindingNavigatorSeparator2";
this.bindingNavigatorSeparator2.Size = new System.Drawing.Size(6, 25);
//
// toolStripButton2
//
this.toolStripButton2.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton2.Image")));
this.toolStripButton2.Name = "toolStripButton2";
this.toolStripButton2.RightToLeftAutoMirrorImage = true;
this.toolStripButton2.Size = new System.Drawing.Size(74, 22);
this.toolStripButton2.Text = "줄추가(&I)";
this.toolStripButton2.Click += new System.EventHandler(this.toolStripButton2_Click);
//
// btAdd
//
this.btAdd.Image = ((System.Drawing.Image)(resources.GetObject("btAdd.Image")));
@@ -314,11 +324,14 @@
this.toolStripSeparator6.Name = "toolStripSeparator6";
this.toolStripSeparator6.Size = new System.Drawing.Size(6, 25);
//
// sbCount
// toolStripButton1
//
this.sbCount.Name = "sbCount";
this.sbCount.Size = new System.Drawing.Size(83, 22);
this.sbCount.Text = "프로젝트 수량";
this.toolStripButton1.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton1.Image")));
this.toolStripButton1.ImageTransparentColor = System.Drawing.Color.Magenta;
this.toolStripButton1.Name = "toolStripButton1";
this.toolStripButton1.Size = new System.Drawing.Size(91, 22);
this.toolStripButton1.Text = "Report Data";
this.toolStripButton1.Click += new System.EventHandler(this.toolStripButton1_Click);
//
// cm
//
@@ -430,30 +443,30 @@
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 = 20;
this.fpSpread1_Sheet1.ColumnCount = 19;
this.fpSpread1_Sheet1.ActiveColumnIndex = -1;
this.fpSpread1_Sheet1.ActiveRowIndex = -1;
this.fpSpread1_Sheet1.AutoGenerateColumns = false;
this.fpSpread1_Sheet1.ColumnHeader.Cells.Get(0, 0).Value = "등록일";
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 = "요청";
this.fpSpread1_Sheet1.ColumnHeader.Cells.Get(0, 5).Value = "담당";
this.fpSpread1_Sheet1.ColumnHeader.Cells.Get(0, 6).Value = "수량";
this.fpSpread1_Sheet1.ColumnHeader.Cells.Get(0, 7).Value = "Original\r\n($K)";
this.fpSpread1_Sheet1.ColumnHeader.Cells.Get(0, 8).StyleName = " ";
this.fpSpread1_Sheet1.ColumnHeader.Cells.Get(0, 8).Value = "InHouse($K)";
this.fpSpread1_Sheet1.ColumnHeader.Cells.Get(0, 9).Value = "Effect\r\n($K)";
this.fpSpread1_Sheet1.ColumnHeader.Cells.Get(0, 10).Value = "완료일";
this.fpSpread1_Sheet1.ColumnHeader.Cells.Get(0, 11).Value = "비고";
this.fpSpread1_Sheet1.ColumnHeader.Cells.Get(0, 12).Value = "자산번호";
this.fpSpread1_Sheet1.ColumnHeader.Cells.Get(0, 13).Value = "담당 파트";
this.fpSpread1_Sheet1.ColumnHeader.Cells.Get(0, 14).Value = "Work Group";
this.fpSpread1_Sheet1.ColumnHeader.Cells.Get(0, 15).Value = "Site";
this.fpSpread1_Sheet1.ColumnHeader.Cells.Get(0, 16).Value = "Category";
this.fpSpread1_Sheet1.ColumnHeader.Cells.Get(0, 17).Value = "Sub Category";
this.fpSpread1_Sheet1.ColumnHeader.Cells.Get(0, 19).Value = "Highlight";
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 = "담당자";
this.fpSpread1_Sheet1.ColumnHeader.Cells.Get(0, 5).Value = "수량";
this.fpSpread1_Sheet1.ColumnHeader.Cells.Get(0, 6).Value = "Original\r\n($K)";
this.fpSpread1_Sheet1.ColumnHeader.Cells.Get(0, 7).StyleName = " ";
this.fpSpread1_Sheet1.ColumnHeader.Cells.Get(0, 7).Value = "InHouse($K)";
this.fpSpread1_Sheet1.ColumnHeader.Cells.Get(0, 8).Value = "Effect\r\n($K)";
this.fpSpread1_Sheet1.ColumnHeader.Cells.Get(0, 9).Value = "완료일";
this.fpSpread1_Sheet1.ColumnHeader.Cells.Get(0, 10).Value = "비고";
this.fpSpread1_Sheet1.ColumnHeader.Cells.Get(0, 11).Value = "Part";
this.fpSpread1_Sheet1.ColumnHeader.Cells.Get(0, 12).Value = "Work Group";
this.fpSpread1_Sheet1.ColumnHeader.Cells.Get(0, 13).Value = "process/Equipment";
this.fpSpread1_Sheet1.ColumnHeader.Cells.Get(0, 14).Value = "Site";
this.fpSpread1_Sheet1.ColumnHeader.Cells.Get(0, 15).Value = "Category";
this.fpSpread1_Sheet1.ColumnHeader.Cells.Get(0, 16).Value = "Sub Category";
this.fpSpread1_Sheet1.ColumnHeader.Cells.Get(0, 17).Value = "Fan\r\nOut";
this.fpSpread1_Sheet1.ColumnHeader.Cells.Get(0, 18).Value = "High\r\nLight";
this.fpSpread1_Sheet1.ColumnHeader.Rows.Get(0).Height = 46F;
this.fpSpread1_Sheet1.Columns.Get(0).CellType = textCellType1;
this.fpSpread1_Sheet1.Columns.Get(0).DataField = "pdate";
@@ -469,113 +482,122 @@
this.fpSpread1_Sheet1.Columns.Get(2).BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(224)))), ((int)(((byte)(192)))));
this.fpSpread1_Sheet1.Columns.Get(2).CellType = textCellType3;
this.fpSpread1_Sheet1.Columns.Get(2).DataField = "part";
this.fpSpread1_Sheet1.Columns.Get(2).Label = "파트";
this.fpSpread1_Sheet1.Columns.Get(2).Width = 69F;
this.fpSpread1_Sheet1.Columns.Get(2).Label = "요청파트";
this.fpSpread1_Sheet1.Columns.Get(2).Width = 84F;
this.fpSpread1_Sheet1.Columns.Get(3).AllowAutoFilter = true;
this.fpSpread1_Sheet1.Columns.Get(3).BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(224)))), ((int)(((byte)(192)))));
this.fpSpread1_Sheet1.Columns.Get(3).CellType = textCellType4;
this.fpSpread1_Sheet1.Columns.Get(3).DataField = "process";
this.fpSpread1_Sheet1.Columns.Get(3).HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Left;
this.fpSpread1_Sheet1.Columns.Get(3).Label = "공정";
this.fpSpread1_Sheet1.Columns.Get(3).DataField = "reqstaff";
this.fpSpread1_Sheet1.Columns.Get(3).HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Center;
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 = 78F;
this.fpSpread1_Sheet1.Columns.Get(4).AllowAutoFilter = true;
this.fpSpread1_Sheet1.Columns.Get(4).BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(224)))), ((int)(((byte)(192)))));
this.fpSpread1_Sheet1.Columns.Get(4).CellType = textCellType5;
this.fpSpread1_Sheet1.Columns.Get(4).DataField = "reqstaff";
this.fpSpread1_Sheet1.Columns.Get(4).DataField = "userManager";
this.fpSpread1_Sheet1.Columns.Get(4).HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Center;
this.fpSpread1_Sheet1.Columns.Get(4).Label = "요청";
this.fpSpread1_Sheet1.Columns.Get(4).Label = "담당자";
this.fpSpread1_Sheet1.Columns.Get(4).VerticalAlignment = FarPoint.Win.Spread.CellVerticalAlignment.Center;
this.fpSpread1_Sheet1.Columns.Get(4).Width = 78F;
this.fpSpread1_Sheet1.Columns.Get(5).AllowAutoFilter = true;
this.fpSpread1_Sheet1.Columns.Get(5).CellType = textCellType6;
this.fpSpread1_Sheet1.Columns.Get(5).DataField = "userManager";
this.fpSpread1_Sheet1.Columns.Get(5).HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Center;
this.fpSpread1_Sheet1.Columns.Get(5).Label = "담당";
this.fpSpread1_Sheet1.Columns.Get(5).VerticalAlignment = FarPoint.Win.Spread.CellVerticalAlignment.Center;
this.fpSpread1_Sheet1.Columns.Get(5).Width = 78F;
numberCellType1.DecimalPlaces = 0;
numberCellType1.LeadingZero = FarPoint.Win.Spread.CellType.LeadingZero.Yes;
numberCellType1.MaximumValue = 2147483647D;
numberCellType1.MinimumValue = -2147483648D;
this.fpSpread1_Sheet1.Columns.Get(6).CellType = numberCellType1;
this.fpSpread1_Sheet1.Columns.Get(6).DataField = "cnt";
this.fpSpread1_Sheet1.Columns.Get(6).Label = "수량";
this.fpSpread1_Sheet1.Columns.Get(5).CellType = numberCellType1;
this.fpSpread1_Sheet1.Columns.Get(5).DataField = "cnt";
this.fpSpread1_Sheet1.Columns.Get(5).Label = "수량";
numberCellType2.MaximumValue = 999999999999999D;
numberCellType2.MinimumValue = -999999999999999D;
this.fpSpread1_Sheet1.Columns.Get(7).CellType = numberCellType2;
this.fpSpread1_Sheet1.Columns.Get(7).DataField = "costo";
this.fpSpread1_Sheet1.Columns.Get(7).HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Center;
this.fpSpread1_Sheet1.Columns.Get(7).Label = "Original\r\n($K)";
this.fpSpread1_Sheet1.Columns.Get(7).VerticalAlignment = FarPoint.Win.Spread.CellVerticalAlignment.Center;
this.fpSpread1_Sheet1.Columns.Get(6).CellType = numberCellType2;
this.fpSpread1_Sheet1.Columns.Get(6).DataField = "costo";
this.fpSpread1_Sheet1.Columns.Get(6).HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Center;
this.fpSpread1_Sheet1.Columns.Get(6).Label = "Original\r\n($K)";
this.fpSpread1_Sheet1.Columns.Get(6).VerticalAlignment = FarPoint.Win.Spread.CellVerticalAlignment.Center;
numberCellType3.MaximumValue = 999999999999999D;
numberCellType3.MinimumValue = -999999999999999D;
this.fpSpread1_Sheet1.Columns.Get(8).CellType = numberCellType3;
this.fpSpread1_Sheet1.Columns.Get(8).DataField = "costn";
this.fpSpread1_Sheet1.Columns.Get(8).HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Center;
this.fpSpread1_Sheet1.Columns.Get(8).Label = "InHouse($K)";
this.fpSpread1_Sheet1.Columns.Get(8).VerticalAlignment = FarPoint.Win.Spread.CellVerticalAlignment.Center;
this.fpSpread1_Sheet1.Columns.Get(9).BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224)))));
this.fpSpread1_Sheet1.Columns.Get(7).CellType = numberCellType3;
this.fpSpread1_Sheet1.Columns.Get(7).DataField = "costn";
this.fpSpread1_Sheet1.Columns.Get(7).HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Center;
this.fpSpread1_Sheet1.Columns.Get(7).Label = "InHouse($K)";
this.fpSpread1_Sheet1.Columns.Get(7).VerticalAlignment = FarPoint.Win.Spread.CellVerticalAlignment.Center;
this.fpSpread1_Sheet1.Columns.Get(8).BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224)))));
numberCellType4.MaximumValue = 999999999999999D;
numberCellType4.MinimumValue = -999999999999999D;
this.fpSpread1_Sheet1.Columns.Get(9).CellType = numberCellType4;
this.fpSpread1_Sheet1.Columns.Get(9).DataField = "coste";
this.fpSpread1_Sheet1.Columns.Get(9).ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
this.fpSpread1_Sheet1.Columns.Get(8).CellType = numberCellType4;
this.fpSpread1_Sheet1.Columns.Get(8).DataField = "coste";
this.fpSpread1_Sheet1.Columns.Get(8).ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
this.fpSpread1_Sheet1.Columns.Get(8).HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Center;
this.fpSpread1_Sheet1.Columns.Get(8).Label = "Effect\r\n($K)";
this.fpSpread1_Sheet1.Columns.Get(8).Tag = "effect";
this.fpSpread1_Sheet1.Columns.Get(8).VerticalAlignment = FarPoint.Win.Spread.CellVerticalAlignment.Center;
this.fpSpread1_Sheet1.Columns.Get(9).CellType = textCellType6;
this.fpSpread1_Sheet1.Columns.Get(9).DataField = "edate";
this.fpSpread1_Sheet1.Columns.Get(9).HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Center;
this.fpSpread1_Sheet1.Columns.Get(9).Label = "Effect\r\n($K)";
this.fpSpread1_Sheet1.Columns.Get(9).Tag = "effect";
this.fpSpread1_Sheet1.Columns.Get(9).Label = "완료일";
this.fpSpread1_Sheet1.Columns.Get(9).VerticalAlignment = FarPoint.Win.Spread.CellVerticalAlignment.Center;
this.fpSpread1_Sheet1.Columns.Get(10).CellType = textCellType7;
this.fpSpread1_Sheet1.Columns.Get(10).DataField = "edate";
this.fpSpread1_Sheet1.Columns.Get(10).HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Center;
this.fpSpread1_Sheet1.Columns.Get(10).Label = "완료일";
this.fpSpread1_Sheet1.Columns.Get(10).VerticalAlignment = FarPoint.Win.Spread.CellVerticalAlignment.Center;
this.fpSpread1_Sheet1.Columns.Get(10).DataField = "memo";
this.fpSpread1_Sheet1.Columns.Get(10).Label = "비고";
this.fpSpread1_Sheet1.Columns.Get(11).BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
this.fpSpread1_Sheet1.Columns.Get(11).CellType = textCellType8;
this.fpSpread1_Sheet1.Columns.Get(11).DataField = "memo";
this.fpSpread1_Sheet1.Columns.Get(11).Label = "비고";
this.fpSpread1_Sheet1.Columns.Get(11).DataField = "eepart";
this.fpSpread1_Sheet1.Columns.Get(11).ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(192)))));
this.fpSpread1_Sheet1.Columns.Get(11).HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Center;
this.fpSpread1_Sheet1.Columns.Get(11).Label = "Part";
this.fpSpread1_Sheet1.Columns.Get(11).VerticalAlignment = FarPoint.Win.Spread.CellVerticalAlignment.Center;
this.fpSpread1_Sheet1.Columns.Get(12).BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
this.fpSpread1_Sheet1.Columns.Get(12).CellType = textCellType9;
this.fpSpread1_Sheet1.Columns.Get(12).DataField = "asset";
this.fpSpread1_Sheet1.Columns.Get(12).DataField = "workgroup";
this.fpSpread1_Sheet1.Columns.Get(12).ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(192)))));
this.fpSpread1_Sheet1.Columns.Get(12).HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Center;
this.fpSpread1_Sheet1.Columns.Get(12).Label = "자산번호";
this.fpSpread1_Sheet1.Columns.Get(12).Label = "Work Group";
this.fpSpread1_Sheet1.Columns.Get(12).VerticalAlignment = FarPoint.Win.Spread.CellVerticalAlignment.Center;
this.fpSpread1_Sheet1.Columns.Get(13).BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
this.fpSpread1_Sheet1.Columns.Get(13).CellType = textCellType10;
this.fpSpread1_Sheet1.Columns.Get(13).DataField = "eepart";
this.fpSpread1_Sheet1.Columns.Get(13).DataField = "process";
this.fpSpread1_Sheet1.Columns.Get(13).ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(192)))));
this.fpSpread1_Sheet1.Columns.Get(13).HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Center;
this.fpSpread1_Sheet1.Columns.Get(13).Label = "담당 파트";
this.fpSpread1_Sheet1.Columns.Get(13).Label = "process/Equipment";
this.fpSpread1_Sheet1.Columns.Get(13).VerticalAlignment = FarPoint.Win.Spread.CellVerticalAlignment.Center;
this.fpSpread1_Sheet1.Columns.Get(14).AllowAutoFilter = true;
this.fpSpread1_Sheet1.Columns.Get(14).BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
this.fpSpread1_Sheet1.Columns.Get(14).CellType = textCellType11;
this.fpSpread1_Sheet1.Columns.Get(14).DataField = "workgroup";
this.fpSpread1_Sheet1.Columns.Get(14).DataField = "site";
this.fpSpread1_Sheet1.Columns.Get(14).ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(192)))));
this.fpSpread1_Sheet1.Columns.Get(14).HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Center;
this.fpSpread1_Sheet1.Columns.Get(14).Label = "Work Group";
this.fpSpread1_Sheet1.Columns.Get(14).Label = "Site";
this.fpSpread1_Sheet1.Columns.Get(14).VerticalAlignment = FarPoint.Win.Spread.CellVerticalAlignment.Center;
this.fpSpread1_Sheet1.Columns.Get(15).AllowAutoFilter = true;
this.fpSpread1_Sheet1.Columns.Get(15).BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
this.fpSpread1_Sheet1.Columns.Get(15).CellType = textCellType12;
this.fpSpread1_Sheet1.Columns.Get(15).DataField = "site";
this.fpSpread1_Sheet1.Columns.Get(15).DataField = "category";
this.fpSpread1_Sheet1.Columns.Get(15).ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(192)))));
this.fpSpread1_Sheet1.Columns.Get(15).HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Center;
this.fpSpread1_Sheet1.Columns.Get(15).Label = "Site";
this.fpSpread1_Sheet1.Columns.Get(15).Label = "Category";
this.fpSpread1_Sheet1.Columns.Get(15).VerticalAlignment = FarPoint.Win.Spread.CellVerticalAlignment.Center;
this.fpSpread1_Sheet1.Columns.Get(16).AllowAutoFilter = true;
this.fpSpread1_Sheet1.Columns.Get(16).BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
this.fpSpread1_Sheet1.Columns.Get(16).CellType = textCellType13;
this.fpSpread1_Sheet1.Columns.Get(16).DataField = "category";
this.fpSpread1_Sheet1.Columns.Get(16).DataField = "subcate";
this.fpSpread1_Sheet1.Columns.Get(16).ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(192)))));
this.fpSpread1_Sheet1.Columns.Get(16).HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Center;
this.fpSpread1_Sheet1.Columns.Get(16).Label = "Category";
this.fpSpread1_Sheet1.Columns.Get(16).Label = "Sub Category";
this.fpSpread1_Sheet1.Columns.Get(16).VerticalAlignment = FarPoint.Win.Spread.CellVerticalAlignment.Center;
this.fpSpread1_Sheet1.Columns.Get(17).CellType = textCellType14;
this.fpSpread1_Sheet1.Columns.Get(17).DataField = "subcate";
this.fpSpread1_Sheet1.Columns.Get(17).BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
this.fpSpread1_Sheet1.Columns.Get(17).CellType = checkBoxCellType1;
this.fpSpread1_Sheet1.Columns.Get(17).DataField = "fanout";
this.fpSpread1_Sheet1.Columns.Get(17).ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(192)))));
this.fpSpread1_Sheet1.Columns.Get(17).HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Center;
this.fpSpread1_Sheet1.Columns.Get(17).Label = "Sub Category";
this.fpSpread1_Sheet1.Columns.Get(17).Label = "Fan\r\nOut";
this.fpSpread1_Sheet1.Columns.Get(17).Tag = "fanout";
this.fpSpread1_Sheet1.Columns.Get(17).VerticalAlignment = FarPoint.Win.Spread.CellVerticalAlignment.Center;
this.fpSpread1_Sheet1.Columns.Get(18).CellType = checkBoxCellType1;
this.fpSpread1_Sheet1.Columns.Get(18).DataField = "fanout";
this.fpSpread1_Sheet1.Columns.Get(18).BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
this.fpSpread1_Sheet1.Columns.Get(18).CellType = checkBoxCellType2;
this.fpSpread1_Sheet1.Columns.Get(18).DataField = "weekly";
this.fpSpread1_Sheet1.Columns.Get(18).ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(192)))));
this.fpSpread1_Sheet1.Columns.Get(18).HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Center;
this.fpSpread1_Sheet1.Columns.Get(18).Tag = "fanout";
this.fpSpread1_Sheet1.Columns.Get(18).Label = "High\r\nLight";
this.fpSpread1_Sheet1.Columns.Get(18).Tag = "weekly";
this.fpSpread1_Sheet1.Columns.Get(18).VerticalAlignment = FarPoint.Win.Spread.CellVerticalAlignment.Center;
this.fpSpread1_Sheet1.Columns.Get(19).CellType = checkBoxCellType2;
this.fpSpread1_Sheet1.Columns.Get(19).DataField = "weekly";
this.fpSpread1_Sheet1.Columns.Get(19).HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Center;
this.fpSpread1_Sheet1.Columns.Get(19).Label = "Highlight";
this.fpSpread1_Sheet1.Columns.Get(19).Tag = "weekly";
this.fpSpread1_Sheet1.Columns.Get(19).VerticalAlignment = FarPoint.Win.Spread.CellVerticalAlignment.Center;
this.fpSpread1_Sheet1.DataAutoSizeColumns = false;
this.fpSpread1_Sheet1.DataSource = this.bs;
this.fpSpread1_Sheet1.RowHeader.Columns.Default.Resizable = false;
@@ -1018,7 +1040,6 @@
private System.Windows.Forms.ToolStripMenuItem ToolStripMenuItem1;
private System.Windows.Forms.ToolStripMenuItem ToolStripMenuItem;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator6;
private System.Windows.Forms.ToolStripLabel sbCount;
private System.Windows.Forms.RichTextBox richTextBox1;
private System.Windows.Forms.ToolStripComboBox cmbDateType;
private dsPRJTableAdapters.EETGW_SaveCostTableAdapter ta;
@@ -1031,5 +1052,7 @@
private System.Windows.Forms.ToolStripLabel lbEnd;
private System.Windows.Forms.ToolStripTextBox dtED;
private FarPoint.Win.Spread.SheetView fpSpread1_Sheet1;
private System.Windows.Forms.ToolStripButton toolStripButton1;
private System.Windows.Forms.ToolStripButton toolStripButton2;
}
}

View File

@@ -64,6 +64,14 @@ namespace FPJ0000
void refreshData()
{
if (this.dsMSSQL.EETGW_SaveCost.GetChanges() != null)
{
var dlg = util.MsgQ("변경된 내용이 있습니다. 지금 새로고침 하면 해당 자료는 손실 됩니다. 진행 할까요?");
if (dlg != DialogResult.Yes) return;
}
string state = "";
string State_Select = " SELECT * FROM EETGW_SaveCost";
string State_where = " WHERE gcode=@gcode and ";
@@ -418,5 +426,22 @@ namespace FPJ0000
{
funcEdit();
}
private void toolStripButton1_Click(object sender, EventArgs e)
{
var f = new SaveCost.fSaveCostReport();
f.Show();
}
private void toolStripButton2_Click(object sender, EventArgs e)
{
var newdr = this.dsMSSQL.EETGW_SaveCost.NewEETGW_SaveCostRow();
newdr.wuid = FCOMMON.info.Login.no;
newdr.wdate = DateTime.Now;
newdr.pdate = DateTime.Now.ToShortDateString();
newdr.gcode = FCOMMON.info.Login.gcode;
this.dsMSSQL.EETGW_SaveCost.AddEETGW_SaveCostRow(newdr);
}
}
}

View File

@@ -165,6 +165,18 @@
kqub/+6/S/4B3AZ4VN3/XzL3HVyzoksPXDFILn/am//2GdtxG2Bfevd/YMszDM0gAJLLnvz6v0XCetwG
WOTd+W9TcAVDMwiA5FL7X8O9hBUYZt3GqhkEQHJhLS//6wbPw22ATtoNnJIgOb/qh/81fKfhNgAfcMq9
8l/FYwIYQ4UGBWBgAAC+0b+zuQxOnAAAAABJRU5ErkJggg==
</value>
</data>
<data name="toolStripButton2.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
wwAADsMBx2+oZAAAAUpJREFUOE9jGLzg7gL2/7fmcf6/Oofr/8UZvP+hwsSD60CNfx41/v/zsOH/yckC
pBtwfjov3ICDPSKkG3B8kiBQc93/Pw+q/u9oFydswKWZPP/PTuX7fxKo8Ui/0P993SJAzeX//94r+r++
Qeb/qhq5/0srFf/PL1X+P6tIFdPAU0B//nlYD9RUC8SV///cKwHivP9/72b+/3sn+f/f23H//92MAOKQ
/5NyNDENONQrDHbu3/ulQI0FQI3ZQI2pQI0J///digZqDPv/70bQ/3/X/f53peliGrCzXeL/lmap/+vA
zpX/v6RC8f/fWzFAjeH/p+Zp/J+QpfW/O0P3f3uq/v/mREPCYTIb6E+Qc//dCPjfk6FDWAM6APnz3w1/
IPb735qsT7oB3em6YP+CcH2cEekGtCQZ/G+IN/xfE2v8vzLahHQD6AQYGAAkI9iedfyIaQAAAABJRU5E
rkJggg==
</value>
</data>
<data name="btAdd.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
@@ -206,6 +218,21 @@
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
wwAADsMBx2+oZAAAAExJREFUOE9joAr49u3bf1IxVCsEgAWC58Dxh/cf4RhZDETHTNiHaQgpBoAwzBCo
dtINAGGiDUDGyGpoawAxeNSAQWkAORiqnRLAwAAA9EMMU8Daa3MAAAAASUVORK5CYII=
</value>
</data>
<data name="toolStripButton1.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG
YKxG6WBogkMZKgPNCEVJFBGdGETEvgwyO9DJE5syZw3PIlPEE9pgBCLZ5XvdMB8Ew8gXbl54nuf63dd9
0OGSnwCahxbPRNPAPMw9Xpg6ZmF46kZZ0xSKzJPIrhpDWsVnpBhGkKx3nAX8Pv7z1zg8OoY/cITdn4fw
bf/C0kYAN3Ma/w3gWfZL5kzTKBxjWyK2DftwI9tyMYCZKXbNHaD91bLYJrDXsYbrWfUKwJrPE9M2M1Oc
VzOOpHI7Jr376Hi9ogHqFIANO0/MmmmbmSmm9a8ze+I4MrNWAdjtoJgWcx+PSzg166yZZ8xM8XvXDix9
c4jIqFYAjoriBV9AhEPv1mH/sonogha0afbZMMZz+yreTGyhpusHwtNNCsA5U1zS4BLxzJIfg299qO32
Ir7UJtZfftyATqeT+8o2D8JSjQrAJblrncYL7ZJ2+bfaFnC/1S1NjL3diRat7qrO7wLRP3HjWsojBeCo
mDEo5mNjuweFGvjWg2EBhCbpkW78htSHHwRyNdmgAFzPEee2iFkzayy2OLXzT4gr6UdUnlXrullsxxQ+
kx0g8BTA3aZlButjSTyjODq/WcQcW/B/Je4OQhLvKQDnzN1mp0nnkvAhR8VuMzNrpm1mpjgkoVwB/v8D
TgDQASA1MVpwzwAAAABJRU5ErkJggg==
</value>
</data>
<metadata name="cm.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">

View File

@@ -0,0 +1,231 @@

namespace FPJ0000.SaveCost
{
partial class fSaveCostReport
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
this.fpSpread1 = new FarPoint.Win.Spread.FpSpread();
this.fpSpread1_Sheet1 = new FarPoint.Win.Spread.SheetView();
this.progressBar2 = new System.Windows.Forms.ProgressBar();
this.ta = new FPJ0000.dsReportTableAdapters.JobReportDayTableAdapter();
this.btSave = new System.Windows.Forms.Button();
this.label3 = new System.Windows.Forms.Label();
this.dte = new System.Windows.Forms.DateTimePicker();
this.label2 = new System.Windows.Forms.Label();
this.dts = new System.Windows.Forms.DateTimePicker();
this.btRefresh = new System.Windows.Forms.Button();
this.panel1 = new System.Windows.Forms.Panel();
this.dsReport = new FPJ0000.dsReport();
this.bs = new System.Windows.Forms.BindingSource(this.components);
this.checkBox1 = new System.Windows.Forms.CheckBox();
this.checkBox2 = new System.Windows.Forms.CheckBox();
((System.ComponentModel.ISupportInitialize)(this.fpSpread1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.fpSpread1_Sheet1)).BeginInit();
this.panel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dsReport)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.bs)).BeginInit();
this.SuspendLayout();
//
// fpSpread1
//
this.fpSpread1.AccessibleDescription = "";
this.fpSpread1.Dock = System.Windows.Forms.DockStyle.Fill;
this.fpSpread1.Location = new System.Drawing.Point(0, 58);
this.fpSpread1.Name = "fpSpread1";
this.fpSpread1.Sheets.AddRange(new FarPoint.Win.Spread.SheetView[] {
this.fpSpread1_Sheet1});
this.fpSpread1.Size = new System.Drawing.Size(1114, 539);
this.fpSpread1.TabIndex = 7;
//
// fpSpread1_Sheet1
//
this.fpSpread1_Sheet1.Reset();
this.fpSpread1_Sheet1.SheetName = "Sheet1";
//
// progressBar2
//
this.progressBar2.Dock = System.Windows.Forms.DockStyle.Bottom;
this.progressBar2.Location = new System.Drawing.Point(0, 597);
this.progressBar2.Name = "progressBar2";
this.progressBar2.Size = new System.Drawing.Size(1114, 23);
this.progressBar2.TabIndex = 8;
//
// ta
//
this.ta.ClearBeforeFill = true;
//
// btSave
//
this.btSave.Dock = System.Windows.Forms.DockStyle.Right;
this.btSave.Location = new System.Drawing.Point(959, 5);
this.btSave.Name = "btSave";
this.btSave.Size = new System.Drawing.Size(75, 48);
this.btSave.TabIndex = 12;
this.btSave.Text = "파일저장";
this.btSave.UseVisualStyleBackColor = true;
this.btSave.Click += new System.EventHandler(this.btSave_Click);
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(261, 27);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(14, 12);
this.label3.TabIndex = 9;
this.label3.Text = "~";
//
// dte
//
this.dte.Location = new System.Drawing.Point(289, 23);
this.dte.Name = "dte";
this.dte.Size = new System.Drawing.Size(180, 21);
this.dte.TabIndex = 8;
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(10, 27);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(53, 12);
this.label2.TabIndex = 7;
this.label2.Text = "검색기간";
//
// dts
//
this.dts.Location = new System.Drawing.Point(68, 23);
this.dts.Name = "dts";
this.dts.Size = new System.Drawing.Size(180, 21);
this.dts.TabIndex = 6;
//
// btRefresh
//
this.btRefresh.Dock = System.Windows.Forms.DockStyle.Right;
this.btRefresh.Location = new System.Drawing.Point(1034, 5);
this.btRefresh.Name = "btRefresh";
this.btRefresh.Size = new System.Drawing.Size(75, 48);
this.btRefresh.TabIndex = 2;
this.btRefresh.Text = "새로고침";
this.btRefresh.UseVisualStyleBackColor = true;
this.btRefresh.Click += new System.EventHandler(this.btRefresh_Click);
//
// panel1
//
this.panel1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(200)))), ((int)(((byte)(200)))), ((int)(((byte)(200)))));
this.panel1.Controls.Add(this.checkBox2);
this.panel1.Controls.Add(this.checkBox1);
this.panel1.Controls.Add(this.btSave);
this.panel1.Controls.Add(this.label3);
this.panel1.Controls.Add(this.dte);
this.panel1.Controls.Add(this.label2);
this.panel1.Controls.Add(this.dts);
this.panel1.Controls.Add(this.btRefresh);
this.panel1.Dock = System.Windows.Forms.DockStyle.Top;
this.panel1.Location = new System.Drawing.Point(0, 0);
this.panel1.Name = "panel1";
this.panel1.Padding = new System.Windows.Forms.Padding(5);
this.panel1.Size = new System.Drawing.Size(1114, 58);
this.panel1.TabIndex = 6;
this.panel1.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.panel1_MouseDoubleClick);
//
// dsReport
//
this.dsReport.DataSetName = "dsReport";
this.dsReport.SchemaSerializationMode = System.Data.SchemaSerializationMode.IncludeSchema;
//
// bs
//
this.bs.DataMember = "JobReportDay";
this.bs.DataSource = this.dsReport;
//
// checkBox1
//
this.checkBox1.AutoSize = true;
this.checkBox1.Checked = true;
this.checkBox1.CheckState = System.Windows.Forms.CheckState.Checked;
this.checkBox1.Location = new System.Drawing.Point(493, 25);
this.checkBox1.Name = "checkBox1";
this.checkBox1.Size = new System.Drawing.Size(108, 16);
this.checkBox1.TabIndex = 13;
this.checkBox1.Text = "High Light 포함";
this.checkBox1.UseVisualStyleBackColor = true;
//
// checkBox2
//
this.checkBox2.AutoSize = true;
this.checkBox2.Checked = true;
this.checkBox2.CheckState = System.Windows.Forms.CheckState.Checked;
this.checkBox2.Location = new System.Drawing.Point(611, 25);
this.checkBox2.Name = "checkBox2";
this.checkBox2.Size = new System.Drawing.Size(96, 16);
this.checkBox2.TabIndex = 14;
this.checkBox2.Text = "Fan Out 포함";
this.checkBox2.UseVisualStyleBackColor = true;
//
// fSaveCostReport
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1114, 620);
this.Controls.Add(this.fpSpread1);
this.Controls.Add(this.progressBar2);
this.Controls.Add(this.panel1);
this.Name = "fSaveCostReport";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "Cost Reduction Report";
this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
this.Load += new System.EventHandler(this.fEBoardReport_Load);
((System.ComponentModel.ISupportInitialize)(this.fpSpread1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.fpSpread1_Sheet1)).EndInit();
this.panel1.ResumeLayout(false);
this.panel1.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.dsReport)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.bs)).EndInit();
this.ResumeLayout(false);
}
#endregion
private FarPoint.Win.Spread.FpSpread fpSpread1;
private FarPoint.Win.Spread.SheetView fpSpread1_Sheet1;
private System.Windows.Forms.ProgressBar progressBar2;
private dsReportTableAdapters.JobReportDayTableAdapter ta;
private System.Windows.Forms.Button btSave;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.DateTimePicker dte;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.DateTimePicker dts;
private System.Windows.Forms.Button btRefresh;
private System.Windows.Forms.Panel panel1;
private dsReport dsReport;
private System.Windows.Forms.BindingSource bs;
private System.Windows.Forms.CheckBox checkBox1;
private System.Windows.Forms.CheckBox checkBox2;
}
}

View File

@@ -0,0 +1,255 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace FPJ0000.SaveCost
{
public partial class fSaveCostReport : Form
{
public fSaveCostReport()
{
InitializeComponent();
}
private void fEBoardReport_Load(object sender, EventArgs e)
{
//기본엑셀파일을 가져온다
this.Show();
Application.DoEvents();
dts.Value = new DateTime(DateTime.Now.Year, 1, 1);
dte.Value = new DateTime(DateTime.Now.Year, 12, 31);
//파일불러오기
LoadExcel();
}
void LoadExcel()
{
//파일불러오기
var fn = "CostReduction_" + DateTime.Now.Year.ToString("0000") + ".xlsx";
var fi = new System.IO.FileInfo(FCOMMON.Util.CurrentPath + fn);
this.fpSpread1.OpenExcel(fi.FullName);
}
int GetColIndex(string colname)
{
var sIndex = (int)'A';
var eIndex = (int)'Z';
var colsize = eIndex - sIndex + 1;
var collist = colname.ToCharArray();
var idx = 0;
for (int i = collist.Length; i > 0; i--)
{
var c = collist[i - 1];
idx += (int)(c - sIndex) + (colsize * (i - 1));
}
return idx;
}
string GetColName(int idx)
{
var sIndex = (int)'A';
var eIndex = (int)'Z';
var colsize = eIndex - sIndex + 1;
string colName = string.Empty;
while (true)
{
var mok = (int)(Math.Floor((idx * 1.0) / colsize));
if (mok > 0) colName += (char)(mok + sIndex);
var namoji = (idx % colsize);
if (namoji < colsize)
{
colName += (char)(namoji + sIndex);
break;
}
else idx = namoji;
}
return colName;
}
private void btRefresh_Click(object sender, EventArgs e)
{
//새로고침
//a2 에 날짜를 표시함.
var db = new EEEntities();
var sd = this.dts.Value.ToShortDateString();
var ed = this.dte.Value.ToShortDateString();
this.fpSpread1.ActiveSheetIndex = 1;
var = db.EETGW_SaveCost.Where(t => t.pdate.CompareTo(sd) >= 0 && t.pdate.CompareTo(ed) <= 0).OrderBy(t => t.pdate).GroupBy(t => t.name);
var row = 6;
foreach (var item in )
{
var dr = item.FirstOrDefault();
this.fpSpread1.ActiveSheet.Cells["C" + row.ToString()].Value = dr.eepart;
this.fpSpread1.ActiveSheet.Cells["D" + row.ToString()].Value = dr.workgroup;
this.fpSpread1.ActiveSheet.Cells["E" + row.ToString()].Value = dr.process;
this.fpSpread1.ActiveSheet.Cells["F" + row.ToString()].Value = dr.site;
this.fpSpread1.ActiveSheet.Cells["G" + row.ToString()].Value = dr.category;
this.fpSpread1.ActiveSheet.Cells["H" + row.ToString()].Value = dr.subcate;
this.fpSpread1.ActiveSheet.Cells["I" + row.ToString()].Value = dr.name;
this.fpSpread1.ActiveSheet.Cells["J" + row.ToString()].Value = "--";
this.fpSpread1.ActiveSheet.Cells["K" + row.ToString()].Value = "--";
this.fpSpread1.ActiveSheet.Cells["L" + row.ToString()].Value = dr.part;
var str_fanout = dr.fanout == null ? "New" : ((bool)dr.fanout ? "Fan-Out" : "New");
this.fpSpread1.ActiveSheet.Cells["M" + row.ToString()].Value = str_fanout;
this.fpSpread1.ActiveSheet.Cells["N" + row.ToString()].Value = item.Sum(t => t.costo);
this.fpSpread1.ActiveSheet.Cells["O" + row.ToString()].Value = item.Sum(t => t.costn);
this.fpSpread1.ActiveSheet.Cells["AM" + row.ToString()].Value = dr.userManager;
//1월수량
var colZ = GetColIndex("Z");
for (int ii = 0; ii < 12; ii++)
{
var psd = new DateTime(2021,ii+1,1);
var ped = psd.AddMonths(1).AddDays(-1);
var datas = item.Where(t => t.pdate.CompareTo(psd.ToShortDateString()) >= 0 && t.pdate.CompareTo(ped.ToShortDateString()) <= 0);
var tCnt = datas.Count();
this.fpSpread1.ActiveSheet.Cells[row, colZ + ii].Value = tCnt;// datas.Count();
}
row += 1;
}
//var 분류목록 = db.EETGW_JobReport_EBoard.Where(t => string.IsNullOrEmpty(t.분류) == false).OrderBy(t => t.분류).GroupBy(t => t.분류).ToList();
//var 담당목록 = db.vGroupUser.Where(t => t.gcode == FCOMMON.info.Login.gcode && t.processs == "전자실" && string.IsNullOrEmpty(t.state) == true).OrderBy(t => t.name).GroupBy(t => t.name);
//var row = 1;
//var col = 1;
//var col0 = 1;
//foreach (var item in 분류목록)
//{
// var dr = item.FirstOrDefault();
// var cell = this.fpSpread1.Sheets[0].Cells[row, col + 0];
// cell.Value = dr.분류;
// cell.ColumnSpan = 2;
// cell.BackColor = Color.SkyBlue;
// cell.HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Center;
// cell.VerticalAlignment = FarPoint.Win.Spread.CellVerticalAlignment.Center;
// cell = this.fpSpread1.Sheets[0].Cells[row + 1, col + 0];
// cell.Value = "건";
// cell.BackColor = Color.Khaki;
// cell.HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Center;
// cell.VerticalAlignment = FarPoint.Win.Spread.CellVerticalAlignment.Center;
// cell = this.fpSpread1.Sheets[0].Cells[row + 1, col + 1];
// cell.Value = "시간";
// cell.BackColor = Color.Khaki;
// cell.HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Center;
// cell.VerticalAlignment = FarPoint.Win.Spread.CellVerticalAlignment.Center;
// col += 2;
// col0 += 1;
//}
////마지막 열에는 비용절감항목을 추가한다.
//fpSpread1.Sheets[0].Cells[1, col].Value = "비용절감";
//fpSpread1.Sheets[0].Cells[1, col].BackColor = Color.WhiteSmoke;
//fpSpread1.Sheets[0].Cells[1, col].RowSpan = 2;
//fpSpread1.Sheets[0].Cells[1, col].VerticalAlignment = FarPoint.Win.Spread.CellVerticalAlignment.Center;
//fpSpread1.Sheets[0].Cells[1, col].HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Center;
//var MaxCol = col0;
//col = 0;
//row = 3;
//foreach (var item in 담당목록)
//{
// //var dr = item.KeY;
// this.fpSpread1.Sheets[0].Cells[row, col].Value = item.Key;
// //이 담당자의 횟수를 읽어온다
// for (int i = 1; i < MaxCol; i++)
// {
// var 분류명 = fpSpread1.Sheets[0].Cells[1, 1 + (i - 1) * 2].Value.ToString();
// var 분류데이터 = 기간자료.Where(t => t.uid.Contains(item.Key) && t.분류 == 분류명);
// var 건수 = 분류데이터.Count();
// var 시간 = 분류데이터.Sum(t => t.RepairTime);
// this.fpSpread1.Sheets[0].Cells[row, (i - 1) * 2 + 1].Value = 건수;
// this.fpSpread1.Sheets[0].Cells[row, (i - 1) * 2 + 2].Value = 시간;
// this.fpSpread1.Sheets[0].Cells[row, (i - 1) * 2 + 2].HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Center;
// this.fpSpread1.Sheets[0].Cells[row, (i - 1) * 2 + 2].VerticalAlignment = FarPoint.Win.Spread.CellVerticalAlignment.Center;
// this.fpSpread1.Sheets[0].Cells[row, (i - 1) * 2 + 1].Column.Width = 50;
// this.fpSpread1.Sheets[0].Cells[row, (i - 1) * 2 + 2].Column.Width = 70;
// }
// //이 담당자의 수리완료건의 비용절감비용을 가져온다
// var 절감비용 = 기간자료.Where(t => t.uid.Contains(item.Key) && t.분류 == "수리완료" && string.IsNullOrEmpty(t.수리완료일) == false && string.IsNullOrEmpty(t.외주업체) == true).Sum(t => t.CostReduction);
// this.fpSpread1.Sheets[0].Cells[row, (MaxCol) * 2 - 1].Value = 절감비용;
// this.fpSpread1.Sheets[0].Cells[row, (MaxCol) * 2 - 1].BackColor = Color.WhiteSmoke;
// this.fpSpread1.Sheets[0].Cells[row, (MaxCol) * 2 - 1].VerticalAlignment = FarPoint.Win.Spread.CellVerticalAlignment.Center;
// this.fpSpread1.Sheets[0].Cells[row, (MaxCol) * 2 - 1].HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Center;
// row += 1;
//}
//this.fpSpread1.Sheets[0].Cells[row, 0].Value = "합계";
//for (int i = 1; i < MaxCol; i++)
//{
// var colIdx = (i - 1) * 2;
// var c1 = (char)(65 + colIdx + 1);
// var c2 = (char)(65 + colIdx + 2);
// this.fpSpread1.Sheets[0].Cells[row, colIdx + 1].Formula = $"SUM({c1}4:{c1}" + row.ToString() + ")";
// this.fpSpread1.Sheets[0].Cells[row, colIdx + 2].Formula = $"SUM({c2}4:{c2}" + row.ToString() + ")";
//}
//var c3 = (char)(65 + MaxCol * 2 - 1);
//this.fpSpread1.Sheets[0].Cells[row, (MaxCol) * 2 - 1].Formula = $"SUM({c3}4:{c3}" + row.ToString() + ")";
//this.fpSpread1.Sheets[0].Cells["A1"].Value = "Performance";
//this.fpSpread1.Sheets[0].Cells["A1"].ColumnSpan = MaxCol * 2;
//this.fpSpread1.Sheets[0].Cells["A2"].Value = "성명";
//this.fpSpread1.Sheets[0].Cells["A2"].RowSpan = 2;
//this.fpSpread1.Sheets[0].Cells[$"A2:A{row}"].BackColor = Color.WhiteSmoke;
////합계필드 색상변경
//this.fpSpread1.Sheets[0].Cells[$"A{row + 1}:{c3}{row + 1}"].BackColor = Color.WhiteSmoke;
////this.fpSpread1.Sheets[0].Cells[$"A{row + 1}:{c3}{row + 1}"].Border =
//// new FarPoint.Win.ComplexBorder(
//// new FarPoint.Win.ComplexBorderSide(FarPoint.Win.ComplexBorderSideStyle.MediumLine));
////모든열을 중앙정렬한다
this.fpSpread1.ActiveSheetIndex = 0;
this.fpSpread1.Invalidate();
}
private void btSave_Click(object sender, EventArgs e)
{
//파일저장
var sd = new SaveFileDialog();
sd.Filter = "excel|*.xls";
if (sd.ShowDialog() == DialogResult.OK)
{
this.fpSpread1.SaveExcel(sd.FileName);
}
}
private void panel1_MouseDoubleClick(object sender, MouseEventArgs e)
{
LoadExcel();
}
}
}

View File

@@ -0,0 +1,135 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="fpSpread1_Sheet1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>397, 17</value>
</metadata>
<metadata name="fpSpread1_Sheet1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>397, 17</value>
</metadata>
<metadata name="ta.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>549, 17</value>
</metadata>
<metadata name="dsReport.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>611, 17</value>
</metadata>
<metadata name="bs.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>713, 17</value>
</metadata>
</root>