76 lines
2.1 KiB
C#
76 lines
2.1 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.Threading.Tasks;
|
|
using System.Windows.Forms;
|
|
|
|
namespace FEQ0000
|
|
{
|
|
public partial class fPurchaseNRList : Form
|
|
{
|
|
public fPurchaseNRList(dsPurchase.PurchaseDataTable dt)
|
|
{
|
|
InitializeComponent();
|
|
this.ds1.Purchase.Merge(dt);
|
|
this.ds1.AcceptChanges();
|
|
}
|
|
|
|
private void fEBoardReport_Load(object sender, EventArgs e)
|
|
{
|
|
//기본엑셀파일을 가져온다
|
|
this.Show();
|
|
this.bs1.Sort = "sc desc,requestname,sid,pumname";
|
|
this.bs1.Filter = "sc <> ''";
|
|
Application.DoEvents();
|
|
|
|
//파일불러오기
|
|
LoadExcel();
|
|
|
|
//순번맥기기
|
|
for (int r = 0; r < this.fpSpread1.ActiveSheet.RowCount; r++)
|
|
{
|
|
fpSpread1.ActiveSheet.Cells[r, 0].Value = r+1;
|
|
}
|
|
|
|
}
|
|
|
|
void LoadExcel()
|
|
{
|
|
//파일불러오기
|
|
//var fi = new System.IO.FileInfo(FCOMMON.Util.CurrentPath + "EBoardReport.xlsx");
|
|
//this.fpSpread1.OpenExcel(fi.FullName);
|
|
}
|
|
|
|
private void btRefresh_Click(object sender, EventArgs e)
|
|
{
|
|
this.ds1.RejectChanges();
|
|
this.fpSpread1.Invalidate();
|
|
}
|
|
|
|
private void btSave_Click(object sender, EventArgs e)
|
|
{
|
|
|
|
}
|
|
|
|
private void panel1_MouseDoubleClick(object sender, MouseEventArgs e)
|
|
{
|
|
LoadExcel();
|
|
}
|
|
|
|
private void toolStripButton1_Click(object sender, EventArgs e)
|
|
{
|
|
//파일저장
|
|
var sd = new SaveFileDialog();
|
|
sd.Filter = "excel|*.xls";
|
|
if (sd.ShowDialog() == DialogResult.OK)
|
|
{
|
|
this.fpSpread1.SaveExcel(sd.FileName, FarPoint.Excel.ExcelSaveFlags.SaveBothCustomRowAndColumnHeaders);
|
|
}
|
|
}
|
|
}
|
|
}
|