프로젝트정보에 우선순위 항목 추가(김태경s)
powerbi 용 프로젝트 정보 view 에 우선순위 값을 0에서 필드연결 ot/휴일 근무 집계표에 미승인데이터 표시가능해지고, ot+pms 같이 표시되게함(정봉석p)
This commit is contained in:
		
							
								
								
									
										150
									
								
								SubProject/FPJ0000/JobReport_/rJobReportOT.Designer.cs
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										150
									
								
								SubProject/FPJ0000/JobReport_/rJobReportOT.Designer.cs
									
									
									
										generated
									
									
									
								
							| @@ -29,11 +29,10 @@ | ||||
|         private void InitializeComponent() | ||||
|         { | ||||
|             this.components = new System.ComponentModel.Container(); | ||||
|             this.bs = new System.Windows.Forms.BindingSource(this.components); | ||||
|             this.dsReport = new FPJ0000.dsReport(); | ||||
|             this.ta = new FPJ0000.dsReportTableAdapters.jobReportTableAdapter(); | ||||
|             this.dataGridView1 = new arCtl.arDatagridView(); | ||||
|             this.panel1 = new System.Windows.Forms.Panel(); | ||||
|             this.radTypePMS = new System.Windows.Forms.RadioButton(); | ||||
|             this.radType = new System.Windows.Forms.RadioButton(); | ||||
|             this.tbEd = new System.Windows.Forms.TextBox(); | ||||
|             this.button1 = new System.Windows.Forms.Button(); | ||||
|             this.tbProcess = new System.Windows.Forms.ComboBox(); | ||||
| @@ -41,29 +40,18 @@ | ||||
|             this.linkLabel1 = new System.Windows.Forms.LinkLabel(); | ||||
|             this.btRefresh = new System.Windows.Forms.Button(); | ||||
|             this.tbSd = new System.Windows.Forms.TextBox(); | ||||
|             this.radType = new System.Windows.Forms.RadioButton(); | ||||
|             this.radTypePMS = new System.Windows.Forms.RadioButton(); | ||||
|             ((System.ComponentModel.ISupportInitialize)(this.bs)).BeginInit(); | ||||
|             ((System.ComponentModel.ISupportInitialize)(this.dsReport)).BeginInit(); | ||||
|             this.radTypeAll = new System.Windows.Forms.RadioButton(); | ||||
|             this.label2 = new System.Windows.Forms.Label(); | ||||
|             this.cmbApploval = new System.Windows.Forms.ComboBox(); | ||||
|             this.bs = new System.Windows.Forms.BindingSource(this.components); | ||||
|             this.dsReport = new FPJ0000.dsReport(); | ||||
|             this.ta = new FPJ0000.dsReportTableAdapters.jobReportTableAdapter(); | ||||
|             ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit(); | ||||
|             this.panel1.SuspendLayout(); | ||||
|             ((System.ComponentModel.ISupportInitialize)(this.bs)).BeginInit(); | ||||
|             ((System.ComponentModel.ISupportInitialize)(this.dsReport)).BeginInit(); | ||||
|             this.SuspendLayout(); | ||||
|             //  | ||||
|             // bs | ||||
|             //  | ||||
|             this.bs.DataMember = "jobreport"; | ||||
|             this.bs.DataSource = this.dsReport; | ||||
|             //  | ||||
|             // dsReport | ||||
|             //  | ||||
|             this.dsReport.DataSetName = "dsReport"; | ||||
|             this.dsReport.Namespace = "http://tempuri.org/dsReport.xsd"; | ||||
|             this.dsReport.SchemaSerializationMode = System.Data.SchemaSerializationMode.IncludeSchema; | ||||
|             //  | ||||
|             // ta | ||||
|             //  | ||||
|             this.ta.ClearBeforeFill = true; | ||||
|             //  | ||||
|             // dataGridView1 | ||||
|             //  | ||||
|             this.dataGridView1.A_DelCurrentCell = true; | ||||
| @@ -77,15 +65,18 @@ | ||||
|             this.dataGridView1.AutoSizeRowsMode = System.Windows.Forms.DataGridViewAutoSizeRowsMode.AllCells; | ||||
|             this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; | ||||
|             this.dataGridView1.Dock = System.Windows.Forms.DockStyle.Fill; | ||||
|             this.dataGridView1.Location = new System.Drawing.Point(0, 42); | ||||
|             this.dataGridView1.Location = new System.Drawing.Point(0, 36); | ||||
|             this.dataGridView1.Name = "dataGridView1"; | ||||
|             this.dataGridView1.ReadOnly = true; | ||||
|             this.dataGridView1.RowTemplate.Height = 23; | ||||
|             this.dataGridView1.Size = new System.Drawing.Size(1348, 657); | ||||
|             this.dataGridView1.Size = new System.Drawing.Size(1028, 663); | ||||
|             this.dataGridView1.TabIndex = 2; | ||||
|             //  | ||||
|             // panel1 | ||||
|             //  | ||||
|             this.panel1.Controls.Add(this.cmbApploval); | ||||
|             this.panel1.Controls.Add(this.label2); | ||||
|             this.panel1.Controls.Add(this.radTypeAll); | ||||
|             this.panel1.Controls.Add(this.radTypePMS); | ||||
|             this.panel1.Controls.Add(this.radType); | ||||
|             this.panel1.Controls.Add(this.tbEd); | ||||
| @@ -99,12 +90,34 @@ | ||||
|             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(1348, 42); | ||||
|             this.panel1.Size = new System.Drawing.Size(1028, 36); | ||||
|             this.panel1.TabIndex = 3; | ||||
|             //  | ||||
|             // radTypePMS | ||||
|             //  | ||||
|             this.radTypePMS.AutoSize = true; | ||||
|             this.radTypePMS.Location = new System.Drawing.Point(693, 11); | ||||
|             this.radTypePMS.Name = "radTypePMS"; | ||||
|             this.radTypePMS.Size = new System.Drawing.Size(50, 16); | ||||
|             this.radTypePMS.TabIndex = 11; | ||||
|             this.radTypePMS.Text = "PMS"; | ||||
|             this.radTypePMS.UseVisualStyleBackColor = true; | ||||
|             //  | ||||
|             // radType | ||||
|             //  | ||||
|             this.radType.AutoSize = true; | ||||
|             this.radType.Checked = true; | ||||
|             this.radType.Location = new System.Drawing.Point(637, 11); | ||||
|             this.radType.Name = "radType"; | ||||
|             this.radType.Size = new System.Drawing.Size(47, 16); | ||||
|             this.radType.TabIndex = 10; | ||||
|             this.radType.TabStop = true; | ||||
|             this.radType.Text = "대체"; | ||||
|             this.radType.UseVisualStyleBackColor = true; | ||||
|             //  | ||||
|             // tbEd | ||||
|             //  | ||||
|             this.tbEd.Location = new System.Drawing.Point(187, 11); | ||||
|             this.tbEd.Location = new System.Drawing.Point(187, 9); | ||||
|             this.tbEd.Name = "tbEd"; | ||||
|             this.tbEd.Size = new System.Drawing.Size(115, 21); | ||||
|             this.tbEd.TabIndex = 9; | ||||
| @@ -114,9 +127,9 @@ | ||||
|             // button1 | ||||
|             //  | ||||
|             this.button1.Dock = System.Windows.Forms.DockStyle.Right; | ||||
|             this.button1.Location = new System.Drawing.Point(1193, 5); | ||||
|             this.button1.Location = new System.Drawing.Point(873, 5); | ||||
|             this.button1.Name = "button1"; | ||||
|             this.button1.Size = new System.Drawing.Size(75, 32); | ||||
|             this.button1.Size = new System.Drawing.Size(75, 26); | ||||
|             this.button1.TabIndex = 8; | ||||
|             this.button1.Text = "내보내기"; | ||||
|             this.button1.UseVisualStyleBackColor = true; | ||||
| @@ -125,7 +138,7 @@ | ||||
|             // tbProcess | ||||
|             //  | ||||
|             this.tbProcess.FormattingEnabled = true; | ||||
|             this.tbProcess.Location = new System.Drawing.Point(344, 11); | ||||
|             this.tbProcess.Location = new System.Drawing.Point(344, 9); | ||||
|             this.tbProcess.Name = "tbProcess"; | ||||
|             this.tbProcess.Size = new System.Drawing.Size(158, 20); | ||||
|             this.tbProcess.TabIndex = 7; | ||||
| @@ -134,7 +147,7 @@ | ||||
|             // label1 | ||||
|             //  | ||||
|             this.label1.AutoSize = true; | ||||
|             this.label1.Location = new System.Drawing.Point(309, 15); | ||||
|             this.label1.Location = new System.Drawing.Point(309, 13); | ||||
|             this.label1.Name = "label1"; | ||||
|             this.label1.Size = new System.Drawing.Size(29, 12); | ||||
|             this.label1.TabIndex = 6; | ||||
| @@ -143,7 +156,7 @@ | ||||
|             // linkLabel1 | ||||
|             //  | ||||
|             this.linkLabel1.AutoSize = true; | ||||
|             this.linkLabel1.Location = new System.Drawing.Point(13, 15); | ||||
|             this.linkLabel1.Location = new System.Drawing.Point(13, 13); | ||||
|             this.linkLabel1.Name = "linkLabel1"; | ||||
|             this.linkLabel1.Size = new System.Drawing.Size(45, 12); | ||||
|             this.linkLabel1.TabIndex = 0; | ||||
| @@ -153,9 +166,9 @@ | ||||
|             // btRefresh | ||||
|             //  | ||||
|             this.btRefresh.Dock = System.Windows.Forms.DockStyle.Right; | ||||
|             this.btRefresh.Location = new System.Drawing.Point(1268, 5); | ||||
|             this.btRefresh.Location = new System.Drawing.Point(948, 5); | ||||
|             this.btRefresh.Name = "btRefresh"; | ||||
|             this.btRefresh.Size = new System.Drawing.Size(75, 32); | ||||
|             this.btRefresh.Size = new System.Drawing.Size(75, 26); | ||||
|             this.btRefresh.TabIndex = 2; | ||||
|             this.btRefresh.Text = "새로고침"; | ||||
|             this.btRefresh.UseVisualStyleBackColor = true; | ||||
| @@ -163,50 +176,74 @@ | ||||
|             //  | ||||
|             // tbSd | ||||
|             //  | ||||
|             this.tbSd.Location = new System.Drawing.Point(66, 11); | ||||
|             this.tbSd.Location = new System.Drawing.Point(66, 9); | ||||
|             this.tbSd.Name = "tbSd"; | ||||
|             this.tbSd.Size = new System.Drawing.Size(115, 21); | ||||
|             this.tbSd.TabIndex = 1; | ||||
|             this.tbSd.Text = "2020"; | ||||
|             this.tbSd.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; | ||||
|             //  | ||||
|             // radType | ||||
|             // radTypeAll | ||||
|             //  | ||||
|             this.radType.AutoSize = true; | ||||
|             this.radType.Checked = true; | ||||
|             this.radType.Location = new System.Drawing.Point(528, 13); | ||||
|             this.radType.Name = "radType"; | ||||
|             this.radType.Size = new System.Drawing.Size(47, 16); | ||||
|             this.radType.TabIndex = 10; | ||||
|             this.radType.TabStop = true; | ||||
|             this.radType.Text = "대체"; | ||||
|             this.radType.UseVisualStyleBackColor = true; | ||||
|             this.radTypeAll.AutoSize = true; | ||||
|             this.radTypeAll.Location = new System.Drawing.Point(749, 11); | ||||
|             this.radTypeAll.Name = "radTypeAll"; | ||||
|             this.radTypeAll.Size = new System.Drawing.Size(78, 16); | ||||
|             this.radTypeAll.TabIndex = 12; | ||||
|             this.radTypeAll.Text = "대체,PMS"; | ||||
|             this.radTypeAll.UseVisualStyleBackColor = true; | ||||
|             //  | ||||
|             // radTypePMS | ||||
|             // label2 | ||||
|             //  | ||||
|             this.radTypePMS.AutoSize = true; | ||||
|             this.radTypePMS.Location = new System.Drawing.Point(584, 13); | ||||
|             this.radTypePMS.Name = "radTypePMS"; | ||||
|             this.radTypePMS.Size = new System.Drawing.Size(50, 16); | ||||
|             this.radTypePMS.TabIndex = 11; | ||||
|             this.radTypePMS.Text = "PMS"; | ||||
|             this.radTypePMS.UseVisualStyleBackColor = true; | ||||
|             this.label2.AutoSize = true; | ||||
|             this.label2.Location = new System.Drawing.Point(508, 13); | ||||
|             this.label2.Name = "label2"; | ||||
|             this.label2.Size = new System.Drawing.Size(29, 12); | ||||
|             this.label2.TabIndex = 13; | ||||
|             this.label2.Text = "승인"; | ||||
|             //  | ||||
|             // cmbApploval | ||||
|             //  | ||||
|             this.cmbApploval.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; | ||||
|             this.cmbApploval.FormattingEnabled = true; | ||||
|             this.cmbApploval.Items.AddRange(new object[] { | ||||
|             "승인완료", | ||||
|             "미승인"}); | ||||
|             this.cmbApploval.Location = new System.Drawing.Point(543, 9); | ||||
|             this.cmbApploval.Name = "cmbApploval"; | ||||
|             this.cmbApploval.Size = new System.Drawing.Size(85, 20); | ||||
|             this.cmbApploval.TabIndex = 14; | ||||
|             this.cmbApploval.SelectedIndexChanged += new System.EventHandler(this.cmbApploval_SelectedIndexChanged); | ||||
|             //  | ||||
|             // bs | ||||
|             //  | ||||
|             this.bs.DataMember = "jobreport"; | ||||
|             this.bs.DataSource = this.dsReport; | ||||
|             //  | ||||
|             // dsReport | ||||
|             //  | ||||
|             this.dsReport.DataSetName = "dsReport"; | ||||
|             this.dsReport.SchemaSerializationMode = System.Data.SchemaSerializationMode.IncludeSchema; | ||||
|             //  | ||||
|             // ta | ||||
|             //  | ||||
|             this.ta.ClearBeforeFill = true; | ||||
|             //  | ||||
|             // rJobReportOT | ||||
|             //  | ||||
|             this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F); | ||||
|             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; | ||||
|             this.ClientSize = new System.Drawing.Size(1348, 699); | ||||
|             this.ClientSize = new System.Drawing.Size(1028, 699); | ||||
|             this.Controls.Add(this.dataGridView1); | ||||
|             this.Controls.Add(this.panel1); | ||||
|             this.Name = "rJobReportOT"; | ||||
|             this.Text = "휴일/연장근무 집계표"; | ||||
|             this.Load += new System.EventHandler(this.rJobReport_Load); | ||||
|             ((System.ComponentModel.ISupportInitialize)(this.bs)).EndInit(); | ||||
|             ((System.ComponentModel.ISupportInitialize)(this.dsReport)).EndInit(); | ||||
|             ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit(); | ||||
|             this.panel1.ResumeLayout(false); | ||||
|             this.panel1.PerformLayout(); | ||||
|             ((System.ComponentModel.ISupportInitialize)(this.bs)).EndInit(); | ||||
|             ((System.ComponentModel.ISupportInitialize)(this.dsReport)).EndInit(); | ||||
|             this.ResumeLayout(false); | ||||
|  | ||||
|         } | ||||
| @@ -226,5 +263,8 @@ | ||||
| 		private System.Windows.Forms.TextBox tbEd; | ||||
|         private System.Windows.Forms.RadioButton radTypePMS; | ||||
|         private System.Windows.Forms.RadioButton radType; | ||||
|         private System.Windows.Forms.RadioButton radTypeAll; | ||||
|         private System.Windows.Forms.Label label2; | ||||
|         private System.Windows.Forms.ComboBox cmbApploval; | ||||
|     } | ||||
| } | ||||
| @@ -30,7 +30,7 @@ namespace FPJ0000.JobReport_ | ||||
|  | ||||
|             //this.tbProcess.Text = FCOMMON.info.Login.process; | ||||
|             if (tbProcess.SelectedIndex < 0) tbProcess.SelectedIndex = 0; | ||||
|  | ||||
|             this.cmbApploval.SelectedIndex = 0; //default : 승인 | ||||
|             this.tbSd.Text = DateTime.Now.Year.ToString() + "-01"; | ||||
|             this.tbEd.Text = DateTime.Now.Year.ToString() + "-12"; | ||||
|             this.Show(); | ||||
| @@ -45,12 +45,22 @@ namespace FPJ0000.JobReport_ | ||||
|             //var taH = new dsReportTableAdapters.HolidayLIstTableAdapter(); | ||||
|             //taH.Fill(this.dsReport.HolidayLIst, tbMon.Text + "%"); | ||||
|  | ||||
|             var isReqData = cmbApploval.SelectedIndex > 0; | ||||
|             string prcname = tbProcess.SelectedIndex < 1 ? "%" : tbProcess.Text.Trim(); | ||||
|             if (radType.Checked) | ||||
|                 this.ta.FillByOt2(this.dsReport.jobReport, FCOMMON.info.Login.gcode, prcname, tbSd.Text, tbEd.Text); | ||||
|             if (isReqData) | ||||
|             { | ||||
|                 this.ta.FillByOtReq(this.dsReport.jobReport, FCOMMON.info.Login.gcode, prcname, tbSd.Text, tbEd.Text); | ||||
|             } | ||||
|             else | ||||
|             { | ||||
|                 if (radType.Checked) | ||||
|                     this.ta.FillByOt2(this.dsReport.jobReport, FCOMMON.info.Login.gcode, prcname, tbSd.Text, tbEd.Text); | ||||
|                 else if (radTypePMS.Checked) | ||||
|                     this.ta.FillByOtPMS(this.dsReport.jobReport, FCOMMON.info.Login.gcode, prcname, tbSd.Text, tbEd.Text); | ||||
|                 else | ||||
|                     this.ta.FillByOTAll(this.dsReport.jobReport, FCOMMON.info.Login.gcode, prcname, tbSd.Text, tbEd.Text); | ||||
|             } | ||||
|  | ||||
|                 this.ta.FillByOtPMS(this.dsReport.jobReport, FCOMMON.info.Login.gcode, prcname, tbSd.Text, tbEd.Text); | ||||
|  | ||||
|  | ||||
|             //그리드뷰 생성 | ||||
| @@ -64,7 +74,7 @@ namespace FPJ0000.JobReport_ | ||||
|             this.dataGridView1.Columns.Add("이름", "이름"); | ||||
|             this.dataGridView1.Columns.Add("사번", "사번"); | ||||
|  | ||||
|             var otTitle = radType.Checked ? "연장" : "PMS"; | ||||
|             //var otTitle = radType.Checked ? "연장" : "PMS"; | ||||
|  | ||||
|             //이름/년도데이터추가 | ||||
|             var ymlist = dsReport.jobReport.OrderBy(t => t.yymm).GroupBy(t => t.yymm); | ||||
| @@ -73,14 +83,52 @@ namespace FPJ0000.JobReport_ | ||||
|                 var drYm = ym.FirstOrDefault(); | ||||
|                 var basehr = int.Parse(drYm.yymm.Substring(drYm.yymm.IndexOf('(')).Replace("(", "").Replace(")", "")); | ||||
|                 this.dataGridView1.Columns.Add(drYm.yymm, drYm.yymm.Substring(0, 7) + "\n휴일");// + "\r\n(" + basehr.ToString() + ")"); | ||||
|                 this.dataGridView1.Columns.Add(drYm.yymm, $"({basehr})\n{otTitle}"); | ||||
|                 if (isReqData) | ||||
|                 { | ||||
|                     this.dataGridView1.Columns.Add(drYm.yymm, $"({basehr})\n요청"); | ||||
|                 } | ||||
|                 else if (radTypeAll.Checked) | ||||
|                 { | ||||
|                     this.dataGridView1.Columns.Add(drYm.yymm, $"({basehr})\n연장"); | ||||
|                     this.dataGridView1.Columns.Add(drYm.yymm, $"({basehr})\nPMS"); | ||||
|                 } | ||||
|                 else if (radType.Checked) | ||||
|                 { | ||||
|                     this.dataGridView1.Columns.Add(drYm.yymm, $"({basehr})\n연장"); | ||||
|                 } | ||||
|                 else | ||||
|                 { | ||||
|                     this.dataGridView1.Columns.Add(drYm.yymm, $"({basehr})\nPMS"); | ||||
|                 } | ||||
|  | ||||
|                 this.dataGridView1.Columns[this.dataGridView1.Columns.Count - 2].Tag = basehr; | ||||
|                 this.dataGridView1.Columns[this.dataGridView1.Columns.Count - 1].Tag = basehr; | ||||
|                 this.dataGridView1.Columns[this.dataGridView1.Columns.Count - 2].DefaultCellStyle.Format = "N1"; | ||||
|                 this.dataGridView1.Columns[this.dataGridView1.Columns.Count - 1].DefaultCellStyle.Format = "N1"; | ||||
|                 if (radTypeAll.Checked) | ||||
|                 { | ||||
|                     this.dataGridView1.Columns[this.dataGridView1.Columns.Count - 3].Tag = basehr; | ||||
|                     this.dataGridView1.Columns[this.dataGridView1.Columns.Count - 3].DefaultCellStyle.Format = "N1"; | ||||
|                 } | ||||
|             } | ||||
|             this.dataGridView1.Columns.Add("subtotal", "합계\n휴일"); | ||||
|             this.dataGridView1.Columns.Add($"subtotal", $"합계\n{otTitle}"); | ||||
|             if (isReqData) | ||||
|             { | ||||
|                 this.dataGridView1.Columns.Add($"subtotal", $"합계\n요청"); | ||||
|             } | ||||
|             else if (radTypeAll.Checked) | ||||
|             { | ||||
|                 this.dataGridView1.Columns.Add($"subtotal", $"합계\n연장"); | ||||
|                 this.dataGridView1.Columns.Add($"subtotal", $"합계\nPMS"); | ||||
|             } | ||||
|             else if (radType.Checked) | ||||
|             { | ||||
|                 this.dataGridView1.Columns.Add($"subtotal", $"합계\n연장"); | ||||
|             } | ||||
|             else | ||||
|             { | ||||
|                 this.dataGridView1.Columns.Add($"subtotal", $"합계\nPMS"); | ||||
|             } | ||||
|  | ||||
|             //이름으로 정렬해서 데이터를 가져온다 | ||||
|             var namelist = this.dsReport.jobReport.OrderBy(t => t.UserProcess + t.uname).GroupBy(t => t.uname); | ||||
| @@ -93,10 +141,11 @@ namespace FPJ0000.JobReport_ | ||||
|                 rowdata.Add(drName.uname); | ||||
|                 rowdata.Add(drName.uid); | ||||
|  | ||||
|                 double User_sumhlOne = 0; | ||||
|                 double User_sumotOne = 0; | ||||
|  | ||||
|  | ||||
|                 double User_sumhl = 0; | ||||
|                 double User_sumot = 0; | ||||
|                 double User_sumhlAll = 0; | ||||
|                 double User_sumotAll = 0; | ||||
|  | ||||
|                 List<Boolean> high = new List<bool>(); | ||||
|                 List<Boolean> low = new List<bool>(); | ||||
| @@ -128,27 +177,62 @@ namespace FPJ0000.JobReport_ | ||||
|                         //} | ||||
|  | ||||
|                         var sumhr = userDatas.Sum(t => t.hrs); | ||||
|                         double sumot = 0.0; | ||||
|                         double sumhl = 0.0; | ||||
|                         if (radType.Checked) | ||||
|                         double sumotOne = 0.0; | ||||
|                         double sumhlOne = 0.0; | ||||
|  | ||||
|                         double sumotAll = 0.0; | ||||
|                         double sumhlAll = 0.0; | ||||
|  | ||||
|                         if (isReqData) | ||||
|                         { | ||||
|                             sumot = userDatas.Sum(t => t.ot2); | ||||
|                             sumhl = userDatas.Sum(t => t.holyot2); | ||||
|                             sumotOne = userDatas.Sum(t => t.ot); | ||||
|                             sumhlOne = userDatas.Sum(t => t.holyot); | ||||
|                         } | ||||
|                         else if (radType.Checked) | ||||
|                         { | ||||
|                             sumotOne = userDatas.Sum(t => t.ot2); | ||||
|                             sumhlOne = userDatas.Sum(t => t.holyot2); | ||||
|                         } | ||||
|                         else if (radTypePMS.Checked) | ||||
|                         { | ||||
|                             sumotOne = userDatas.Sum(t => t.otPMS); | ||||
|                             sumhlOne = userDatas.Sum(t => t.holyotPMS); | ||||
|                         } | ||||
|                         else | ||||
|                         { | ||||
|                             sumot = userDatas.Sum(t => t.otPMS); | ||||
|                             sumhl = userDatas.Sum(t => t.holyotPMS); | ||||
|                             sumotOne = userDatas.Sum(t => t.ot2); | ||||
|                             sumhlOne = userDatas.Sum(t => t.holyot2); | ||||
|  | ||||
|                             sumotAll = userDatas.Sum(t => t.otPMS); | ||||
|                             sumhlAll = userDatas.Sum(t => t.holyotPMS); | ||||
|                         } | ||||
|  | ||||
|                         User_sumhl += sumhl; | ||||
|                         User_sumot += sumot; | ||||
|                         User_sumhlOne += sumhlOne; | ||||
|                         User_sumotOne += sumotOne; | ||||
|                         if (radTypeAll.Checked) | ||||
|                         { | ||||
|                             User_sumhlAll += sumhlAll; | ||||
|                             User_sumotAll += sumotAll; | ||||
|                         } | ||||
|  | ||||
|  | ||||
|                         if (sumhlOne == 0.0) rowdata.Add(null); | ||||
|                         else rowdata.Add($"{Math.Round(sumhlOne, 1)}"); | ||||
|  | ||||
|                         if (sumotOne == 0.0) rowdata.Add(null); | ||||
|                         else rowdata.Add($"{Math.Round(sumotOne, 1)}"); | ||||
|  | ||||
|                         //전체라면 합계를 추가 | ||||
|                         if (isReqData == false && radTypeAll.Checked) | ||||
|                         { | ||||
|                             if (sumhlAll == 0.0) rowdata.Add(null); | ||||
|                             else rowdata.Add($"{Math.Round(sumhlAll, 1)}"); | ||||
|  | ||||
|                             if (sumotAll == 0.0) rowdata.Add(null); | ||||
|                             else rowdata.Add($"{Math.Round(sumotAll, 1)}"); | ||||
|                         } | ||||
|  | ||||
|                         if (sumhl == 0.0) rowdata.Add(null); | ||||
|                         else rowdata.Add($"{Math.Round(sumhl,1)}"); | ||||
|  | ||||
|                         if (sumot == 0.0) rowdata.Add(null); | ||||
|                         else rowdata.Add($"{Math.Round(sumot,1)}"); | ||||
|  | ||||
|                         if (sumhr > basehr) high.Add(true); | ||||
|                         else high.Add(false); | ||||
| @@ -159,8 +243,16 @@ namespace FPJ0000.JobReport_ | ||||
|                 } | ||||
|  | ||||
|  | ||||
|                 rowdata.Add($"{Math.Round(User_sumhl,1)}"); //합게 | ||||
|                 rowdata.Add($"{Math.Round(User_sumot,1)}"); //합게 | ||||
|                 rowdata.Add($"{Math.Round(User_sumhlOne, 1)}"); //합게 | ||||
|                 rowdata.Add($"{Math.Round(User_sumotOne, 1)}"); //합게 | ||||
|  | ||||
|                 if (isReqData == false && radTypeAll.Checked) | ||||
|                 { | ||||
|                     rowdata.Add($"{Math.Round(User_sumhlAll, 1)}"); //합게 | ||||
|                     rowdata.Add($"{Math.Round(User_sumotAll, 1)}"); //합게 | ||||
|                 } | ||||
|  | ||||
|  | ||||
|                 dataGridView1.Rows.Add(rowdata.ToArray()); | ||||
|  | ||||
|                 //이번에 추가한 줄의 셀 컬러를 지정한다 | ||||
| @@ -176,7 +268,7 @@ namespace FPJ0000.JobReport_ | ||||
|                     } | ||||
|                     else | ||||
|                     { | ||||
|                         if (col.HeaderText.Contains(otTitle)) | ||||
|                         if (col.HeaderText.Contains("요청") || col.HeaderText.Contains("연장") || col.HeaderText.Contains("PMS")) | ||||
|                             dataGridView1.Rows[currentrow].Cells[i].Style.BackColor = Color.Linen;// 155,82,93); | ||||
|                         else | ||||
|                             dataGridView1.Rows[currentrow].Cells[i].Style.BackColor = Color.White; | ||||
| @@ -199,7 +291,7 @@ namespace FPJ0000.JobReport_ | ||||
|             List<object> rowdata2 = new List<object>(); | ||||
|             rowdata2.Add("합계"); | ||||
|             rowdata2.Add(dataGridView1.Rows.Count); | ||||
|             rowdata2.Add(null); | ||||
|             rowdata2.Add(null); //사번 | ||||
|             for (int i = 0; i < this.dataGridView1.ColumnCount; i++) | ||||
|             { | ||||
|                 var col = this.dataGridView1.Columns[i]; | ||||
| @@ -235,5 +327,12 @@ namespace FPJ0000.JobReport_ | ||||
|         { | ||||
|             dataGridView1.ExportData(string.Empty); | ||||
|         } | ||||
|  | ||||
|         private void cmbApploval_SelectedIndexChanged(object sender, EventArgs e) | ||||
|         { | ||||
|             radType.Enabled = cmbApploval.SelectedIndex == 0; | ||||
|             radTypeAll.Enabled = cmbApploval.SelectedIndex == 0; | ||||
|             radTypePMS.Enabled = cmbApploval.SelectedIndex == 0; | ||||
|         } | ||||
|     } | ||||
| } | ||||
|   | ||||
| @@ -1,17 +1,17 @@ | ||||
| <?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 | ||||
|      | ||||
|     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> | ||||
| @@ -26,36 +26,36 @@ | ||||
|         <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 | ||||
|                  | ||||
|     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 | ||||
|      | ||||
|     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 | ||||
|      | ||||
|     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 | ||||
|      | ||||
|     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 | ||||
|     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 | ||||
|     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 | ||||
|     value   : The object must be serialized into a byte array  | ||||
|             : using a System.ComponentModel.TypeConverter | ||||
|             : and then encoded with base64 encoding. | ||||
|     --> | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 backuppc
					backuppc