..
This commit is contained in:
		
							
								
								
									
										112
									
								
								SubProject/FPJ0000/EBoard/fEBoardReport.Designer.cs
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										112
									
								
								SubProject/FPJ0000/EBoard/fEBoardReport.Designer.cs
									
									
									
										generated
									
									
									
								
							| @@ -41,6 +41,12 @@ namespace FPJ0000.EBoard | ||||
|             this.dts = new System.Windows.Forms.DateTimePicker(); | ||||
|             this.btRefresh = new System.Windows.Forms.Button(); | ||||
|             this.panel1 = new System.Windows.Forms.Panel(); | ||||
|             this.radioButton2 = new System.Windows.Forms.RadioButton(); | ||||
|             this.radioButton1 = new System.Windows.Forms.RadioButton(); | ||||
|             this.button4 = new System.Windows.Forms.Button(); | ||||
|             this.button3 = new System.Windows.Forms.Button(); | ||||
|             this.button2 = new System.Windows.Forms.Button(); | ||||
|             this.button1 = new System.Windows.Forms.Button(); | ||||
|             this.dsReport = new FPJ0000.dsReport(); | ||||
|             this.bs = new System.Windows.Forms.BindingSource(this.components); | ||||
|             ((System.ComponentModel.ISupportInitialize)(this.fpSpread1)).BeginInit(); | ||||
| @@ -54,11 +60,11 @@ namespace FPJ0000.EBoard | ||||
|             //  | ||||
|             this.fpSpread1.AccessibleDescription = ""; | ||||
|             this.fpSpread1.Dock = System.Windows.Forms.DockStyle.Fill; | ||||
|             this.fpSpread1.Location = new System.Drawing.Point(0, 58); | ||||
|             this.fpSpread1.Location = new System.Drawing.Point(0, 68); | ||||
|             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.Size = new System.Drawing.Size(1114, 529); | ||||
|             this.fpSpread1.TabIndex = 7; | ||||
|             //  | ||||
|             // fpSpread1_Sheet1 | ||||
| @@ -83,7 +89,7 @@ namespace FPJ0000.EBoard | ||||
|             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.Size = new System.Drawing.Size(75, 58); | ||||
|             this.btSave.TabIndex = 12; | ||||
|             this.btSave.Text = "파일저장"; | ||||
|             this.btSave.UseVisualStyleBackColor = true; | ||||
| @@ -92,15 +98,15 @@ namespace FPJ0000.EBoard | ||||
|             // label3 | ||||
|             //  | ||||
|             this.label3.AutoSize = true; | ||||
|             this.label3.Location = new System.Drawing.Point(261, 27); | ||||
|             this.label3.Location = new System.Drawing.Point(17, 42); | ||||
|             this.label3.Name = "label3"; | ||||
|             this.label3.Size = new System.Drawing.Size(14, 12); | ||||
|             this.label3.Size = new System.Drawing.Size(41, 12); | ||||
|             this.label3.TabIndex = 9; | ||||
|             this.label3.Text = "~"; | ||||
|             this.label3.Text = "종료일"; | ||||
|             //  | ||||
|             // dte | ||||
|             //  | ||||
|             this.dte.Location = new System.Drawing.Point(289, 23); | ||||
|             this.dte.Location = new System.Drawing.Point(68, 38); | ||||
|             this.dte.Name = "dte"; | ||||
|             this.dte.Size = new System.Drawing.Size(180, 21); | ||||
|             this.dte.TabIndex = 8; | ||||
| @@ -108,15 +114,15 @@ namespace FPJ0000.EBoard | ||||
|             // label2 | ||||
|             //  | ||||
|             this.label2.AutoSize = true; | ||||
|             this.label2.Location = new System.Drawing.Point(10, 27); | ||||
|             this.label2.Location = new System.Drawing.Point(17, 15); | ||||
|             this.label2.Name = "label2"; | ||||
|             this.label2.Size = new System.Drawing.Size(53, 12); | ||||
|             this.label2.Size = new System.Drawing.Size(41, 12); | ||||
|             this.label2.TabIndex = 7; | ||||
|             this.label2.Text = "검색기간"; | ||||
|             this.label2.Text = "시작일"; | ||||
|             //  | ||||
|             // dts | ||||
|             //  | ||||
|             this.dts.Location = new System.Drawing.Point(68, 23); | ||||
|             this.dts.Location = new System.Drawing.Point(68, 11); | ||||
|             this.dts.Name = "dts"; | ||||
|             this.dts.Size = new System.Drawing.Size(180, 21); | ||||
|             this.dts.TabIndex = 6; | ||||
| @@ -126,7 +132,7 @@ namespace FPJ0000.EBoard | ||||
|             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.Size = new System.Drawing.Size(75, 58); | ||||
|             this.btRefresh.TabIndex = 2; | ||||
|             this.btRefresh.Text = "새로고침"; | ||||
|             this.btRefresh.UseVisualStyleBackColor = true; | ||||
| @@ -135,6 +141,12 @@ namespace FPJ0000.EBoard | ||||
|             // panel1 | ||||
|             //  | ||||
|             this.panel1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(200)))), ((int)(((byte)(200)))), ((int)(((byte)(200))))); | ||||
|             this.panel1.Controls.Add(this.radioButton2); | ||||
|             this.panel1.Controls.Add(this.radioButton1); | ||||
|             this.panel1.Controls.Add(this.button4); | ||||
|             this.panel1.Controls.Add(this.button3); | ||||
|             this.panel1.Controls.Add(this.button2); | ||||
|             this.panel1.Controls.Add(this.button1); | ||||
|             this.panel1.Controls.Add(this.btSave); | ||||
|             this.panel1.Controls.Add(this.label3); | ||||
|             this.panel1.Controls.Add(this.dte); | ||||
| @@ -145,10 +157,76 @@ namespace FPJ0000.EBoard | ||||
|             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.Size = new System.Drawing.Size(1114, 68); | ||||
|             this.panel1.TabIndex = 6; | ||||
|             this.panel1.Paint += new System.Windows.Forms.PaintEventHandler(this.panel1_Paint); | ||||
|             this.panel1.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.panel1_MouseDoubleClick); | ||||
|             //  | ||||
|             // radioButton2 | ||||
|             //  | ||||
|             this.radioButton2.AutoSize = true; | ||||
|             this.radioButton2.Font = new System.Drawing.Font("Consolas", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); | ||||
|             this.radioButton2.Location = new System.Drawing.Point(471, 36); | ||||
|             this.radioButton2.Name = "radioButton2"; | ||||
|             this.radioButton2.Size = new System.Drawing.Size(128, 26); | ||||
|             this.radioButton2.TabIndex = 17; | ||||
|             this.radioButton2.TabStop = true; | ||||
|             this.radioButton2.Text = "Capability"; | ||||
|             this.radioButton2.UseVisualStyleBackColor = true; | ||||
|             //  | ||||
|             // radioButton1 | ||||
|             //  | ||||
|             this.radioButton1.AutoSize = true; | ||||
|             this.radioButton1.Checked = true; | ||||
|             this.radioButton1.Font = new System.Drawing.Font("Consolas", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); | ||||
|             this.radioButton1.Location = new System.Drawing.Point(471, 9); | ||||
|             this.radioButton1.Name = "radioButton1"; | ||||
|             this.radioButton1.Size = new System.Drawing.Size(208, 26); | ||||
|             this.radioButton1.TabIndex = 16; | ||||
|             this.radioButton1.TabStop = true; | ||||
|             this.radioButton1.Text = "Performance Report"; | ||||
|             this.radioButton1.UseVisualStyleBackColor = true; | ||||
|             //  | ||||
|             // button4 | ||||
|             //  | ||||
|             this.button4.Location = new System.Drawing.Point(405, 10); | ||||
|             this.button4.Name = "button4"; | ||||
|             this.button4.Size = new System.Drawing.Size(48, 49); | ||||
|             this.button4.TabIndex = 15; | ||||
|             this.button4.Text = "일"; | ||||
|             this.button4.UseVisualStyleBackColor = true; | ||||
|             this.button4.Click += new System.EventHandler(this.button3_Click); | ||||
|             //  | ||||
|             // button3 | ||||
|             //  | ||||
|             this.button3.Location = new System.Drawing.Point(252, 10); | ||||
|             this.button3.Name = "button3"; | ||||
|             this.button3.Size = new System.Drawing.Size(48, 49); | ||||
|             this.button3.TabIndex = 14; | ||||
|             this.button3.Text = "년"; | ||||
|             this.button3.UseVisualStyleBackColor = true; | ||||
|             this.button3.Click += new System.EventHandler(this.button3_Click); | ||||
|             //  | ||||
|             // button2 | ||||
|             //  | ||||
|             this.button2.Location = new System.Drawing.Point(354, 10); | ||||
|             this.button2.Name = "button2"; | ||||
|             this.button2.Size = new System.Drawing.Size(48, 49); | ||||
|             this.button2.TabIndex = 13; | ||||
|             this.button2.Text = "주"; | ||||
|             this.button2.UseVisualStyleBackColor = true; | ||||
|             this.button2.Click += new System.EventHandler(this.button3_Click); | ||||
|             //  | ||||
|             // button1 | ||||
|             //  | ||||
|             this.button1.Location = new System.Drawing.Point(303, 10); | ||||
|             this.button1.Name = "button1"; | ||||
|             this.button1.Size = new System.Drawing.Size(48, 49); | ||||
|             this.button1.TabIndex = 13; | ||||
|             this.button1.Text = "월"; | ||||
|             this.button1.UseVisualStyleBackColor = true; | ||||
|             this.button1.Click += new System.EventHandler(this.button3_Click); | ||||
|             //  | ||||
|             // dsReport | ||||
|             //  | ||||
|             this.dsReport.DataSetName = "dsReport"; | ||||
| @@ -169,7 +247,7 @@ namespace FPJ0000.EBoard | ||||
|             this.Controls.Add(this.panel1); | ||||
|             this.Name = "fEBoardReport"; | ||||
|             this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; | ||||
|             this.Text = "전자실 Performance Report"; | ||||
|             this.Text = "전자실 Report"; | ||||
|             this.WindowState = System.Windows.Forms.FormWindowState.Maximized; | ||||
|             this.Load += new System.EventHandler(this.fEBoardReport_Load); | ||||
|             ((System.ComponentModel.ISupportInitialize)(this.fpSpread1)).EndInit(); | ||||
| @@ -197,5 +275,11 @@ namespace FPJ0000.EBoard | ||||
|         private System.Windows.Forms.Panel panel1; | ||||
|         private dsReport dsReport; | ||||
|         private System.Windows.Forms.BindingSource bs; | ||||
|         private System.Windows.Forms.Button button1; | ||||
|         private System.Windows.Forms.Button button2; | ||||
|         private System.Windows.Forms.Button button4; | ||||
|         private System.Windows.Forms.Button button3; | ||||
|         private System.Windows.Forms.RadioButton radioButton1; | ||||
|         private System.Windows.Forms.RadioButton radioButton2; | ||||
|     } | ||||
| } | ||||
| @@ -24,18 +24,58 @@ namespace FPJ0000.EBoard | ||||
|             Application.DoEvents(); | ||||
|  | ||||
|             //파일불러오기 | ||||
|             LoadExcel(); | ||||
|             //LoadExcel(); | ||||
|             this.fpSpread1.ActiveSheet.RowCount = 0; | ||||
|         } | ||||
|  | ||||
|         string Loadexcel = string.Empty; | ||||
|  | ||||
|         void LoadExcel() | ||||
|         { | ||||
|             //파일불러오기 | ||||
|             var fi = new System.IO.FileInfo(FCOMMON.Util.CurrentPath + "EBoardReport.xlsx"); | ||||
|             this.fpSpread1.OpenExcel(fi.FullName); | ||||
|             if (radioButton1.Checked) | ||||
|             { | ||||
|                 var fi = new System.IO.FileInfo(FCOMMON.Util.CurrentPath + "EBoardReport.xlsx"); | ||||
|                 if (this.Loadexcel != fi.FullName) | ||||
|                 { | ||||
|                     this.fpSpread1.OpenExcel(fi.FullName); | ||||
|                     this.Loadexcel = fi.FullName; | ||||
|                 } | ||||
|  | ||||
|             } | ||||
|             else | ||||
|             { | ||||
|                 var fi = new System.IO.FileInfo(FCOMMON.Util.CurrentPath + "EBoardReportCapa.xlsx"); | ||||
|                 if (this.Loadexcel != fi.FullName) | ||||
|                 { | ||||
|                     this.fpSpread1.OpenExcel(fi.FullName); | ||||
|                     this.Loadexcel = fi.FullName; | ||||
|                 } | ||||
|             } | ||||
|         } | ||||
|  | ||||
|         private void btRefresh_Click(object sender, EventArgs e) | ||||
|         { | ||||
|             RefreshData(); | ||||
|         } | ||||
|         void RefreshData() | ||||
|         { | ||||
|  | ||||
|  | ||||
|             LoadExcel(); | ||||
|  | ||||
|             if (radioButton1.Checked) Refresh1(); | ||||
|             else Refresh2(); | ||||
|  | ||||
|  | ||||
|             this.fpSpread1.Invalidate(); | ||||
|         } | ||||
|  | ||||
|         void Refresh1() | ||||
|         { | ||||
|  | ||||
|  | ||||
|  | ||||
|             //새로고침 | ||||
|             //a2 에 날짜를 표시함. | ||||
|             var db = new EEEntities(); | ||||
| @@ -143,12 +183,174 @@ namespace FPJ0000.EBoard | ||||
|             //    new FarPoint.Win.ComplexBorder( | ||||
|             //        new FarPoint.Win.ComplexBorderSide(FarPoint.Win.ComplexBorderSideStyle.MediumLine));  | ||||
|  | ||||
|             //차트데이터 | ||||
|             var chart1 = this.fpSpread1.ActiveSheet.Charts[0]; | ||||
|             chart1.Model.LabelAreas[0].Text = "Technical Support Q'ty & Cost Save(Kwon)";   //상단차트제목 | ||||
|  | ||||
|             //모든열을 중앙정렬한다 | ||||
|             var ser1 = chart1.Model.PlotAreas[0].Series[0] as FarPoint.Win.Chart.ClusteredBarSeries; | ||||
|             var ser1_df = ser1.Series[0].Values.DataSource as FarPoint.Win.Spread.Chart.SeriesDataField; | ||||
|             var ser1_cn = ser1.Series[0].CategoryNames.DataSource as FarPoint.Win.Spread.Chart.SeriesDataField; | ||||
|             ser1_df.Formula = $"Performance!$R$4:$R${row}"; | ||||
|             ser1_cn.Formula = $"Performance!$A$4:$A${row}"; | ||||
|  | ||||
|             var ser2 = chart1.Model.PlotAreas[0].Series[1] as FarPoint.Win.Chart.LineSeries; | ||||
|             var ser2_df = ser2.Values.DataSource as FarPoint.Win.Spread.Chart.SeriesDataField; | ||||
|             var ser2_cn = ser2.CategoryNames.DataSource as FarPoint.Win.Spread.Chart.SeriesDataField; | ||||
|             ser2_df.Formula = $"Performance!$D$4:$D${row}"; | ||||
|             ser2_cn.Formula = $"Performance!$A$4:$A${row}"; | ||||
|  | ||||
|             this.fpSpread1.Invalidate(); | ||||
|             var chart2 = this.fpSpread1.ActiveSheet.Charts[1]; //qty | ||||
|             var ser21 = chart2.Model.PlotAreas[0].Series[0] as FarPoint.Win.Chart.PieSeries; | ||||
|             var ser21_df = ser21.Values.DataSource as FarPoint.Win.Spread.Chart.SeriesDataField; | ||||
|             var ser21_cn = ser21.CategoryNames.DataSource as FarPoint.Win.Spread.Chart.SeriesDataField; | ||||
|             ser21_df.Formula = $"Performance!$D$4:$D${row}"; | ||||
|             ser21_cn.Formula = $"Performance!$A$4:$A${row}"; | ||||
|  | ||||
|             var chart3 = this.fpSpread1.ActiveSheet.Charts[2]; //cost | ||||
|             var ser31 = chart3.Model.PlotAreas[0].Series[0] as FarPoint.Win.Chart.PieSeries; | ||||
|             var ser31_df = ser31.Values.DataSource as FarPoint.Win.Spread.Chart.SeriesDataField; | ||||
|             var ser31_cn = ser31.CategoryNames.DataSource as FarPoint.Win.Spread.Chart.SeriesDataField; | ||||
|             ser31_df.Formula = $"Performance!$R$4:$R${row}"; | ||||
|             ser31_cn.Formula = $"Performance!$A$4:$A${row}"; | ||||
|         } | ||||
|         void Refresh2() | ||||
|         { | ||||
|             //Process / Equipment / BordName 으로 그룹핑 | ||||
|             //a2 에 날짜를 표시함. | ||||
|  | ||||
|             this.progressBar2.Value = 0; | ||||
|  | ||||
|             var db = new EEEntities(); | ||||
|             var sd = this.dts.Value.ToShortDateString(); | ||||
|             var ed = this.dte.Value.ToShortDateString(); | ||||
|  | ||||
|             var fi = new System.IO.FileInfo(FCOMMON.Util.CurrentPath + "EBoardReportCapa.xlsx"); | ||||
|             this.fpSpread1.OpenExcel(fi.FullName); | ||||
|             this.Loadexcel = fi.FullName; | ||||
|  | ||||
|             var 기간자료 = db.EETGW_JobReport_EBoard.Where(t => t.gcode == FCOMMON.info.Login.gcode &&  t.pdate.CompareTo(sd) >= 0 && t.pdate.CompareTo(ed) <= 0); | ||||
|             var Grp_process = 기간자료.GroupBy(t => t.Process); | ||||
|  | ||||
|             this.fpSpread1.Sheets[0].ColumnCount = 5; | ||||
|             var row = 3; | ||||
|  | ||||
|             this.progressBar2.Maximum = Grp_process.Count(); | ||||
|             foreach (var item in Grp_process) | ||||
|             { | ||||
|                 this.progressBar2.Value += 1; | ||||
|  | ||||
|                 //포맷초기화 | ||||
|                 //var rangec = this.fpSpread1.Sheets[0].Cells[$"A{row}:D{row}"]; | ||||
|                 //rangec.BackColor = Color.White; | ||||
|                 //rangec.RowSpan = 1; | ||||
|                 //rangec.ColumnSpan = 1; | ||||
|                 //rangec.HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Center; | ||||
|                 //rangec.VerticalAlignment = FarPoint.Win.Spread.CellVerticalAlignment.Center; | ||||
|  | ||||
|                 var dr = item.FirstOrDefault(); | ||||
|                 var cell = this.fpSpread1.Sheets[0].Cells[$"A{row}"]; | ||||
|                 cell.Value = dr.Process; | ||||
|                 //cell.BackColor = Color.Lime; | ||||
|  | ||||
|                 var row_grp = row; | ||||
|  | ||||
|                 //이것아래의 모델그룹을 찾는다. | ||||
|                 var grp_model = item.GroupBy(t => t.Model); | ||||
|                 var cntg1 = 0; | ||||
|                 foreach (var itemModel in grp_model) | ||||
|                 { | ||||
|                     var drModel = itemModel.FirstOrDefault(); | ||||
|                     var cellModel = this.fpSpread1.Sheets[0].Cells[$"B{row}"]; | ||||
|                     cellModel.Value = drModel.Model; | ||||
|                     cellModel.BackColor = Color.White; | ||||
|  | ||||
|                     var row_mod = row; | ||||
|  | ||||
|                     if (cntg1 > 0) | ||||
|                     { | ||||
|                         this.fpSpread1.Sheets[0].Cells[$"A{row}"].Value = string.Empty; | ||||
|                     } | ||||
|  | ||||
|                     //이것아래의 보드를 찾는다. | ||||
|                     var grp_brd = itemModel.GroupBy(t => t.BoardName); | ||||
|                     var cntg2 = 0; | ||||
|                     foreach (var itemBrd in grp_brd) | ||||
|                     { | ||||
|                         var drBrd = itemBrd.FirstOrDefault(); | ||||
|                         var cellBrd = this.fpSpread1.Sheets[0].Cells[$"C{row}"]; | ||||
|                         cellBrd.Value = drBrd.BoardName; | ||||
|                         cellBrd.BackColor = Color.White; | ||||
|  | ||||
|                         if (cntg2 > 0) | ||||
|                         { | ||||
|                             this.fpSpread1.Sheets[0].Cells[$"A{row}"].Value = string.Empty; | ||||
|                             this.fpSpread1.Sheets[0].Cells[$"B{row}"].Value = string.Empty; | ||||
|                         } | ||||
|  | ||||
|                         //합계수량 | ||||
|                         var sumQty = itemBrd.Sum(t => t.QTY); | ||||
|                         var sumAmt = itemBrd.Sum(t => t.CostReduction); | ||||
|  | ||||
|                         var cellQty = this.fpSpread1.Sheets[0].Cells[$"D{row}"]; | ||||
|                         var cellAmt = this.fpSpread1.Sheets[0].Cells[$"E{row}"]; | ||||
|                         cellQty.Value = sumQty; | ||||
|                         cellAmt.Value = sumAmt; | ||||
|  | ||||
|                         cntg2 += 1; | ||||
|                         cntg1 += 1; | ||||
|                         if (grp_brd.Count() > 1) | ||||
|                             row += 1; | ||||
|                     } | ||||
|  | ||||
|                     //소계를 추가한다. | ||||
|                     if (cntg2 > 1) | ||||
|                     { | ||||
|                         this.fpSpread1.Sheets[0].Cells[$"A{row}"].Value = string.Empty; | ||||
|                         this.fpSpread1.Sheets[0].Cells[$"B{row}"].Value = string.Empty; | ||||
|                         this.fpSpread1.Sheets[0].Cells[$"C{row}"].Value = $"({drModel.Model}) Sub Total"; | ||||
|                         this.fpSpread1.Sheets[0].Cells[$"C{row}"].HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Left; | ||||
|  | ||||
|  | ||||
|                         this.fpSpread1.Sheets[0].Cells[$"D{row}"].Value = itemModel.Sum(t => t.QTY); | ||||
|                         this.fpSpread1.Sheets[0].Cells[$"E{row}"].Value = itemModel.Sum(t => t.CostReduction); | ||||
|                         this.fpSpread1.Sheets[0].Cells[$"C{row}:E{row}"].BackColor = Color.FromArgb(200,200,200); | ||||
|                         this.fpSpread1.Sheets[0].Cells[$"B{row_mod}"].RowSpan = row - row_mod + 1; | ||||
|                     } | ||||
|  | ||||
|  | ||||
|                     //cntg1 += cntg2; | ||||
|                     if ((grp_model.Count() + grp_brd.Count()) > 2) | ||||
|                         row += 1; | ||||
|                 } | ||||
|  | ||||
|                 if (cntg1 > 1) | ||||
|                 { | ||||
|                     this.fpSpread1.Sheets[0].Cells[$"A{row}"].Value = string.Empty; | ||||
|                     this.fpSpread1.Sheets[0].Cells[$"B{row}"].Value = $"({dr.Process}) Sub Total"; | ||||
|                     this.fpSpread1.Sheets[0].Cells[$"B{row}"].HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Left; | ||||
|                     this.fpSpread1.Sheets[0].Cells[$"B{row}"].ColumnSpan = 2; | ||||
|                     //this.fpSpread1.Sheets[0].Cells[$"C{row}"].Value = string.Empty;// item.Count(); | ||||
|                     this.fpSpread1.Sheets[0].Cells[$"D{row}"].Value = item.Sum(t => t.QTY); | ||||
|                     this.fpSpread1.Sheets[0].Cells[$"E{row}"].Value = item.Sum(t => t.CostReduction); | ||||
|                     this.fpSpread1.Sheets[0].Cells[$"B{row}:E{row}"].BackColor = Color.FromArgb(150, 150, 150); | ||||
|                     this.fpSpread1.Sheets[0].Cells[$"A{row_grp}"].RowSpan = row-row_grp+1 ; | ||||
|                 } | ||||
|  | ||||
|                 row += 1; | ||||
|             } | ||||
|             this.fpSpread1.Sheets[0].Cells[$"A{row}"].Value = "Total"; | ||||
|             this.fpSpread1.Sheets[0].Cells[$"B{row}"].Value = string.Empty;// $"({dr.Process})-{cntg1}";             | ||||
|             this.fpSpread1.Sheets[0].Cells[$"C{row}"].Value = string.Empty;// item.Count(); | ||||
|             this.fpSpread1.Sheets[0].Cells[$"D{row}"].Value = 기간자료.Sum(t => t.QTY); | ||||
|             this.fpSpread1.Sheets[0].Cells[$"E{row}"].Value = 기간자료.Sum(t => t.CostReduction); | ||||
|  | ||||
|             this.fpSpread1.Sheets[0].Cells[$"A{row}:E{row}"].BackColor = Color.SkyBlue; | ||||
|  | ||||
|             this.fpSpread1.Sheets[0].RowCount = row; | ||||
|             this.progressBar2.Value = this.progressBar2.Maximum; | ||||
|         } | ||||
|  | ||||
|  | ||||
|  | ||||
|         private void btSave_Click(object sender, EventArgs e) | ||||
|         { | ||||
| @@ -165,5 +367,36 @@ namespace FPJ0000.EBoard | ||||
|         { | ||||
|             LoadExcel(); | ||||
|         } | ||||
|  | ||||
|         private void button3_Click(object sender, EventArgs e) | ||||
|         { | ||||
|             var bt = sender as Button; | ||||
|             if (bt.Text == "년") | ||||
|             { | ||||
|                 dts.Value = new DateTime(DateTime.Now.Year, 1, 1); | ||||
|                 dte.Value = new DateTime(DateTime.Now.Year, 12, 31); | ||||
|             } | ||||
|             if (bt.Text == "월") | ||||
|             { | ||||
|                 dts.Value = new DateTime(DateTime.Now.Year, DateTime.Now.Month, 1); | ||||
|                 dte.Value = dts.Value.AddMonths(1).AddDays(-1); | ||||
|             } | ||||
|             if (bt.Text == "주") | ||||
|             { | ||||
|                 dts.Value = DateTime.Now.AddDays(-(int)DateTime.Now.DayOfWeek); | ||||
|                 dte.Value = DateTime.Now.AddDays(6 - (int)DateTime.Now.DayOfWeek); | ||||
|             } | ||||
|             if (bt.Text == "일") | ||||
|             { | ||||
|                 dts.Value = DateTime.Now; | ||||
|                 dte.Value = DateTime.Now; | ||||
|             } | ||||
|             RefreshData(); | ||||
|         } | ||||
|  | ||||
|         private void panel1_Paint(object sender, PaintEventArgs e) | ||||
|         { | ||||
|  | ||||
|         } | ||||
|     } | ||||
| } | ||||
|   | ||||
| @@ -223,20 +223,20 @@ | ||||
|   <data name="toolStripButton1.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> | ||||
|     <value> | ||||
|         iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 | ||||
|         YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAL2SURBVDhPhZLrS1NxGMf3qv6EsF70MpBS0sjIF+XSmhnY | ||||
|         zVTMcjqnVGqWC4vMmEqmGZq4QYUoRS8qpIub1szc5nKjLTLN+/1Wrpa7H3fOmd9+52yogdADH54Xv9/z | ||||
|         4Tzf8xNwFXdTm3Gs2qhJvGf8k1Bp9JJO8dRw3UQlVvdQR+8a+qNl+rrQpOeb+KH1FV/Rrbc6qd9Wu5u1 | ||||
|         uZdhc63x28lBYXDBiZI3MxDXDnlEeerNwdFAJVQarH+cXrZnioZpmoFphoFxioFh0gft6DLaB9xYZoDW | ||||
|         IS9KXk0j68Gg9x+JqELndXh8sMyy+DLLkM7gMy/xQTe2jPcDHiLww7LAwjRPo1w9A+H1zmf8cEpNzMSZ | ||||
|         yqQVqeIUshpOo+FdM8paaiAsDUMMQVS+H3HyvahtreVXcVEMFpc8iLuhY3hBcrXwZWefCqqRx2gwFvGS | ||||
|         8/VHUfQ0HfnNqZAojyNTmYnW3kWo+l14+80BO8npsLyb4gWiOtHmxDsFrHG4C0/65KjS5vGSDEUCGT6B | ||||
|         3Ic50I+5+VU+jHihITksuWkcLvsUEHAVX6mjChvFMI8ZoDRdw52Oq0ipOYSM+iSYpzwwk2C5gPXjgUxs | ||||
|         RBAnXyc4cKuUjirejvQ6ESzjPSjvugC5uhCp92PRrH2Nr3MMzCTYnkkanwhWJw3h7aAgQhYijZRtQ35T | ||||
|         Gs4q4pFWe4SXFKrTIWvJIV8SC+7cMsPiM/eLCU4SZHSxISCIlG2Zi5RtJZdCEFkUgpNVsbj4SAz9gAbl | ||||
|         mmJceCGGRJEMMxGYyNswEgFF+xF1Rbu2wsHibmrBTqF3juXRDc/jcmMussmgVJmKq02XVs84PD4WEQWa | ||||
|         NcG+Ii01a1sT/A83WSE8p22doPCjZ/SHY2Wjyxvhpnz+XRkqV3CcBJnbMbHg8DhHf7r8E7+8mLB6MRbk | ||||
|         l4vm4ZJ3USz3iPw+mrbvONf2PTguEOzJfXcxXNLesVuqsYVL1dQq2QHCslUBJCoqVNK2tDOz7UOYWJ0l | ||||
|         EAgEfwHCoaJtQ43MrwAAAABJRU5ErkJggg== | ||||
|         YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAL4SURBVDhPhZLrS1NhHMf3qv6EsF70UohSSiupF5WpTQ3s | ||||
|         ZipleZlTLLWhK4PMmJNMW2iiQkUkRS8qonRObV6ac7nRjEwzM++38DJ1l3Me3Tnz23PORisI+sGH58Vz | ||||
|         vh/O73uORJjIG4aU4xVmfdxd87K01MzSk4hohNNC4ip6SMwd08BBpbFqR/yLTWLoz4ku7TYuOMjST5ud | ||||
|         t7nWYHP6WXIIEHybc6CoYQoXNEOMNEe32Rf1TmyZaWFxxcn3TLhhmeRgmeJgnuBgGl+H4ccaWgZdWOMA | ||||
|         7RCLojeTSL8/wP4liVJ1snZmHb3TPD5Nc/Tk8FGUrKNrZA3vBhkq8KB3jodl1g21bgrh1zuei+FEzZGx | ||||
|         s6XxG/La00ivOYOa1nqUvNYgvDgIRyhS9QFEqvahUlspruIkHOZXGERe6+JEQUJF+KuO/iY0DT9CjblA | ||||
|         lFysjkHBs2Tk1idBVncCaXVp0PbNo2nAicYvdqzSnqJU3UQUSKukm4+r83jz9/d42q9CuSFHlKTUxtLw | ||||
|         SWQ9yIRxxCWu0j7MQk97WHG5EVXywSsQJrqsiygep8I6YkKd5Sput+UjUXMUKdXxsE4wsNJihYKNo95O | ||||
|         bFQQqfpDcOhmsXt/4XYkV0nRO9oD9ftsqHQKJN2LQL3hLT7PcLDSYnvG3fhAWXC4EX7LJ9ijDJCHKLch | ||||
|         98k5nK+NxrnKY6JEoUuG8nUmfZMICPe9Uzw+Cp+Y4qBFhilNXkGIcstMiHIrfSgAIQUBOFUegUsPU2Ec | ||||
|         1EOtL0T2y1TIahNgpQIL/TfMVEDcHoTmGfwrHFZ2k7lVgr4ZXqTr+yyuPM5CBg3K65KQ/+Ty7zsBZp1H | ||||
|         cF6LX7BXYSDTNr/gf7joCsGZWr8gTNHJDM0sb/zr4X9hd7GeXRe1Tl+cFpnVNjZtZxxDs6uesUUWYwss | ||||
|         RnwsOt0iQvNOwsNmZzwsIauBF5q/+uISSWhW66VgWUvbbrneFixvJL/J8BKU0eBF1kACZc0rO9Oa24NS | ||||
|         dekSiUTyC9B/oc2h827VAAAAAElFTkSuQmCC | ||||
| </value> | ||||
|   </data> | ||||
|   <data name="toolStripButton2.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 chi
					chi