장비목록 통합작업
This commit is contained in:
		
							
								
								
									
										94
									
								
								SubProject/FEQ0000/Equipment/rpt_equipmentAll.cs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										94
									
								
								SubProject/FEQ0000/Equipment/rpt_equipmentAll.cs
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,94 @@ | ||||
| using System; | ||||
| using System.Collections.Generic; | ||||
| using System.ComponentModel; | ||||
| using System.Data; | ||||
| using System.Drawing; | ||||
| using System.Linq; | ||||
| using System.Text; | ||||
| using System.Windows.Forms; | ||||
|  | ||||
| namespace FEQ0000 | ||||
| { | ||||
|     public partial class rpt_equipmentAll : Form | ||||
|     { | ||||
|         dsEQ.EETGW_EquipmentDataTable dt; | ||||
|         public rpt_equipmentAll(dsEQ.EETGW_EquipmentDataTable dt_,string title) | ||||
|         { | ||||
|             //SqlServerTypes.Utilities.LoadNativeAssemblies(AppDomain.CurrentDomain.BaseDirectory); | ||||
|             InitializeComponent(); | ||||
|             this.dt = dt_; | ||||
|             this.Text = "Equipment List(" + title + ")"; | ||||
|         } | ||||
|  | ||||
|  | ||||
|  | ||||
|         private void rpt_equipment_Load(object sender, EventArgs e) | ||||
|         { | ||||
|             //this.Text = string.Format("Data Report({0})", "ALL"); | ||||
|             this.Show(); | ||||
|             Application.DoEvents(); | ||||
|  | ||||
|             //데이터를 집계해서 생성해준다. | ||||
|             var dtSum = new dsEQ.vEquStockAllDataTable(); | ||||
|             var grpType = this.dt.GroupBy(t => t.type); | ||||
|             foreach (var gItemType in grpType) | ||||
|             { | ||||
|                 var grpManu = gItemType.GroupBy(t => t.manu); | ||||
|                 foreach (var gItemM in grpManu) | ||||
|                 { | ||||
|                     var grpMod = gItemM.GroupBy(t => t.model); | ||||
|                     foreach (var gItemMod in grpMod) | ||||
|                     { | ||||
|  | ||||
|                          | ||||
|  | ||||
|                         var grpLine = gItemMod.GroupBy(t => t.lineT + "-" + t.lineP); | ||||
|                         foreach (var gItemLine in grpLine) | ||||
|                         { | ||||
|                             var grpP1 = gItemLine.GroupBy(t => t.param1); | ||||
|                             foreach(var gItemP1 in grpP1) | ||||
|                             { | ||||
|                                 var grpPlant = gItemP1.GroupBy(t => t.plant); | ||||
|                                 foreach (var gItemPlant in grpPlant) | ||||
|                                 { | ||||
|                                     var grpGrp2 = gItemPlant.GroupBy(t => t.grp2); | ||||
|                                     foreach (var gItemGrp2 in grpGrp2) | ||||
|                                     { | ||||
|                                         var dr = gItemGrp2.FirstOrDefault(); | ||||
|                                         var newdr = dtSum.NewvEquStockAllRow(); | ||||
|                                         newdr.pdate = DateTime.Now.ToShortDateString(); | ||||
|                                         newdr.grp = dr.type; | ||||
|                                         newdr.manu = dr.manu; | ||||
|                                         newdr.model = dr.model; | ||||
|                                         newdr.linecode = dr.linecode; | ||||
|                                         newdr.lineT = dr.lineT; | ||||
|                                         newdr.lineP = dr.lineP; | ||||
|                                         newdr.cnt = gItemGrp2.Count(); | ||||
|                                         newdr.Remark = dr.memo; | ||||
|                                         newdr.plant = dr.plant; | ||||
|                                         newdr.grp2 = dr.grp2; | ||||
|                                         dtSum.AddvEquStockAllRow(newdr); | ||||
|                                     } | ||||
|                                 } | ||||
|                             } | ||||
|                         } | ||||
|                     } | ||||
|                 } | ||||
|             } | ||||
|  | ||||
|  | ||||
|             this.rpv1.PageCountMode = Microsoft.Reporting.WinForms.PageCountMode.Actual; | ||||
|             this.rpv1.ZoomMode = Microsoft.Reporting.WinForms.ZoomMode.PageWidth; | ||||
|  | ||||
|             //Set DataSource | ||||
|             Microsoft.Reporting.WinForms.ReportDataSource DsEQ = new Microsoft.Reporting.WinForms.ReportDataSource(); | ||||
|             DsEQ.Name = "DataSet1"; | ||||
|  | ||||
|             this.rpv1.LocalReport.ReportEmbeddedResource = "FEQ0000.Equipment.ReportA.rdlc"; | ||||
|             DsEQ.Value = dtSum; | ||||
|  | ||||
|             this.rpv1.LocalReport.DataSources.Add(DsEQ); | ||||
|             this.rpv1.RefreshReport(); | ||||
|         } | ||||
|     } | ||||
| } | ||||
		Reference in New Issue
	
	Block a user
	 chi
					chi