84 lines
3.2 KiB
C#
84 lines
3.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.Purchase
|
|
{
|
|
public partial class rPurchaseEB : Form
|
|
{
|
|
public rPurchaseEB()
|
|
{
|
|
InitializeComponent();
|
|
Properties.Settings.Default["gwcs"] = FCOMMON.info.CS;
|
|
Properties.Settings.Default["EEEntities"] = FCOMMON.info.CS;
|
|
}
|
|
|
|
private void rPurchase_Load(object sender, EventArgs e)
|
|
{
|
|
this.dtSD.Text = DateTime.Now.Year.ToString("0000") + "-01-01";
|
|
this.dtED.Text = DateTime.Now.Year.ToString("0000") + "-12-31";
|
|
|
|
this.rpv1.PageCountMode = Microsoft.Reporting.WinForms.PageCountMode.Actual;
|
|
this.rpv1.ZoomMode = Microsoft.Reporting.WinForms.ZoomMode.FullPage;
|
|
//this.rpv1.DisplayMode = Microsoft.Reporting.WinForms.DisplayMode.PrintLayout;
|
|
this.cmbReport.SelectedIndex = 0;
|
|
|
|
//refreshData();
|
|
}
|
|
|
|
private void btSearch_Click(object sender, EventArgs e)
|
|
{
|
|
refreshData();
|
|
}
|
|
void refreshData()
|
|
{
|
|
this.ta.FillDate(this.dsPurchase.EETGW_PurchaseEB, dtSD.Text, dtED.Text,FCOMMON.info.Login.gcode);
|
|
|
|
//Set DataSource
|
|
Microsoft.Reporting.WinForms.ReportDataSource DsEQ = new Microsoft.Reporting.WinForms.ReportDataSource();
|
|
DsEQ.Name = "DataSet1";
|
|
DsEQ.Value = this.dsPurchase.EETGW_PurchaseEB;
|
|
|
|
switch (this.cmbReport.SelectedIndex)
|
|
{
|
|
case 0: //사용자 - 월
|
|
this.rpv1.LocalReport.ReportEmbeddedResource = "FEQ0000.PurchaseEB.Rpt_Purchase.rdlc";
|
|
break;
|
|
case 1: //공정 - 월
|
|
this.rpv1.LocalReport.ReportEmbeddedResource = "FEQ0000.PurchaseEB.Rpt_PurchasePrc.rdlc";
|
|
break;
|
|
//case 2: //프로젝트 - 월
|
|
// //비고를 짤라서 처리해야한다.
|
|
// foreach(dsPurchase.PurchaseRow dr in dsPurchase.Purchase)
|
|
// {
|
|
// if (dr.IsbigoNull()) dr.bigo = string.Empty;
|
|
// else
|
|
// {
|
|
// dr.bigo = dr.bigo.Split('/')[0].Trim();
|
|
// }
|
|
// if(dr.projectidx == -1)
|
|
// {
|
|
// dr.state = "비 프로젝트";
|
|
// }
|
|
// else
|
|
// {
|
|
// dr.state = "프로젝트";
|
|
// }
|
|
// if (dr.bigo.isEmpty()) dr.bigo = "(없음)";
|
|
// }
|
|
// dsPurchase.Purchase.AcceptChanges();
|
|
// this.rpv1.LocalReport.ReportEmbeddedResource = "FEQ0000.Purchase.Rpt_PurchasePrj.rdlc";
|
|
// break;
|
|
}
|
|
this.rpv1.LocalReport.DataSources.Clear();
|
|
this.rpv1.LocalReport.DataSources.Add(DsEQ);
|
|
this.rpv1.RefreshReport();
|
|
}
|
|
}
|
|
}
|