60 lines
		
	
	
		
			2.2 KiB
		
	
	
	
		
			C#
		
	
	
	
	
	
			
		
		
	
	
			60 lines
		
	
	
		
			2.2 KiB
		
	
	
	
		
			C#
		
	
	
	
	
	
| 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_equipmentB : Form
 | |
|     {
 | |
|         fEquipment.eTabletype imptype = fEquipment.eTabletype.MOLD;
 | |
|         string pdate = string.Empty;
 | |
|         public rpt_equipmentB(fEquipment.eTabletype type_, string dateStr)
 | |
|         {
 | |
|             InitializeComponent();
 | |
|             pdate = dateStr;
 | |
|             imptype = type_;
 | |
|         }
 | |
| 
 | |
|         private void rpt_equipment_Load(object sender, EventArgs e)
 | |
|         {
 | |
|             this.Text = string.Format("Data Report({0})",this.imptype);
 | |
|             this.Show();
 | |
|             Application.DoEvents();
 | |
| 
 | |
|             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";
 | |
| 
 | |
|             switch (imptype)
 | |
|             {
 | |
|                 case fEquipment.eTabletype.FOL:                    
 | |
|                     this.rpv1.LocalReport.ReportEmbeddedResource = "FEQ0000.Equipment.ReportF.rdlc";
 | |
|                     taF.Fill(this.dsEQ.vEquStockF, this.pdate);
 | |
|                     DsEQ.Value = this.dsEQ.vEquStockF;
 | |
|                     break;
 | |
|                 case fEquipment.eTabletype.BUMP:
 | |
|                     this.rpv1.LocalReport.ReportEmbeddedResource = "FEQ0000.Equipment.ReportB.rdlc";
 | |
|                     taB.Fill(this.dsEQ.vEquStockB, this.pdate);
 | |
|                     DsEQ.Value = this.dsEQ.vEquStockB;
 | |
|                     break;
 | |
|                 case fEquipment.eTabletype.MOLD:
 | |
|                     this.rpv1.LocalReport.ReportEmbeddedResource = "FEQ0000.Equipment.ReportE.rdlc";
 | |
|                     taE.Fill(this.dsEQ.vEquStockME, this.pdate);
 | |
|                     DsEQ.Value = this.dsEQ.vEquStockME;
 | |
|                     break;
 | |
|             }
 | |
| 
 | |
|             this.rpv1.LocalReport.DataSources.Add(DsEQ);
 | |
|             this.rpv1.RefreshReport();
 | |
|         }
 | |
|     }
 | |
| }
 | 
